mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
Fixes Issue #574 ... number keys in implicit object literals.
This commit is contained in:
@@ -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*|["'][^\r\n]+?["'])[ \t]*?[:=][^=])/;
|
ASSIGNED = /^\s*(([a-zA-Z\$_@]\w*|["'][^\r\n]+?["']|\d+)[ \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*|["'][^\r\n]+?["'])[ \t]*?[:=][^=])/
|
ASSIGNED = /^\s*(([a-zA-Z\$_@]\w*|["'][^\r\n]+?["']|\d+)[ \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
|
||||||
|
|||||||
@@ -197,11 +197,12 @@ ok obj.misdent.toString() is ',,,'
|
|||||||
|
|
||||||
second = (x, y) -> y
|
second = (x, y) -> y
|
||||||
obj = then second 'the',
|
obj = then second 'the',
|
||||||
one: 1
|
1: 1
|
||||||
two:
|
two:
|
||||||
three: ->
|
three: ->
|
||||||
four five,
|
four five,
|
||||||
six: seven
|
six: seven
|
||||||
three: 3
|
three: 3
|
||||||
|
|
||||||
|
ok obj[1] is 1
|
||||||
ok obj.three is 3
|
ok obj.three is 3
|
||||||
Reference in New Issue
Block a user