]> luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/parser3.js
Initial commit.
[flow-web.git] / static / highlight / languages / parser3.js
1 /*! `parser3` grammar compiled for Highlight.js 11.11.1 */
2 (function(){
3 var hljsGrammar = (function () {
4 'use strict';
5
6 /*
7 Language: Parser3
8 Requires: xml.js
9 Author: Oleg Volchkov <oleg@volchkov.net>
10 Website: https://www.parser.ru/en/
11 Category: template
12 */
13
14 function parser3(hljs) {
15 const CURLY_SUBCOMMENT = hljs.COMMENT(
16 /\{/,
17 /\}/,
18 { contains: [ 'self' ] }
19 );
20 return {
21 name: 'Parser3',
22 subLanguage: 'xml',
23 relevance: 0,
24 contains: [
25 hljs.COMMENT('^#', '$'),
26 hljs.COMMENT(
27 /\^rem\{/,
28 /\}/,
29 {
30 relevance: 10,
31 contains: [ CURLY_SUBCOMMENT ]
32 }
33 ),
34 {
35 className: 'meta',
36 begin: '^@(?:BASE|USE|CLASS|OPTIONS)$',
37 relevance: 10
38 },
39 {
40 className: 'title',
41 begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$'
42 },
43 {
44 className: 'variable',
45 begin: /\$\{?[\w\-.:]+\}?/
46 },
47 {
48 className: 'keyword',
49 begin: /\^[\w\-.:]+/
50 },
51 {
52 className: 'number',
53 begin: '\\^#[0-9a-fA-F]+'
54 },
55 hljs.C_NUMBER_MODE
56 ]
57 };
58 }
59
60 return parser3;
61
62 })();
63
64 hljs.registerLanguage('parser3', hljsGrammar);
65 })();