Fix negative number parse. #86
This commit is contained in:
parent
4875c421e4
commit
b15459f20f
|
@ -2,7 +2,7 @@ WHITESPACE = _{ " " | "," | "\t" | "\u{feff}" | NEWLINE }
|
|||
COMMENT = _{ "#" ~ (!"\n" ~ ANY)* }
|
||||
|
||||
// value
|
||||
int = @{ "-"? ~ "0" | ASCII_NONZERO_DIGIT ~ ASCII_DIGIT* }
|
||||
int = @{ "-"? ~ ("0" | (ASCII_NONZERO_DIGIT ~ ASCII_DIGIT*)) }
|
||||
float = @{ "-"? ~ int ~ "." ~ ASCII_DIGIT+ ~ exp? }
|
||||
exp = @{ ("E" | "e") ~ ("+" | "-")? ~ ASCII_DIGIT+ }
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
query {
|
||||
node(id: 1)
|
||||
node2(id: -1, id1: -0, id2: 0, id3: -1.23, id4: 1.23, id5: 1.23e+2, id6: 1.23e+2, id7: 0.123)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user