]> gitweb.ps.run Git - toc/blob - antlr4-cpp-runtime-4.9.2-source/runtime/src/tree/ErrorNodeImpl.h
add antlr source code and ReadMe
[toc] / antlr4-cpp-runtime-4.9.2-source / runtime / src / tree / ErrorNodeImpl.h
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.
4  */
5
6 #pragma once
7
8 #include "tree/ErrorNode.h"
9 #include "tree/TerminalNodeImpl.h"
10 #include "misc/Interval.h"
11
12 #include "support/Any.h"
13
14 namespace antlr4 {
15 namespace tree {
16
17   /// <summary>
18   /// Represents a token that was consumed during resynchronization
19   ///  rather than during a valid match operation. For example,
20   ///  we will create this kind of a node during single token insertion
21   ///  and deletion as well as during "consume until error recovery set"
22   ///  upon no viable alternative exceptions.
23   /// </summary>
24   class ANTLR4CPP_PUBLIC ErrorNodeImpl : public virtual TerminalNodeImpl, public virtual ErrorNode {
25   public:
26     ErrorNodeImpl(Token *token);
27     ~ErrorNodeImpl() override;
28
29     virtual antlrcpp::Any accept(ParseTreeVisitor *visitor) override;
30   };
31
32 } // namespace tree
33 } // namespace antlr4