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