1 /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
2 * Use of this file is governed by the BSD 3-clause license that
3 * can be found in the LICENSE.txt file in the project root.
6 #include "support/CPPUtils.h"
8 #include "XPathElement.h"
10 using namespace antlr4::tree;
11 using namespace antlr4::tree::xpath;
13 XPathElement::XPathElement(const std::string &nodeName) {
17 XPathElement::~XPathElement() {
20 std::vector<ParseTree *> XPathElement::evaluate(ParseTree * /*t*/) {
24 std::string XPathElement::toString() const {
25 std::string inv = _invert ? "!" : "";
26 return antlrcpp::toString(*this) + "[" + inv + _nodeName + "]";
29 void XPathElement::setInvert(bool value) {