mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Fixed casting + grouping, resolved #67
This commit is contained in:
@@ -757,7 +757,7 @@ static Toy_Opcode fnCall(Toy_Parser* parser, Toy_ASTNode** nodeHandle) {
|
||||
|
||||
//casting value
|
||||
Toy_ASTNode* rhsNode = NULL;
|
||||
grouping(parser, &rhsNode);
|
||||
parsePrecedence(parser, &rhsNode, PREC_TERNARY);
|
||||
|
||||
//emit the cast node
|
||||
|
||||
@@ -766,6 +766,8 @@ static Toy_Opcode fnCall(Toy_Parser* parser, Toy_ASTNode** nodeHandle) {
|
||||
//pass it off to the caller
|
||||
*nodeHandle = lhsNode;
|
||||
|
||||
consume(parser, TOY_TOKEN_PAREN_RIGHT, "Expected ')' at end of cast grouping");
|
||||
|
||||
return TOY_OP_GROUPING_BEGIN; //dummy value
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user