diff --git a/src/compile.c b/src/compile.c index fe3bf47..63c6290 100644 --- a/src/compile.c +++ b/src/compile.c @@ -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);