Skip to content

Commit

Permalink
feat: allow unquoted - character (fixes #21)
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Oct 2, 2022
1 parent de321e1 commit a04e7e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/grammar.ne
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,4 @@ regex_flags ->
[gmiyusd]:+ {% d => d[0].join('') %}

unquoted_value ->
[a-zA-Z_*@#] [a-zA-Z@#\.\-_*]:+ {% d => d[0] + d[1].join('') %}
[a-zA-Z\-_*@#] [a-zA-Z\.\-_*@#]:+ {% d => d[0] + d[1].join('') %}
6 changes: 3 additions & 3 deletions src/grammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ const grammar: Grammar = {
{"name": "regex_flags$ebnf$1", "symbols": [/[gmiyusd]/]},
{"name": "regex_flags$ebnf$1", "symbols": ["regex_flags$ebnf$1", /[gmiyusd]/], "postprocess": (d) => d[0].concat([d[1]])},
{"name": "regex_flags", "symbols": ["regex_flags$ebnf$1"], "postprocess": d => d[0].join('')},
{"name": "unquoted_value$ebnf$1", "symbols": [/[a-zA-Z@#\.\-_*]/]},
{"name": "unquoted_value$ebnf$1", "symbols": ["unquoted_value$ebnf$1", /[a-zA-Z@#\.\-_*]/], "postprocess": (d) => d[0].concat([d[1]])},
{"name": "unquoted_value", "symbols": [/[a-zA-Z_*@#]/, "unquoted_value$ebnf$1"], "postprocess": d => d[0] + d[1].join('')}
{"name": "unquoted_value$ebnf$1", "symbols": [/[a-zA-Z\.\-_*@#]/]},
{"name": "unquoted_value$ebnf$1", "symbols": ["unquoted_value$ebnf$1", /[a-zA-Z\.\-_*@#]/], "postprocess": (d) => d[0].concat([d[1]])},
{"name": "unquoted_value", "symbols": [/[a-zA-Z\-_*@#]/, "unquoted_value$ebnf$1"], "postprocess": d => d[0] + d[1].join('')}
],
ParserStart: "main",
};
Expand Down

0 comments on commit a04e7e7

Please sign in to comment.