allow _ in post-decimal-point section (#118)

Fixes: https://github.com/kdl-org/kdl/issues/69
This commit is contained in:
Kat Marchán 2021-08-31 20:39:17 -07:00 committed by GitHub
parent 3f739cad42
commit 37c0a38baa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -229,7 +229,7 @@ There are four syntaxes for Numbers: Decimal, Hexadecimal, Octal, and Binary.
* Decimal numbers are a bit more special:
* They have no radix prefix.
* They use digits `0` through `9`, which may be separated by `_`.
* They may optionally include a decimal separator `.`, followed by more digits.
* They may optionally include a decimal separator `.`, followed by more digits, which may again be separated by `_`.
* They may optionally be followed by `E` or `e`, an optional `-` or `+`, and more digits, to represent an exponent value.
### Boolean
@ -329,7 +329,7 @@ raw-string-quotes := '"' .* '"'
number := decimal | hex | octal | binary
decimal := integer ('.' [0-9]+)? exponent?
decimal := integer ('.' [0-9] [0-9_]*)? exponent?
exponent := ('e' | 'E') integer
integer := sign? [0-9] [0-9_]*
sign := '+' | '-'