PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/samples/scalate-sample-sitegen/src/highlight/languages/profile.js

http://github.com/scalate/scalate
JavaScript | 51 lines | 45 code | 1 blank | 5 comment | 0 complexity | 300e46d436a68824215b6166bd18c67c MD5 | raw file
 1/*
 2Language: Python profile
 3Description: Python profiler results
 4Author: Brian Beck <exogen@gmail.com>
 5*/
 6
 7hljs.LANGUAGES.profile = {
 8  defaultMode: {
 9    lexems: [hljs.UNDERSCORE_IDENT_RE],
10    contains: ['number', 'builtin', 'filename', 'header', 'summary', 'string', 'function']
11  },
12  modes: [
13    hljs.C_NUMBER_MODE,
14    hljs.APOS_STRING_MODE,
15    hljs.QUOTE_STRING_MODE,
16    {
17      className: 'summary',
18      begin: 'function calls', end: '$',
19      contains: ['number'],
20      relevance: 10
21    },
22    {
23      className: 'header',
24      begin: '(ncalls|tottime|cumtime)', end: '$',
25      lexems: [hljs.IDENT_RE],
26      keywords: {'ncalls': 1, 'tottime': 10, 'cumtime': 10, 'filename': 1},
27      relevance: 10
28    },
29    {
30      className: 'function',
31      begin: '\\(', end: '\\)',
32      lexems: [hljs.UNDERSCORE_IDENT_RE],
33      contains: ['title']
34    },
35    {
36      className: 'title',
37      begin: hljs.UNDERSCORE_IDENT_RE, end: '^'
38    },
39    {
40      className: 'builtin',
41      begin: '{', end: '}',
42      contains: ['string'],
43      excludeBegin: true, excludeEnd: true
44    },
45    {
46      className: 'filename',
47      begin: '(/\w|[a-zA-Z_][\da-zA-Z_]+\\.[\da-zA-Z_]{1,3})', end: ':',
48      excludeEnd: true
49    }
50  ]
51};