Skip to content

Commit

Permalink
Avoid parsing 0.1l
Browse files Browse the repository at this point in the history
  • Loading branch information
Eloitor committed Mar 6, 2024
1 parent 22d3f87 commit 6784c76
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 34 deletions.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ module.exports = grammar({
seq(optional(digits), '.', digits, optional(exponent)),
seq(digits, exponent),
),
optional(choice(/[Ll]/, /[jJ]/)),
optional(/[jJ]/),
));
},

Expand Down
13 changes: 2 additions & 11 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 8 additions & 16 deletions src/parser.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions test/corpus/literals.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ Floats
1_1.
1e+3_4j
.3e1_4
1_0.l
.1l

--------------------------------------------------------------------------------

Expand All @@ -82,10 +80,6 @@ Floats
(float))
(expression_statement
(float))
(expression_statement
(float))
(expression_statement
(float))
(expression_statement
(float)))

Expand Down

0 comments on commit 6784c76

Please sign in to comment.