diff --git a/src/compile.c b/src/compile.c index a8753c4..e907862 100644 --- a/src/compile.c +++ b/src/compile.c @@ -168,12 +168,18 @@ char* compile_expression(tSyntaxElement* syntaxelement) { string_append(&result,compile_expression_wrapped(token->next->next->next)); - } - else { + } else if (strcmp(token->content.string, "get") == 0) { + + 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); compile_genexec(&result, token); - + } }