Browse Source

minor fixed assertion in compiler

albertodemichelis 8 years ago
parent
commit
14cbc7b2dc
1 changed files with 3 additions and 0 deletions
  1. 3 0
      squirrel/sqcompiler.cpp

+ 3 - 0
squirrel/sqcompiler.cpp

@@ -466,6 +466,7 @@ public:
         INVOKE_EXP(f);
         INVOKE_EXP(f);
         SQInteger op1 = _fs->PopTarget();SQInteger op2 = _fs->PopTarget();
         SQInteger op1 = _fs->PopTarget();SQInteger op2 = _fs->PopTarget();
         _fs->AddInstruction(op, _fs->PushTarget(), op1, op2, op3);
         _fs->AddInstruction(op, _fs->PushTarget(), op1, op2, op3);
+		_es.etype = EXPR;
     }
     }
     void LogicalOrExp()
     void LogicalOrExp()
     {
     {
@@ -482,6 +483,7 @@ public:
             if(trg != second_exp) _fs->AddInstruction(_OP_MOVE, trg, second_exp);
             if(trg != second_exp) _fs->AddInstruction(_OP_MOVE, trg, second_exp);
             _fs->SnoozeOpt();
             _fs->SnoozeOpt();
             _fs->SetIntructionParam(jpos, 1, (_fs->GetCurrentPos() - jpos));
             _fs->SetIntructionParam(jpos, 1, (_fs->GetCurrentPos() - jpos));
+			_es.etype = EXPR;
             break;
             break;
         }else return;
         }else return;
     }
     }
@@ -501,6 +503,7 @@ public:
             if(trg != second_exp) _fs->AddInstruction(_OP_MOVE, trg, second_exp);
             if(trg != second_exp) _fs->AddInstruction(_OP_MOVE, trg, second_exp);
             _fs->SnoozeOpt();
             _fs->SnoozeOpt();
             _fs->SetIntructionParam(jpos, 1, (_fs->GetCurrentPos() - jpos));
             _fs->SetIntructionParam(jpos, 1, (_fs->GetCurrentPos() - jpos));
+			_es.etype = EXPR;
             break;
             break;
             }
             }