Browse Source

fixed iterator used as a left operand

Nicolas Cannasse 13 năm trước cách đây
mục cha
commit
8642e77b37
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      genjs.ml

+ 5 - 0
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);