Skip to content

Commit

Permalink
fixed iterator used as a left operand
Browse files Browse the repository at this point in the history
  • Loading branch information
ncannasse committed Jun 6, 2012
1 parent 016b40b commit 8642e77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions genjs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,11 @@ and gen_expr ctx e =
spr ctx "[";
gen_value ctx e2;
spr ctx "]";
| TBinop (op,{ eexpr = TField (x,"iterator") },e2) ->
gen_value ctx x;
spr ctx (field "iterator");
print ctx " %s " (Ast.s_binop op);
gen_value ctx e2;
| TBinop (op,e1,e2) ->
gen_value ctx e1;
print ctx " %s " (Ast.s_binop op);
Expand Down

0 comments on commit 8642e77

Please sign in to comment.