source: node_modules/refractor/lang/bnf.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 543 bytes
Line 
1'use strict'
2
3module.exports = bnf
4bnf.displayName = 'bnf'
5bnf.aliases = ['rbnf']
6function bnf(Prism) {
7 Prism.languages.bnf = {
8 string: {
9 pattern: /"[^\r\n"]*"|'[^\r\n']*'/
10 },
11 definition: {
12 pattern: /<[^<>\r\n\t]+>(?=\s*::=)/,
13 alias: ['rule', 'keyword'],
14 inside: {
15 punctuation: /^<|>$/
16 }
17 },
18 rule: {
19 pattern: /<[^<>\r\n\t]+>/,
20 inside: {
21 punctuation: /^<|>$/
22 }
23 },
24 operator: /::=|[|()[\]{}*+?]|\.{3}/
25 }
26 Prism.languages.rbnf = Prism.languages.bnf
27}
Note: See TracBrowser for help on using the repository browser.