From 99748b02c4c1a1ab0a44437effc7d596009eaff8 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Fri, 30 Jan 2015 01:36:03 +0900 Subject: [PATCH] Fix grammar to valiate JSON numbers. --- grammars/json.cson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammars/json.cson b/grammars/json.cson index 0d3f375..5757f00 100644 --- a/grammars/json.cson +++ b/grammars/json.cson @@ -42,7 +42,7 @@ 'name': 'constant.language.json' 'number': 'comment': 'handles integer and decimal numbers' - 'match': '(?x: # turn on extended mode\n\t\t\t -? # an optional minus\n\t\t\t (?:\n\t\t\t 0 # a zero\n\t\t\t | # ...or...\n\t\t\t [1-9] # a 1-9 character\n\t\t\t \\d* # followed by zero or more digits\n\t\t\t )\n\t\t\t (?:\n\t\t\t (?:\n\t\t\t \\. # a period\n\t\t\t \\d+ # followed by one or more digits\n\t\t\t )?\n\t\t\t (?:\n\t\t\t [eE] # an e character\n\t\t\t [+-]? # followed by an option +/-\n\t\t\t \\d+ # followed by one or more digits\n\t\t\t )? # make exponent optional\n\t\t\t )? # make decimal portion optional\n\t\t\t )' + 'match': '-?(?=[1-9]|0(?!\\d))\\d+(\\.\\d+)?([eE][+-]?\\d+)?' 'name': 'constant.numeric.json' 'object': 'begin': '\\{'