hexo/node_modules/prismjs/components/prism-bnf.js

22 lines
404 B
JavaScript
Raw Normal View History

2023-10-03 11:14:36 +08:00
Prism.languages.bnf = {
'string': {
pattern: /"[^\r\n"]*"|'[^\r\n']*'/
},
'definition': {
pattern: /<[^<>\r\n\t]+>(?=\s*::=)/,
alias: ['rule', 'keyword'],
inside: {
'punctuation': /^<|>$/
}
},
'rule': {
pattern: /<[^<>\r\n\t]+>/,
inside: {
'punctuation': /^<|>$/
}
},
'operator': /::=|[|()[\]{}*+?]|\.{3}/
};
Prism.languages.rbnf = Prism.languages.bnf;