mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04: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
|
JS = /\A(``|`(.*?)[^\\]`)/m
|
||||||
OPERATOR = /\A([+\*&|\/\-%=<>:!]+)/
|
OPERATOR = /\A([+\*&|\/\-%=<>:!]+)/
|
||||||
WHITESPACE = /\A([ \t]+)/
|
WHITESPACE = /\A([ \t]+)/
|
||||||
COMMENT = /\A((#[^\n]*(\s(?=#))*)+)/m
|
COMMENT = /\A(((\n[ \t]*)?#.*$)+)/
|
||||||
CODE = /\A(=>)/
|
CODE = /\A(=>)/
|
||||||
REGEX = /\A(\/(.*?)[^\\]\/[imgy]{0,4})/
|
REGEX = /\A(\/(.*?)[^\\]\/[imgy]{0,4})/
|
||||||
MULTI_DENT = /\A((\n+([ \t]*(?=\S))?)+)/
|
MULTI_DENT = /\A((\n([ \t]*(?=[^$]))?)+)/
|
||||||
LAST_DENT = /\n+([ \t]*)\Z/
|
LAST_DENT = /\n+([ \t]*)\Z/
|
||||||
|
|
||||||
# Token cleaning regexes.
|
# Token cleaning regexes.
|
||||||
|
|||||||
Reference in New Issue
Block a user