Resolved #25, Indexing an array with a non-integer causes an error

This commit is contained in:
2023-01-15 15:09:01 +00:00
parent 402abb647c
commit 51740e2b9e
8 changed files with 88 additions and 22 deletions

View File

@@ -726,9 +726,9 @@ static Opcode indexAccess(Parser* parser, ASTNode** nodeHandle) { //TODO: fix in
ASTNode* third = NULL;
//booleans indicate blank slice indexing
emitASTNodeLiteral(&first, TO_BOOLEAN_LITERAL(true));
emitASTNodeLiteral(&second, TO_BOOLEAN_LITERAL(true));
emitASTNodeLiteral(&third, TO_BOOLEAN_LITERAL(true));
emitASTNodeLiteral(&first, TO_INDEX_BLANK_LITERAL);
emitASTNodeLiteral(&second, TO_INDEX_BLANK_LITERAL);
emitASTNodeLiteral(&third, TO_INDEX_BLANK_LITERAL);
bool readFirst = false; //pattern matching is bullcrap