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 7217182
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 31 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.

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

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

Expand All @@ -84,8 +83,6 @@ Floats
(float))
(expression_statement
(float))
(expression_statement
(float))
(expression_statement
(float)))

Expand Down

0 comments on commit 7217182

Please sign in to comment.