mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 19:34:27 -05:00
regex cleanup -- eliminating some lookahead because Ruby regexps blow chunks (stackoverflows) when you look (ahead) at them funny.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user