mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Resolved #25, Indexing an array with a non-integer causes an error
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user