fixing issue #427 -- incorrect stringification of reserved word
This commit is contained in:
parent
c57ebffe6f
commit
e81810d845
|
@ -607,7 +607,7 @@
|
|||
STRING_NEWLINES = /\n[ \t]*/g;
|
||||
NO_NEWLINE = /^([+\*&|\/\-%=<>:!.\\][<>=&|]*|and|or|is|isnt|not|delete|typeof|instanceof)$/;
|
||||
HEREDOC_INDENT = /(\n+([ \t]*)|^([ \t]+))/g;
|
||||
ASSIGNED = /^([a-zA-Z\$_]\w*[ \t]*?[:=])/;
|
||||
ASSIGNED = /^([a-zA-Z\$_]\w*[ \t]*?[:=][^=])/;
|
||||
NEXT_CHARACTER = /^\s*(\S)/;
|
||||
NOT_REGEX = ['NUMBER', 'REGEX', '++', '--', 'FALSE', 'NULL', 'TRUE', ']'];
|
||||
CALLABLE = ['IDENTIFIER', 'SUPER', ')', ']', '}', 'STRING', '@', 'THIS', '?', '::'];
|
||||
|
|
|
@ -530,7 +530,7 @@ MULTILINER : /\n/g
|
|||
STRING_NEWLINES : /\n[ \t]*/g
|
||||
NO_NEWLINE : /^([+\*&|\/\-%=<>:!.\\][<>=&|]*|and|or|is|isnt|not|delete|typeof|instanceof)$/
|
||||
HEREDOC_INDENT : /(\n+([ \t]*)|^([ \t]+))/g
|
||||
ASSIGNED : /^([a-zA-Z\$_]\w*[ \t]*?[:=])/
|
||||
ASSIGNED : /^([a-zA-Z\$_]\w*[ \t]*?[:=][^=])/
|
||||
NEXT_CHARACTER : /^\s*(\S)/
|
||||
|
||||
# Tokens which a regular expression will never immediately follow, but which
|
||||
|
|
|
@ -114,3 +114,10 @@ obj: {class: 'höt'}
|
|||
obj.function: 'dog'
|
||||
|
||||
ok obj.class + obj.function is 'hötdog'
|
||||
|
||||
|
||||
# But keyword assignment should be smart enough not to stringify variables.
|
||||
func: ->
|
||||
this == 'this'
|
||||
|
||||
ok func() is false
|
||||
|
|
Loading…
Reference in New Issue