fixing Lexer#ASSIGNED

This commit is contained in:
Jeremy Ashkenas 2010-11-14 14:44:20 -05:00
parent be17b8215c
commit a1aaa4495c
3 changed files with 11 additions and 2 deletions

View File

@ -623,7 +623,7 @@
HEREGEX_OMIT = /\s+(?:#.*)?/g;
MULTILINER = /\n/g;
HEREDOC_INDENT = /\n+([^\n\S]*)/g;
ASSIGNED = /^\s*@?[$A-Za-z_][$\w]*[^\n\S]*?[:=][^:=>]/;
ASSIGNED = /^\s*@?([$A-Za-z_][$\w]*|['"].*['"])[^\n\S]*?[:=][^:=>]/;
LINE_CONTINUER = /^\s*(?:,|\??\.(?!\.)|::)/;
LEADING_SPACES = /^\s+/;
TRAILING_SPACES = /\s+$/;

View File

@ -597,7 +597,7 @@ MULTILINER = /\n/g
HEREDOC_INDENT = /\n+([^\n\S]*)/g
ASSIGNED = /^\s*@?[$A-Za-z_][$\w]*[^\n\S]*?[:=][^:=>]/
ASSIGNED = /^\s*@?([$A-Za-z_][$\w]*|['"].*['"])[^\n\S]*?[:=][^:=>]/
LINE_CONTINUER = /// ^ \s* (?: , | \??\.(?!\.) | :: ) ///

View File

@ -264,3 +264,12 @@ eq ok, obj.key
#764: Boolean/Number should be indexable.
ok 42['toString']
ok on['toString']
# String-keyed objects shouldn't suppress newlines.
one =
'>!': 3
six: -> 10
ok not one.six