Add get keyword

This commit is contained in:
bʰedoh₂ swé 2024-06-11 05:48:18 +05:00
parent 00afc5158f
commit 8bf0af96ee

View File

@ -168,8 +168,14 @@ char* compile_expression(tSyntaxElement* syntaxelement) {
string_append(&result,compile_expression_wrapped(token->next->next->next)); string_append(&result,compile_expression_wrapped(token->next->next->next));
} } else if (strcmp(token->content.string, "get") == 0) {
else {
string_append(&result,compile_expression(token->next));
string_append(&result,"[");
string_append(&result,compile_expression(token->next->next));
string_append(&result,"]");
} else {
string_append(&result,token->content.string); string_append(&result,token->content.string);
compile_genexec(&result, token); compile_genexec(&result, token);