Allow print to take multiple arguments

This commit is contained in:
bʰedoh₂ swé 2024-06-11 16:53:40 +05:00
parent 3aa280ba38
commit e6027bbaf2

View File

@ -317,9 +317,13 @@ char* compile(tSyntaxElement* syntaxtree) {
} else if (strcmp(token->content.string, "print") == 0) { } else if (strcmp(token->content.string, "print") == 0) {
string_append(&result, "{{"); for(tSyntaxElement* i = token->next; i != NULL; i = i->next) {
string_append(&result,compile_expression(token->next));
string_append(&result, "}}"); string_append(&result, "{{");
string_append(&result,compile_expression(i));
string_append(&result, "}}");
}
} else { } else {