big commit -- adding back object comprehensions, using 'ino', versus 'in' for array comprehensions, fixing bug with dollar signs in identifiers

This commit is contained in:
Jeremy Ashkenas
2010-01-10 15:52:23 -05:00
parent 13fc8aea04
commit 902febb43a
18 changed files with 200 additions and 58 deletions

View File

@@ -12,14 +12,14 @@ module CoffeeScript
"new", "return",
"try", "catch", "finally", "throw",
"break", "continue",
"for", "in", "by", "where", "while",
"for", "in", "ino", "by", "where", "while",
"switch", "when",
"super", "extends",
"arguments",
"delete", "instanceof", "typeof"]
# Token matching regexes.
IDENTIFIER = /\A([a-zA-Z$_]\w*)/
IDENTIFIER = /\A([a-zA-Z$_](\w|\$)*)/
NUMBER = /\A(\b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?(e[+\-]?[0-9]+)?)))\b/i
STRING = /\A(""|''|"(.*?)([^\\]|\\\\)"|'(.*?)([^\\]|\\\\)')/m
JS = /\A(``|`(.*?)([^\\]|\\\\)`)/m