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

@@ -1176,6 +1176,11 @@ static unsigned char* collateCompilerHeaderOpt(Compiler* compiler, int* size, bo
}
break;
case LITERAL_INDEX_BLANK:
emitByte(&collation, &capacity, &count, LITERAL_INDEX_BLANK);
//blank has no following value
break;
default:
fprintf(stderr, ERROR "[internal] Unknown literal type encountered within literal cache: %d\n" RESET, compiler->literalCache.literals[i].type);
return NULL;