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

39 lines
713 B
JavaScript
Raw Normal View History

2024-01-16 21:26:16 +08:00
/*
Language: BackusNaur Form
Website: https://en.wikipedia.org/wiki/BackusNaur_form
Author: Oleg Efimov <efimovov@gmail.com>
*/
/** @type LanguageFn */
function bnf(hljs) {
2023-12-18 13:12:25 +08:00
return {
2024-01-16 21:26:16 +08:00
name: 'BackusNaur Form',
2023-12-18 13:12:25 +08:00
contains: [
// Attribute
{
className: 'attribute',
2024-01-16 21:26:16 +08:00
begin: /</,
end: />/
2023-12-18 13:12:25 +08:00
},
// Specific
{
begin: /::=/,
2024-01-16 21:26:16 +08:00
end: /$/,
contains: [
{
begin: /</,
end: />/
},
// Common
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE
]
2023-12-18 13:12:25 +08:00
}
]
};
2024-01-16 21:26:16 +08:00
}
module.exports = bnf;