Support for if/else
This commit is contained in:
parent
4927054b60
commit
fa45d7b383
@ -256,6 +256,16 @@ char* compile(tSyntaxElement* syntaxtree) {
|
|||||||
|
|
||||||
string_append(&result,compile(token->next->next));
|
string_append(&result,compile(token->next->next));
|
||||||
|
|
||||||
|
if (token->next->next->next != NULL) {
|
||||||
|
|
||||||
|
compile_enter_tag(&result);
|
||||||
|
string_append(&result, "else");
|
||||||
|
compile_exit_tag(&result);
|
||||||
|
|
||||||
|
string_append(&result,compile(token->next->next->next));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
compile_enter_tag(&result);
|
compile_enter_tag(&result);
|
||||||
|
|
||||||
string_append(&result, "endif");
|
string_append(&result, "endif");
|
||||||
|
Loading…
Reference in New Issue
Block a user