diff --git a/lib/nodes.js b/lib/nodes.js index b93ca09d..602eb0cd 100644 --- a/lib/nodes.js +++ b/lib/nodes.js @@ -1886,7 +1886,7 @@ TRAILING_WHITESPACE = /[ \t]+$/gm; IDENTIFIER = /^[a-zA-Z\$_](\w|\$)*$/; NUMBER = /^(((\b0(x|X)[0-9a-fA-F]+)|((\b[0-9]+(\.[0-9]+)?|\.[0-9]+)(e[+\-]?[0-9]+)?)))\b$/i; - SIMPLENUM = /^-?\d+/; + SIMPLENUM = /^-?\d+$/; IS_STRING = /^['"]/; literal = function(name) { return new LiteralNode(name); diff --git a/src/nodes.coffee b/src/nodes.coffee index 0dd4b957..e2b56290 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -1605,7 +1605,7 @@ TRAILING_WHITESPACE = /[ \t]+$/gm # Keep these identifier regexes in sync with the Lexer. IDENTIFIER = /^[a-zA-Z\$_](\w|\$)*$/ NUMBER = /^(((\b0(x|X)[0-9a-fA-F]+)|((\b[0-9]+(\.[0-9]+)?|\.[0-9]+)(e[+\-]?[0-9]+)?)))\b$/i -SIMPLENUM = /^-?\d+/ +SIMPLENUM = /^-?\d+$/ # Is a literal value a string? IS_STRING = /^['"]/