added compound statements
This commit is contained in:
@@ -342,6 +342,8 @@ static _Bool step(Runtime *runtime, Error *error)
|
||||
case OPCODE_MUL:
|
||||
case OPCODE_DIV:
|
||||
{
|
||||
assert(opc == 0);
|
||||
|
||||
Object *rop = Stack_Top(runtime->stack, 0);
|
||||
Object *lop = Stack_Top(runtime->stack, -1);
|
||||
|
||||
@@ -363,6 +365,15 @@ static _Bool step(Runtime *runtime, Error *error)
|
||||
break;
|
||||
}
|
||||
|
||||
case OPCODE_POP:
|
||||
{
|
||||
assert(opc == 1);
|
||||
|
||||
if(!Runtime_Pop(runtime, error, ops[0].as_int))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
case OPCODE_PUSHINT:
|
||||
{
|
||||
assert(opc == 1);
|
||||
|
||||
Reference in New Issue
Block a user