Skip to content

Commit 301324a

Browse files
committed
clarify numeric literals
1 parent 9844555 commit 301324a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/spec.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ fragment EXP
303303

304304
Number literals follow the same syntax rules as numeric values in JSON with three exceptions:
305305

306-
1. Number literals may omit a leading zero. For example, `.123` is not valid JSON, but is allowed as a number literal.
307-
2. Number literals may include a leading zero. For example, `0123` is not valid JSON, but is allowed as a number literal.
306+
1. Number literals may omit a leading zero before the decimal point. For example, `.123` is not valid JSON, but is allowed as a number literal.
307+
2. Number literals may include leading zeros ahead of the integral part of the number. For example, `0123` is not valid JSON, but is allowed as a number literal.
308308
3. The grammar construction for a number literal does not include a minus sign. Literal expressions are made negative by prefixing them with a unary minus.
309309

310310
Note that number literals (and JSON numbers) allow scientific notation.

0 commit comments

Comments
 (0)