This commit is contained in:
bʰedoh₂ swé 2024-06-11 20:38:19 +05:00
parent 8eff72ee53
commit 9b605597b2

View File

@ -247,6 +247,52 @@ char* compile_expression(tSyntaxElement* syntaxelement) {
string_append(&result,"}");
} else if (strcmp(token->content.string, "isnull") == 0) {
string_append_free(&result, compile_expression_wrapped(token->next));
string_append(&result, " is null");
} else if (strcmp(token->content.string, "notnull") == 0) {
string_append_free(&result, compile_expression_wrapped(token->next));
string_append(&result, " is not null");
} else if (strcmp(token->content.string, "same") == 0) {
string_append_free(&result, compile_expression_wrapped(token->next));
string_append(&result, " is same as ");
string_append_free(&result, compile_expression_wrapped(token->next->next));
} else if (strcmp(token->content.string, "diff") == 0) {
string_append_free(&result, compile_expression_wrapped(token->next));
string_append(&result, " is not same as ");
string_append_free(&result, compile_expression_wrapped(token->next->next));
} else if (strcmp(token->content.string, "isdiv") == 0) {
string_append_free(&result, compile_expression_wrapped(token->next));
string_append(&result, " is divisible by ");
string_append_free(&result, compile_expression_wrapped(token->next->next));
} else if (strcmp(token->content.string, "notdiv") == 0) {
string_append_free(&result, compile_expression_wrapped(token->next));
string_append(&result, " is divisible by ");
string_append_free(&result, compile_expression_wrapped(token->next->next));
} else if (strcmp(token->content.string, "is") == 0) {
string_append_free(&result, compile_expression_wrapped(token->next));
string_append(&result, " is ");
string_append_free(&result, compile_expression(token->next->next));
} else if (strcmp(token->content.string, "not") == 0) {
string_append_free(&result, compile_expression_wrapped(token->next));
string_append(&result, " is not ");
string_append_free(&result, compile_expression(token->next->next));
} else {
string_append(&result,token->content.string);