Skip to content

Commit

Permalink
fix: correctly parse identifiers which start with numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
mkantor committed Dec 5, 2021
1 parent 630c780 commit 0772349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/grammar.pest
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ literal = { string_literal |

null_literal = @{ "null" ~ !symbol_char }
boolean_literal = @{ ("true"|"false") ~ !symbol_char }
number_literal = @{ "-"? ~ ASCII_DIGIT+ ~ "."? ~ ASCII_DIGIT* ~ ("E" ~ "-"? ~ ASCII_DIGIT+)? }
number_literal = @{ "-"? ~ ASCII_DIGIT+ ~ "."? ~ ASCII_DIGIT* ~ ("E" ~ "-"? ~ ASCII_DIGIT+)? ~ !symbol_char }
json_char_double_quote = {
!("\"" | "\\") ~ ANY
| "\\" ~ ("\"" | "\\" | "/" | "b" | "f" | "n" | "r" | "t")
Expand Down

0 comments on commit 0772349

Please sign in to comment.