diff --git a/src/compile.c b/src/compile.c index 186b244..fa827a9 100644 --- a/src/compile.c +++ b/src/compile.c @@ -245,6 +245,25 @@ char* compile(tSyntaxElement* syntaxtree) { } else + if (strcmp(token->content.string, "if") == 0) { + + compile_enter_tag(&result); + + string_append(&result, "if "); + string_append(&result,compile_expression(token->next)); + + compile_exit_tag(&result); + + string_append(&result,compile(token->next->next)); + + compile_enter_tag(&result); + + string_append(&result, "endif"); + + compile_exit_tag(&result); + + } else + if (strcmp(token->content.string, "print") == 0) { string_append(&result, "{{");