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