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:
parent
55bf0a2c61
commit
bc6ec37272
1 changed files with 2 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue