profile.js (847B)
1 /* 2 Language: Python profiler 3 Description: Python profiler results 4 Author: Brian Beck <exogen@gmail.com> 5 */ 6 7 function profile(hljs) { 8 return { 9 name: 'Python profiler', 10 contains: [ 11 hljs.C_NUMBER_MODE, 12 { 13 begin: '[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}', end: ':', 14 excludeEnd: true 15 }, 16 { 17 begin: '(ncalls|tottime|cumtime)', end: '$', 18 keywords: 'ncalls tottime|10 cumtime|10 filename', 19 relevance: 10 20 }, 21 { 22 begin: 'function calls', end: '$', 23 contains: [hljs.C_NUMBER_MODE], 24 relevance: 10 25 }, 26 hljs.APOS_STRING_MODE, 27 hljs.QUOTE_STRING_MODE, 28 { 29 className: 'string', 30 begin: '\\(', end: '\\)$', 31 excludeBegin: true, excludeEnd: true, 32 relevance: 0 33 } 34 ] 35 }; 36 } 37 38 module.exports = profile;