JSON5 in dbStatic: Lexer support for NaN and Infinity

The JSON5 spec requires exact capitalization of these strings.
Other numeric parsers such as strtod() are usually more lenient.
This commit is contained in:
Andrew Johnson
2020-07-22 00:23:50 -05:00
parent fe177e40fd
commit 0fca5fc8a9
2 changed files with 10 additions and 1 deletions
@@ -73,4 +73,12 @@ record(x, "t1") {
field(F64, -.123e4)
field(F32, -123.e4)
field(F64, -123.e4)
field(F32, Infinity)
field(F64, Infinity)
field(F32, +Infinity)
field(F64, +Infinity)
field(F32, -Infinity)
field(F64, -Infinity)
field(F32, Nan)
field(F64, Nan)
}