1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Fixing implicit object literals with leading string keys.

This commit is contained in:
Jeremy Ashkenas 2010-08-11 21:41:29 -04:00
parent ba02ebc3dc
commit 2ec857ef8d
3 changed files with 3 additions and 3 deletions

View file

@ -595,7 +595,7 @@
STRING_NEWLINES = /\n[ \t]*/g;
NO_NEWLINE = /^([+\*&|\/\-%=<>!.\\][<>=&|]*|and|or|is|isnt|not|delete|typeof|instanceof)$/;
HEREDOC_INDENT = /(\n+([ \t]*)|^([ \t]+))/g;
ASSIGNED = /^\s*([a-zA-Z\$_@]\w*[ \t]*?[:=][^=])/;
ASSIGNED = /^\s*(([a-zA-Z\$_@]\w*|["'][^\r\n]+?["'])[ \t]*?[:=][^=])/;
NEXT_CHARACTER = /^\s*(\S)/;
NOT_REGEX = ['NUMBER', 'REGEX', '++', '--', 'FALSE', 'NULL', 'TRUE', ']'];
CALLABLE = ['IDENTIFIER', 'SUPER', ')', ']', '}', 'STRING', '@', 'THIS', '?', '::'];

View file

@ -531,7 +531,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 = /^\s*([a-zA-Z\$_@]\w*[ \t]*?[:=][^=])/
ASSIGNED = /^\s*(([a-zA-Z\$_@]\w*|["'][^\r\n]+?["'])[ \t]*?[:=][^=])/
NEXT_CHARACTER = /^\s*(\S)/
# Tokens which a regular expression will never immediately follow, but which

View file

@ -167,7 +167,7 @@ ok obj.fn() is null
# Implicit objects with wacky indentation:
obj =
reverse: (obj) ->
'reverse': (obj) ->
Array.prototype.reverse.call obj
abc: ->
@reverse(