From 830963c8906091ac6d96a89b846bc207be4b6c6a Mon Sep 17 00:00:00 2001 From: DiamondNether90 Date: Fri, 10 Apr 2026 20:22:54 +1000 Subject: [PATCH] Small changes --- include/groundvm.h | 2 +- src/interpreter.c | 2 +- src/types.c | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/groundvm.h b/include/groundvm.h index 4c52f18..816de02 100644 --- a/include/groundvm.h +++ b/include/groundvm.h @@ -16,7 +16,7 @@ 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; typedef enum GroundValueType { diff --git a/src/interpreter.c b/src/interpreter.c index 3222ee8..4288afe 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -2106,7 +2106,7 @@ GroundValue interpretGroundInstruction(GroundInstruction inst, GroundScope* scop runtimeError(TOO_MANY_ARGS, "Expecting 3 args", in, currentInstruction); } 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) { runtimeError(ARG_TYPE_MISMATCH, "Expecting an Object for arg 1", in, currentInstruction); diff --git a/src/types.c b/src/types.c index 20ee2e7..57f0021 100644 --- a/src/types.c +++ b/src/types.c @@ -540,6 +540,12 @@ void printGroundInstruction(GroundInstruction* gi) { case INIT: printf("init"); break; + case SETFIELD: + printf("setfield"); + break; + case GETFIELD: + printf("getfield"); + break; case USE: printf("use"); break;