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.
8 #include "tree/ParseTree.h"
13 class ANTLR4CPP_PUBLIC TerminalNode : public ParseTree {
15 ~TerminalNode() override;
17 virtual Token* getSymbol() = 0;
19 /** Set the parent for this leaf node.
21 * Technically, this is not backward compatible as it changes
22 * the interface but no one was able to create custom
23 * TerminalNodes anyway so I'm adding as it improves internal
28 virtual void setParent(RuleContext *parent) = 0;