tabs instead of spaces
This commit is contained in:
@@ -385,19 +385,18 @@ namespace usql {
|
||||
|
||||
|
||||
std::unique_ptr<Node> Parser::parse_where_clause() {
|
||||
if (m_lexer.tokenType() != TokenType::keyword_where) {
|
||||
return std::make_unique<TrueNode>();
|
||||
}
|
||||
if (m_lexer.tokenType() != TokenType::keyword_where) {
|
||||
return std::make_unique<TrueNode>();
|
||||
}
|
||||
|
||||
m_lexer.skipToken(TokenType::keyword_where);
|
||||
m_lexer.skipToken(TokenType::keyword_where);
|
||||
|
||||
std::unique_ptr<Node> left = parse_expression();
|
||||
do {
|
||||
left = parse_expression(std::move(left));
|
||||
|
||||
} while (m_lexer.tokenType() != TokenType::eof && m_lexer.tokenType() != TokenType::keyword_order && m_lexer.tokenType() != TokenType::keyword_offset && m_lexer.tokenType() != TokenType::keyword_limit);
|
||||
std::unique_ptr<Node> left = parse_expression();
|
||||
do {
|
||||
left = parse_expression(std::move(left));
|
||||
} while (m_lexer.tokenType() != TokenType::eof && m_lexer.tokenType() != TokenType::keyword_order && m_lexer.tokenType() != TokenType::keyword_offset && m_lexer.tokenType() != TokenType::keyword_limit && m_lexer.tokenType() != TokenType::semicolon);
|
||||
|
||||
return left;
|
||||
return left;
|
||||
}
|
||||
|
||||
std::unique_ptr<Node> Parser::parse_expression() {
|
||||
|
||||
@@ -175,9 +175,6 @@ struct FunctionNode : Node {
|
||||
};
|
||||
|
||||
|
||||
Type function;
|
||||
std::vector<std::unique_ptr<Node>> params;
|
||||
|
||||
FunctionNode(std::string func_name, std::vector<std::unique_ptr<Node>> pars) :
|
||||
Node(NodeType::function), function(get_function(func_name)), params(std::move(pars)) {}
|
||||
|
||||
@@ -199,6 +196,9 @@ struct FunctionNode : Node {
|
||||
}
|
||||
std::cout << ")" << std::endl;
|
||||
}
|
||||
|
||||
Type function;
|
||||
std::vector<std::unique_ptr<Node>> params;
|
||||
};
|
||||
|
||||
struct TrueNode : Node {
|
||||
@@ -581,7 +581,6 @@ struct CreateIndexNode : Node {
|
||||
};
|
||||
|
||||
class Parser {
|
||||
private:
|
||||
public:
|
||||
Parser();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user