Add "is"
This commit is contained in:
parent
8eff72ee53
commit
9b605597b2
@ -247,6 +247,52 @@ char* compile_expression(tSyntaxElement* syntaxelement) {
|
|||||||
|
|
||||||
string_append(&result,"}");
|
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 {
|
} else {
|
||||||
|
|
||||||
string_append(&result,token->content.string);
|
string_append(&result,token->content.string);
|
||||||
|
Loading…
Reference in New Issue
Block a user