public static function parse(ParserInterface $parser) { if (ConstantNode::parse($parser) || StringNode::parse($parser) || VariableNode::parse($parser) || NumberNode::parse($parser) || ListNode::parse($parser) || FunctionCallNode::parse($parser)) { if (!$parser->getScope() instanceof self) { // Insert the expression and move inside $parser->wrap(new static()); } if (OperatorNode::parse($parser)) { self::parse($parser); } else { $parser->traverseDown(); } return true; } return false; }