regex cleanup -- eliminating some lookahead because Ruby regexps blow chunks (stackoverflows) when you look (ahead) at them funny.

This commit is contained in:
Jeremy Ashkenas
2009-12-30 20:36:47 -05:00
parent c8711b419e
commit d43d491561

View File

@@ -24,10 +24,10 @@ module CoffeeScript
JS = /\A(``|`(.*?)[^\\]`)/m
OPERATOR = /\A([+\*&|\/\-%=<>:!]+)/
WHITESPACE = /\A([ \t]+)/
COMMENT = /\A((#[^\n]*(\s(?=#))*)+)/m
COMMENT = /\A(((\n[ \t]*)?#.*$)+)/
CODE = /\A(=>)/
REGEX = /\A(\/(.*?)[^\\]\/[imgy]{0,4})/
MULTI_DENT = /\A((\n+([ \t]*(?=\S))?)+)/
MULTI_DENT = /\A((\n([ \t]*(?=[^$]))?)+)/
LAST_DENT = /\n+([ \t]*)\Z/
# Token cleaning regexes.