UNPKG

894 BJavaScriptView Raw
1/*
2Language: Python profiler
3Description: Python profiler results
4Author: Brian Beck <exogen@gmail.com>
5*/
6
7function 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}',
14 end: ':',
15 excludeEnd: true
16 },
17 {
18 begin: '(ncalls|tottime|cumtime)',
19 end: '$',
20 keywords: 'ncalls tottime|10 cumtime|10 filename',
21 relevance: 10
22 },
23 {
24 begin: 'function calls',
25 end: '$',
26 contains: [ hljs.C_NUMBER_MODE ],
27 relevance: 10
28 },
29 hljs.APOS_STRING_MODE,
30 hljs.QUOTE_STRING_MODE,
31 {
32 className: 'string',
33 begin: '\\(',
34 end: '\\)$',
35 excludeBegin: true,
36 excludeEnd: true,
37 relevance: 0
38 }
39 ]
40 };
41}
42
43export { profile as default };