Skip to content

Commit

Permalink
fix(float): fix floating parse
Browse files Browse the repository at this point in the history
Signed-off-by: loongtao.zhang <[email protected]>
  • Loading branch information
cathaysia committed Aug 16, 2024
1 parent dd44f5f commit b079314
Show file tree
Hide file tree
Showing 4 changed files with 18,620 additions and 18,496 deletions.
8 changes: 7 additions & 1 deletion common/literal.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ exports.rules = {
hex_number: $ => /0x[0-9a-fA-F]+/i,
// 7.2.6.4 Floating-point Literals
floating_pt_literal: $ =>
seq(optional($.integer_sign), $.dec_number, '.', $.dec_number, /e/i),
seq(
optional($.integer_sign),
$.dec_number,
'.',
$.dec_number,
optional(/e/i),
),
// 7.2.6.5 Fixed-Point Literals
fixed_pt_literal: $ =>
seq(optional($.integer_sign), $.dec_number, '.', $.dec_number, /d/i),
Expand Down
14 changes: 11 additions & 3 deletions src/grammar.json

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

Loading

0 comments on commit b079314

Please sign in to comment.