source: node_modules/highlight.js/lib/languages/parser3.js@ e48199a

main
Last change on this file since e48199a was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/*
2Language: Parser3
3Requires: xml.js
4Author: Oleg Volchkov <oleg@volchkov.net>
5Website: https://www.parser.ru/en/
6Category: template
7*/
8
9function parser3(hljs) {
10 const CURLY_SUBCOMMENT = hljs.COMMENT(
11 /\{/,
12 /\}/,
13 {
14 contains: [ 'self' ]
15 }
16 );
17 return {
18 name: 'Parser3',
19 subLanguage: 'xml',
20 relevance: 0,
21 contains: [
22 hljs.COMMENT('^#', '$'),
23 hljs.COMMENT(
24 /\^rem\{/,
25 /\}/,
26 {
27 relevance: 10,
28 contains: [ CURLY_SUBCOMMENT ]
29 }
30 ),
31 {
32 className: 'meta',
33 begin: '^@(?:BASE|USE|CLASS|OPTIONS)$',
34 relevance: 10
35 },
36 {
37 className: 'title',
38 begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$'
39 },
40 {
41 className: 'variable',
42 begin: /\$\{?[\w\-.:]+\}?/
43 },
44 {
45 className: 'keyword',
46 begin: /\^[\w\-.:]+/
47 },
48 {
49 className: 'number',
50 begin: '\\^#[0-9a-fA-F]+'
51 },
52 hljs.C_NUMBER_MODE
53 ]
54 };
55}
56
57module.exports = parser3;
Note: See TracBrowser for help on using the repository browser.