Parcourir la source

Update compiler.h

blueloveTH il y a 3 ans
Parent
commit
bf26464089
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      src/compiler.h

+ 2 - 1
src/compiler.h

@@ -804,7 +804,8 @@ __LISTCOMP:
     }
     }
 
 
     void compile_for_loop() {
     void compile_for_loop() {
-        EXPR_FOR_VARS();consume(TK("in")); EXPR_TUPLE();
+        EXPR_FOR_VARS();consume(TK("in"));
+        co()->_rvalue = true; EXPR_TUPLE(); co()->_rvalue = false;
         emit(OP_GET_ITER);
         emit(OP_GET_ITER);
         co()->_enter_block(FOR_LOOP);
         co()->_enter_block(FOR_LOOP);
         emit(OP_FOR_ITER);
         emit(OP_FOR_ITER);