Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Es grammars fix #477

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified packages/es-grammars/gen/es2015.grammar.ohm
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion packages/es-grammars/gen/es2016.grammar.ohm
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,11 @@ ES2016 {
| NewExpression<guardYield>

UpdateExpression<guardYield> =
| LeftHandSideExpression<guardYield> -- alt1
| LeftHandSideExpression<guardYield> ~lineTerminator "++" -- alt2
| LeftHandSideExpression<guardYield> ~lineTerminator "--" -- alt3
| "++" UnaryExpression<guardYield> -- alt4
| "--" UnaryExpression<guardYield> -- alt5
| LeftHandSideExpression<guardYield> -- alt1

UnaryExpression<guardYield> =
| delete UnaryExpression<guardYield> -- alt2
Expand Down
2 changes: 1 addition & 1 deletion packages/es-grammars/gen/es2017.grammar.ohm
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,11 @@ ES2017 {
| MemberExpression<guardYield, guardAwait> Arguments<guardYield, guardAwait> -- alt1

UpdateExpression<guardYield, guardAwait> =
| LeftHandSideExpression<guardYield, guardAwait> -- alt1
| LeftHandSideExpression<guardYield, guardAwait> ~lineTerminator "++" -- alt2
| LeftHandSideExpression<guardYield, guardAwait> ~lineTerminator "--" -- alt3
| "++" UnaryExpression<guardYield, guardAwait> -- alt4
| "--" UnaryExpression<guardYield, guardAwait> -- alt5
| LeftHandSideExpression<guardYield, guardAwait> -- alt1

UnaryExpression<guardYield, guardAwait> =
| delete UnaryExpression<guardYield, guardAwait> -- alt2
Expand Down
2 changes: 1 addition & 1 deletion packages/es-grammars/gen/es2018.grammar.ohm
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -538,11 +538,11 @@ ES2018 {
| MemberExpression<guardYield, guardAwait> Arguments<guardYield, guardAwait> -- alt1

UpdateExpression<guardYield, guardAwait> =
| LeftHandSideExpression<guardYield, guardAwait> -- alt1
| LeftHandSideExpression<guardYield, guardAwait> ~lineTerminator "++" -- alt2
| LeftHandSideExpression<guardYield, guardAwait> ~lineTerminator "--" -- alt3
| "++" UnaryExpression<guardYield, guardAwait> -- alt4
| "--" UnaryExpression<guardYield, guardAwait> -- alt5
| LeftHandSideExpression<guardYield, guardAwait> -- alt1

UnaryExpression<guardYield, guardAwait> =
| delete UnaryExpression<guardYield, guardAwait> -- alt2
Expand Down
2 changes: 1 addition & 1 deletion packages/es-grammars/gen/es2019.grammar.ohm
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -542,11 +542,11 @@ ES2019 {
| MemberExpression<guardYield, guardAwait> Arguments<guardYield, guardAwait> -- alt1

UpdateExpression<guardYield, guardAwait> =
| LeftHandSideExpression<guardYield, guardAwait> -- alt1
| LeftHandSideExpression<guardYield, guardAwait> ~lineTerminator "++" -- alt2
| LeftHandSideExpression<guardYield, guardAwait> ~lineTerminator "--" -- alt3
| "++" UnaryExpression<guardYield, guardAwait> -- alt4
| "--" UnaryExpression<guardYield, guardAwait> -- alt5
| LeftHandSideExpression<guardYield, guardAwait> -- alt1

UnaryExpression<guardYield, guardAwait> =
| delete UnaryExpression<guardYield, guardAwait> -- alt2
Expand Down
2 changes: 1 addition & 1 deletion packages/es-grammars/gen/es2020.grammar.ohm
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -577,11 +577,11 @@ ES2020 {
| MemberExpression<guardYield, guardAwait> Arguments<guardYield, guardAwait> -- alt1

UpdateExpression<guardYield, guardAwait> =
| LeftHandSideExpression<guardYield, guardAwait> -- alt1
| LeftHandSideExpression<guardYield, guardAwait> ~lineTerminator "++" -- alt2
| LeftHandSideExpression<guardYield, guardAwait> ~lineTerminator "--" -- alt3
| "++" UnaryExpression<guardYield, guardAwait> -- alt4
| "--" UnaryExpression<guardYield, guardAwait> -- alt5
| LeftHandSideExpression<guardYield, guardAwait> -- alt1

UnaryExpression<guardYield, guardAwait> =
| delete UnaryExpression<guardYield, guardAwait> -- alt2
Expand Down
4 changes: 2 additions & 2 deletions packages/es-grammars/gen/es2021.grammar.ohm
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ ES2021 {

decimalIntegerLiteral =
| "0" -- alt1
| nonZeroDigit -- alt2
| nonZeroDigit decimalDigits<withSep>? -- alt2
| nonZeroDigit numericLiteralSeparator? decimalDigits<withSep> -- alt3

decimalDigits<guardSep> =
Expand Down Expand Up @@ -586,11 +586,11 @@ ES2021 {
| MemberExpression<guardYield, guardAwait> Arguments<guardYield, guardAwait> -- alt1

UpdateExpression<guardYield, guardAwait> =
| LeftHandSideExpression<guardYield, guardAwait> -- alt1
| LeftHandSideExpression<guardYield, guardAwait> ~lineTerminator "++" -- alt2
| LeftHandSideExpression<guardYield, guardAwait> ~lineTerminator "--" -- alt3
| "++" UnaryExpression<guardYield, guardAwait> -- alt4
| "--" UnaryExpression<guardYield, guardAwait> -- alt5
| LeftHandSideExpression<guardYield, guardAwait> -- alt1

UnaryExpression<guardYield, guardAwait> =
| delete UnaryExpression<guardYield, guardAwait> -- alt2
Expand Down
7 changes: 7 additions & 0 deletions packages/es-grammars/spec/es2016/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
"postlude": "\n | UpdateExpression<guardYield> -- alt1",
"replacement": ""
},
{
"_comment_": " Move LeftHandSideExpression to the very end.",
"name": "UpdateExpression",
"pattern": " | LeftHandSideExpression<guardYield> -- alt1\n",
"postlude": "\n | LeftHandSideExpression<guardYield> -- alt1",
"replacement": ""
},
{
"_comment_": " The first alternative is a subset of the second one, so flip the order.",
"name": "ConditionalExpression",
Expand Down
7 changes: 7 additions & 0 deletions packages/es-grammars/spec/es2017/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
"postlude": "\n | UpdateExpression<guardYield, guardAwait> -- alt1",
"replacement": ""
},
{
"_comment_": " Move LeftHandSideExpression to the very end.",
"name": "UpdateExpression",
"pattern": " | LeftHandSideExpression<guardYield, guardAwait> -- alt1\n",
"postlude": "\n | LeftHandSideExpression<guardYield, guardAwait> -- alt1",
"replacement": ""
},
{
"_comment_": "The first alternative is a subset of the second one, so flip the order.",
"name": "ConditionalExpression",
Expand Down
7 changes: 7 additions & 0 deletions packages/es-grammars/spec/es2018/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
"postlude": "\n | UpdateExpression<guardYield, guardAwait> -- alt1",
"replacement": ""
},
{
"_comment_": " Move LeftHandSideExpression to the very end.",
"name": "UpdateExpression",
"pattern": " | LeftHandSideExpression<guardYield, guardAwait> -- alt1\n",
"postlude": "\n | LeftHandSideExpression<guardYield, guardAwait> -- alt1",
"replacement": ""
},
{
"_comment_": "The first alternative is a subset of the second one, so flip the order.",
"name": "ConditionalExpression",
Expand Down
7 changes: 7 additions & 0 deletions packages/es-grammars/spec/es2019/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
"postlude": "\n | UpdateExpression<guardYield, guardAwait> -- alt1",
"replacement": ""
},
{
"_comment_": " Move LeftHandSideExpression to the very end.",
"name": "UpdateExpression",
"pattern": " | LeftHandSideExpression<guardYield, guardAwait> -- alt1\n",
"postlude": "\n | LeftHandSideExpression<guardYield, guardAwait> -- alt1",
"replacement": ""
},
{
"_comment_": "The first alternative is a subset of the second one, so flip the order.",
"name": "ConditionalExpression",
Expand Down
7 changes: 7 additions & 0 deletions packages/es-grammars/spec/es2020/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@
"postlude": "\n | UpdateExpression<guardYield, guardAwait> -- alt1",
"replacement": ""
},
{
"_comment_": " Move LeftHandSideExpression to the very end.",
"name": "UpdateExpression",
"pattern": " | LeftHandSideExpression<guardYield, guardAwait> -- alt1\n",
"postlude": "\n | LeftHandSideExpression<guardYield, guardAwait> -- alt1",
"replacement": ""
},
{
"_comment_": "The first alternative is a subset of the second one, so flip the order.",
"name": "ConditionalExpression",
Expand Down
12 changes: 12 additions & 0 deletions packages/es-grammars/spec/es2021/overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
"pattern": "| \"*\" postAsteriskCommentChars?",
"replacement": "| \"*\" ~\"/\" postAsteriskCommentChars?"
},
{
"name": "decimalIntegerLiteral",
"pattern": "| nonZeroDigit -- alt2",
"replacement": "| nonZeroDigit decimalDigits<withSep>? -- alt2"
},
{
"name": "LeftHandSideExpression",
"pattern": "| NewExpression<guardYield, guardAwait>\n | CallExpression<guardYield, guardAwait>",
Expand Down Expand Up @@ -58,6 +63,13 @@
"postlude": "\n | UpdateExpression<guardYield, guardAwait> -- alt1",
"replacement": ""
},
{
"_comment_": " Move LeftHandSideExpression to the very end.",
"name": "UpdateExpression",
"pattern": " | LeftHandSideExpression<guardYield, guardAwait> -- alt1\n",
"postlude": "\n | LeftHandSideExpression<guardYield, guardAwait> -- alt1",
"replacement": ""
},
{
"_comment_": "The first alternative is a subset of the second one, so flip the order.",
"name": "ConditionalExpression",
Expand Down