From 7690dce3f6f3d53697fa97cdc5241dd7465b22cf Mon Sep 17 00:00:00 2001 From: Ratstail91 Date: Mon, 31 Jul 2023 17:26:07 +1000 Subject: [PATCH] Fixed casting and grouping --- source/toy_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/toy_parser.c b/source/toy_parser.c index 557be42..3bb96a5 100644 --- a/source/toy_parser.c +++ b/source/toy_parser.c @@ -751,7 +751,7 @@ static Toy_Opcode fnCall(Toy_Parser* parser, Toy_ASTNode** nodeHandle) { //wait - is the previous token a type? this should be casting instead if (parser->previous.type >= TOY_TOKEN_NULL && parser->previous.type <= TOY_TOKEN_ANY) { //casting value - parsePrecedence(parser, nodeHandle, PREC_TERM); + parsePrecedence(parser, nodeHandle, PREC_CALL); return TOY_OP_TYPE_CAST; //opcode value }