1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/highlight.js/lib/languages/parser3.js

58 lines
1.0 KiB
JavaScript
Raw Normal View History

2024-01-16 21:26:16 +08:00
/*
Language: Parser3
Requires: xml.js
Author: Oleg Volchkov <oleg@volchkov.net>
Website: https://www.parser.ru/en/
Category: template
*/
function parser3(hljs) {
const CURLY_SUBCOMMENT = hljs.COMMENT(
/\{/,
/\}/,
2023-12-18 13:12:25 +08:00
{
2024-01-16 21:26:16 +08:00
contains: [ 'self' ]
2023-12-18 13:12:25 +08:00
}
);
return {
2024-01-16 21:26:16 +08:00
name: 'Parser3',
subLanguage: 'xml',
relevance: 0,
2023-12-18 13:12:25 +08:00
contains: [
hljs.COMMENT('^#', '$'),
hljs.COMMENT(
2024-01-16 21:26:16 +08:00
/\^rem\{/,
/\}/,
2023-12-18 13:12:25 +08:00
{
relevance: 10,
2024-01-16 21:26:16 +08:00
contains: [ CURLY_SUBCOMMENT ]
2023-12-18 13:12:25 +08:00
}
),
{
className: 'meta',
begin: '^@(?:BASE|USE|CLASS|OPTIONS)$',
relevance: 10
},
{
className: 'title',
begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$'
},
{
className: 'variable',
2024-01-16 21:26:16 +08:00
begin: /\$\{?[\w\-.:]+\}?/
2023-12-18 13:12:25 +08:00
},
{
className: 'keyword',
2024-01-16 21:26:16 +08:00
begin: /\^[\w\-.:]+/
2023-12-18 13:12:25 +08:00
},
{
className: 'number',
begin: '\\^#[0-9a-fA-F]+'
},
hljs.C_NUMBER_MODE
]
};
2024-01-16 21:26:16 +08:00
}
module.exports = parser3;