diff --git a/src/compile.c b/src/compile.c index 2a1e005..2399cb5 100644 --- a/src/compile.c +++ b/src/compile.c @@ -370,6 +370,23 @@ char* compile(tSyntaxElement* syntaxtree) { compile_exit_tag(&result); + } else if (strcmp(token->content.string, "filter") == 0) { + + compile_enter_tag(&result); + + string_append(&result, "filter "); + string_append_free(&result,compile_expression(token->next)); + + compile_exit_tag(&result); + + string_append_free(&result,compile(token->next->next)); + + compile_enter_tag(&result); + + string_append(&result, "endfilter"); + + compile_exit_tag(&result); + } else if (strcmp(token->content.string, "print") == 0) { for(tSyntaxElement* i = token->next; i != NULL; i = i->next) { @@ -487,6 +504,13 @@ char* compile(tSyntaxElement* syntaxtree) { string_append_free(&result, compile_expression(token->next->next)); compile_exit_tag(&result); + } else if (strcmp(token->content.string, "quote") == 0) { + + if (token->next->type == STRING) + string_append(&result,token->next->content.string); + else + string_append_free(&result,compile_expression(token->next)); + } else { string_append(&result, "{#");