Skip to content

Commit

Permalink
feat: do not allow - at start (ambiguous)
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Oct 2, 2022
1 parent a04e7e7 commit a6ecf64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 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('') %}
2 changes: 1 addition & 1 deletion src/grammar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ const grammar: Grammar = {
{"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", "symbols": [/[a-zA-Z_*@#]/, "unquoted_value$ebnf$1"], "postprocess": d => d[0] + d[1].join('')}
],
ParserStart: "main",
};
Expand Down

0 comments on commit a6ecf64

Please sign in to comment.