better support for booleans

This commit is contained in:
2021-09-07 23:50:34 +02:00
parent 427a3a9f04
commit 0db976f471
8 changed files with 90 additions and 26 deletions

View File

@@ -450,6 +450,10 @@ namespace usql {
if (token_type == TokenType::keyword_null)
return std::make_unique<NullValueNode>();
// true / false
if (token_type == TokenType::keyword_true || token_type == TokenType::keyword_false)
return std::make_unique<BooleanValueNode>(token_type == TokenType::keyword_true);
throw Exception("Unknown operand node " + tokenString);
}