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:
parent
ba02ebc3dc
commit
2ec857ef8d
3 changed files with 3 additions and 3 deletions
|
@ -595,7 +595,7 @@
|
||||||
STRING_NEWLINES = /\n[ \t]*/g;
|
STRING_NEWLINES = /\n[ \t]*/g;
|
||||||
NO_NEWLINE = /^([+\*&|\/\-%=<>!.\\][<>=&|]*|and|or|is|isnt|not|delete|typeof|instanceof)$/;
|
NO_NEWLINE = /^([+\*&|\/\-%=<>!.\\][<>=&|]*|and|or|is|isnt|not|delete|typeof|instanceof)$/;
|
||||||
HEREDOC_INDENT = /(\n+([ \t]*)|^([ \t]+))/g;
|
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)/;
|
NEXT_CHARACTER = /^\s*(\S)/;
|
||||||
NOT_REGEX = ['NUMBER', 'REGEX', '++', '--', 'FALSE', 'NULL', 'TRUE', ']'];
|
NOT_REGEX = ['NUMBER', 'REGEX', '++', '--', 'FALSE', 'NULL', 'TRUE', ']'];
|
||||||
CALLABLE = ['IDENTIFIER', 'SUPER', ')', ']', '}', 'STRING', '@', 'THIS', '?', '::'];
|
CALLABLE = ['IDENTIFIER', 'SUPER', ')', ']', '}', 'STRING', '@', 'THIS', '?', '::'];
|
||||||
|
|
|
@ -531,7 +531,7 @@ MULTILINER = /\n/g
|
||||||
STRING_NEWLINES = /\n[ \t]*/g
|
STRING_NEWLINES = /\n[ \t]*/g
|
||||||
NO_NEWLINE = /^([+\*&|\/\-%=<>!.\\][<>=&|]*|and|or|is|isnt|not|delete|typeof|instanceof)$/
|
NO_NEWLINE = /^([+\*&|\/\-%=<>!.\\][<>=&|]*|and|or|is|isnt|not|delete|typeof|instanceof)$/
|
||||||
HEREDOC_INDENT = /(\n+([ \t]*)|^([ \t]+))/g
|
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)/
|
NEXT_CHARACTER = /^\s*(\S)/
|
||||||
|
|
||||||
# Tokens which a regular expression will never immediately follow, but which
|
# Tokens which a regular expression will never immediately follow, but which
|
||||||
|
|
|
@ -167,7 +167,7 @@ ok obj.fn() is null
|
||||||
|
|
||||||
# Implicit objects with wacky indentation:
|
# Implicit objects with wacky indentation:
|
||||||
obj =
|
obj =
|
||||||
reverse: (obj) ->
|
'reverse': (obj) ->
|
||||||
Array.prototype.reverse.call obj
|
Array.prototype.reverse.call obj
|
||||||
abc: ->
|
abc: ->
|
||||||
@reverse(
|
@reverse(
|
||||||
|
|
Loading…
Add table
Reference in a new issue