From 8642e77b375f99845ddc83ed0c379d44d6d6f2f8 Mon Sep 17 00:00:00 2001 From: Nicolas Cannasse Date: Wed, 6 Jun 2012 14:34:03 +0000 Subject: [PATCH] fixed iterator used as a left operand --- genjs.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/genjs.ml b/genjs.ml index 88a5d198387..f0807589ce2 100644 --- a/genjs.ml +++ b/genjs.ml @@ -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);