don't treat assignment/update as expression (#26)

This commit is contained in:
leaf corcoran 2012-01-10 21:38:45 -08:00
parent 1bedf81ca8
commit 3a2b92e5d3

View File

@ -279,7 +279,7 @@ local build_grammar = wrap_env(function()
Line = (CheckIndent * Statement + Space * #Stop),
Statement = (Import + While + With + For + ForEach + Switch + Return
+ ClassDecl + Export + BreakLoop + Ct(ExpList) / flatten_or_mark"explist" * Space) * ((
+ ClassDecl + Export + BreakLoop + Assign + Update + Ct(ExpList) / flatten_or_mark"explist" * Space) * ((
-- statement decorators
key"if" * Exp * (key"else" * Exp)^-1 * Space / mark"if" +
CompInner / mark"comprehension"
@ -356,7 +356,7 @@ local build_grammar = wrap_env(function()
TblComprehension +
TableLit +
Comprehension +
Assign + Update + FunLit + String +
FunLit + String +
Num,
ChainValue = -- a function call or an object access