Self-compiler: object literals.

This commit is contained in:
Jeremy Ashkenas
2010-02-09 20:53:25 -05:00
parent 91a7102f11
commit 001c915c21
7 changed files with 403 additions and 175 deletions

View File

@@ -21,7 +21,7 @@ KEYWORDS: [
"super", "extends"
]
# Token matching regexes.
# Token matching regexes. (keep the IDENTIFIER regex in sync with AssignNode.)
IDENTIFIER : /^([a-zA-Z$_](\w|\$)*)/
NUMBER : /^(\b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?(e[+\-]?[0-9]+)?)))\b/i
STRING : /^(""|''|"([\s\S]*?)([^\\]|\\\\)"|'([\s\S]*?)([^\\]|\\\\)')/