diff --git a/src/interpreter.c b/src/interpreter.c index fa3ec3f..e5e4e95 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -1,5 +1,6 @@ #include "interpreter.h" +#include #include static int CallFrame_Create(CallFrame* self, FlupFunction* self_function) @@ -499,14 +500,20 @@ int Interpreter_ExecuteNext(Interpreter* self, size_t stop_token) case TOKENTYPE_GREATERTHAN: case TOKENTYPE_GREATEREQUAL: case TOKENTYPE_COMMA: + case TOKENTYPE_BIND: + case TOKENTYPE_AS: + case TOKENTYPE_LEFT_PAREN: + case TOKENTYPE_RIGHT_PAREN: + fprintf(stderr, "Unexpected token with type: %s\n, continuing with next token...\n", TokenType_ToString(t->type)); + top_frame->instruction_pointer++; break; case TOKENTYPE_NONE: case TOKENTYPE_ERROR: return EXIT_FAILURE; - } + } - return EXIT_SUCCESS; + return EXIT_SUCCESS; } bool Value_IsTruthy(Value* v)