From 0985a623e4cbd14da77fddf1bb1a9ca3384b28ea Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 10 Jun 2015 20:32:13 +0200 Subject: Changed token determination regarding identifier values * all non operator and digit tokens are now identifier tokens as this seems more intuitive than generating number token lists containing non-digit values * renamed lexer-local `level` variable to `nesting` as to avoid confusion between nesting state and predecence levels --- src/nodes.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nodes.cc') diff --git a/src/nodes.cc b/src/nodes.cc index dd003c4..5432318 100644 --- a/src/nodes.cc +++ b/src/nodes.cc @@ -86,13 +86,13 @@ std::string OperatorNode::print() const { } bool OperatorNode::hasChildren() const { - return this->right_ != nullptr && - this->left_ != nullptr; + return this->right_ != nullptr + && this->left_ != nullptr; } bool OperatorNode::isParentOf(Node*const node) const { - return this->right_ == node || - this->left_ == node; + return this->right_ == node + || this->left_ == node; } TokenType OperatorNode::token() const { -- cgit v1.2.3