mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Found a rare lexer bug
This commit is contained in:
@@ -791,6 +791,11 @@ static Opcode dot(Parser* parser, Node** nodeHandle) {
|
||||
|
||||
parsePrecedence(parser, &node, PREC_CALL);
|
||||
|
||||
if (node == NULL || node->binary.right == NULL) {
|
||||
error(parser, parser->previous, "Expected function call after dot operator");
|
||||
return OP_EOF;
|
||||
}
|
||||
|
||||
//hijack the function call, and hack in an extra parameter
|
||||
node->binary.right->fnCall.argumentCount++;
|
||||
node->binary.opcode = OP_DOT;
|
||||
|
||||
Reference in New Issue
Block a user