supporting escaped quotes in strings

This commit is contained in:
Jeremy Ashkenas
2009-12-17 08:26:20 -05:00
parent 962885444e
commit 3dac0f6d84

View File

@@ -11,7 +11,7 @@ class Lexer
IDENTIFIER = /\A([a-zA-Z$_]\w*)/
NUMBER = /\A([0-9]+(\.[0-9]+)?)/
STRING = /\A("(.*?)"|'(.*?)')/m
STRING = /\A("(.*?)[^\\]"|'(.*?)[^\\]')/m
JS = /\A(`(.*?)`)/
OPERATOR = /\A([+\*&|\/\-%=<>]+)/
WHITESPACE = /\A([ \t\r]+)/