initial support for is null and is not null

will nedd some work, but just for now
This commit is contained in:
2021-09-08 18:34:11 +02:00
parent 0db976f471
commit 61f3af90af
6 changed files with 30 additions and 5 deletions

View File

@@ -104,7 +104,8 @@ namespace usql {
bool Lexer::isRelationalOperator(TokenType token_type) {
return (token_type == TokenType::equal || token_type == TokenType::not_equal ||
token_type == TokenType::greater || token_type == TokenType::greater_equal ||
token_type == TokenType::lesser || token_type == TokenType::lesser_equal);
token_type == TokenType::lesser || token_type == TokenType::lesser_equal ||
token_type == TokenType::is);
}
bool Lexer::isLogicalOperator(TokenType token_type) {
@@ -145,6 +146,8 @@ namespace usql {
return TokenType::lesser;
if (token == "<=")
return TokenType::lesser_equal;
if (token == "is")
return TokenType::is;
if (token == "as")
return TokenType::keyword_as;
if (token == "create")
@@ -321,6 +324,9 @@ namespace usql {
case TokenType::lesser_equal:
txt = "<=";
break;
case TokenType::is:
txt = "is";
break;
case TokenType::keyword_as:
txt = "as";
break;