From d1a0d06573d9aa53cf4ce6dfa38b924ed230ccdf Mon Sep 17 00:00:00 2001 From: matt pearson Date: Sun, 25 Oct 2020 13:46:54 -0500 Subject: [PATCH] Add support for NaN values --- commentjson/commentjson.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commentjson/commentjson.py b/commentjson/commentjson.py index 63f1081..4073d91 100755 --- a/commentjson/commentjson.py +++ b/commentjson/commentjson.py @@ -36,7 +36,7 @@ ?value: object | array | string - | SIGNED_NUMBER -> number + | SIGNED_NUMBER_NAN -> number | "true" -> true | "false" -> false | "null" -> null @@ -48,6 +48,8 @@ COMMENT: /(#|\\/\\/)[^\\n]*/ TRAILING_COMMA: "," + SIGNED_NUMBER_NAN: SIGNED_NUMBER | "NaN" + %import common.ESCAPED_STRING %import common.SIGNED_NUMBER %import common.WS