initial support for is null and is not null
will nedd some work, but just for now
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user