From bc6ec37272a20200f5ed86b50164f87300d1b3b7 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Fri, 25 Dec 2009 07:42:27 -0800 Subject: [PATCH] allowing = to assign --- lib/coffee_script/grammar.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/coffee_script/grammar.y b/lib/coffee_script/grammar.y index 9ca0af20..d0e82c25 100644 --- a/lib/coffee_script/grammar.y +++ b/lib/coffee_script/grammar.y @@ -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.