forked from ground/ground
Small changes
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
|
|
||||||
typedef enum GroundInstType {
|
typedef enum GroundInstType {
|
||||||
IF, JUMP, END, INPUT, PRINT, PRINTLN, SET, GETTYPE, EXISTS, SETLIST, SETLISTAT, GETLISTAT, GETLISTSIZE, LISTAPPEND, GETSTRSIZE, GETSTRCHARAT, ADD, SUBTRACT, MULTIPLY, DIVIDE, EQUAL, INEQUAL, NOT, GREATER, LESSER, STOI, STOD, ITOC, CTOI, TOSTRING, FUN, RETURN, ENDFUN, PUSHARG, CALL, STRUCT, ENDSTRUCT, INIT, GETFIELD, SETFIELD, USE, EXTERN, CREATELABEL, PAUSE, DROP, ERRORCMD
|
IF, JUMP, END, INPUT, PRINT, PRINTLN, SET, GETTYPE, EXISTS, SETLIST, SETLISTAT, GETLISTAT, GETLISTSIZE, LISTAPPEND, GETSTRSIZE, GETSTRCHARAT, ADD, SUBTRACT, MULTIPLY, DIVIDE, EQUAL, INEQUAL, NOT, GREATER, LESSER, AND, OR, XOR, NEG, SHIFT, STOI, STOD, ITOC, CTOI, TOSTRING, FUN, RETURN, ENDFUN, PUSHARG, CALL, STRUCT, ENDSTRUCT, INIT, GETFIELD, SETFIELD, USE, EXTERN, CREATELABEL, PAUSE, DROP, LICENSE, ERRORCMD
|
||||||
} GroundInstType;
|
} GroundInstType;
|
||||||
|
|
||||||
typedef enum GroundValueType {
|
typedef enum GroundValueType {
|
||||||
|
|||||||
@@ -2106,7 +2106,7 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop
|
|||||||
runtimeError(TOO_MANY_ARGS, "Expecting 3 args", in, currentInstruction);
|
runtimeError(TOO_MANY_ARGS, "Expecting 3 args", in, currentInstruction);
|
||||||
}
|
}
|
||||||
if (in->args.args[0].type != VALUE) {
|
if (in->args.args[0].type != VALUE) {
|
||||||
runtimeError(ARG_TYPE_MISMATCH, "Expecting an Object for arg 1", in, currentInstruction);
|
runtimeError(ARG_TYPE_MISMATCH, "Expecting a Value for arg 1", in, currentInstruction);
|
||||||
}
|
}
|
||||||
if (in->args.args[0].value.value.type != CUSTOM) {
|
if (in->args.args[0].value.value.type != CUSTOM) {
|
||||||
runtimeError(ARG_TYPE_MISMATCH, "Expecting an Object for arg 1", in, currentInstruction);
|
runtimeError(ARG_TYPE_MISMATCH, "Expecting an Object for arg 1", in, currentInstruction);
|
||||||
|
|||||||
@@ -540,6 +540,12 @@ void printGroundInstruction(GroundInstruction* gi) {
|
|||||||
case INIT:
|
case INIT:
|
||||||
printf("init");
|
printf("init");
|
||||||
break;
|
break;
|
||||||
|
case SETFIELD:
|
||||||
|
printf("setfield");
|
||||||
|
break;
|
||||||
|
case GETFIELD:
|
||||||
|
printf("getfield");
|
||||||
|
break;
|
||||||
case USE:
|
case USE:
|
||||||
printf("use");
|
printf("use");
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user