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

allowing = to assign

This commit is contained in:
Jeremy Ashkenas 2009-12-25 07:42:27 -08:00
parent 55bf0a2c61
commit bc6ec37272

View file

@ -31,7 +31,7 @@ prechigh
left "."
right THROW FOR IN WHILE NEW SUPER
left UNLESS IF ELSE EXTENDS
left ":" '||=' '&&='
left ':' '=' '||=' '&&='
right RETURN
preclow
@ -116,6 +116,7 @@ rule
# Assignment to a variable.
Assign:
Value ":" Expression { result = AssignNode.new(val[0], val[2]) }
| Value "=" Expression { result = AssignNode.new(val[0], val[2]) }
;
# Assignment within an object literal.