parser3.js 924 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. module.exports = function(hljs) {
  2. var CURLY_SUBCOMMENT = hljs.COMMENT(
  3. '{',
  4. '}',
  5. {
  6. contains: ['self']
  7. }
  8. );
  9. return {
  10. subLanguage: 'xml', relevance: 0,
  11. contains: [
  12. hljs.COMMENT('^#', '$'),
  13. hljs.COMMENT(
  14. '\\^rem{',
  15. '}',
  16. {
  17. relevance: 10,
  18. contains: [
  19. CURLY_SUBCOMMENT
  20. ]
  21. }
  22. ),
  23. {
  24. className: 'meta',
  25. begin: '^@(?:BASE|USE|CLASS|OPTIONS)$',
  26. relevance: 10
  27. },
  28. {
  29. className: 'title',
  30. begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$'
  31. },
  32. {
  33. className: 'variable',
  34. begin: '\\$\\{?[\\w\\-\\.\\:]+\\}?'
  35. },
  36. {
  37. className: 'keyword',
  38. begin: '\\^[\\w\\-\\.\\:]+'
  39. },
  40. {
  41. className: 'number',
  42. begin: '\\^#[0-9a-fA-F]+'
  43. },
  44. hljs.C_NUMBER_MODE
  45. ]
  46. };
  47. };