blob: 6385a0fcd8cc8f30790ec782d3f4a19c5ca41299 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#ifndef INC_CommonASTWithHiddenTokens_hpp__
#define INC_CommonASTWithHiddenTokens_hpp__
/** A CommonAST whose initialization copies hidden token
* information from the Token used to create a node.
*/
#include "antlr/config.h"
#include "antlr/CommonAST.h"
ANTLR_BEGIN_NAMESPACE(antlr)
class CommonASTWithHiddenTokens : public CommonAST {
public:
CommonASTWithHiddenTokens() : CommonAST()
{
}
virtual ~CommonASTWithHiddenTokens()
{
}
protected:
RefToken hiddenBefore,hiddenAfter; // references to hidden tokens
public:
virtual RefToken getHiddenAfter() const
{ return hiddenAfter; }
virtual RefToken getHiddenBefore() const
{ return hiddenBefore; }
// Borland C++ builder seems to need the decl's of the first two...
virtual void initialize(int t,const ANTLR_USE_NAMESPACE(std)string& txt);
virtual void initialize(RefAST t);
virtual void initialize(RefToken t);
static RefAST factory();
};
typedef ASTRefCount<CommonASTWithHiddenTokens> RefCommonASTWithHiddenTokens;
ANTLR_END_NAMESPACE
#endif //INC_CommonASTWithHiddenTokens_hpp__
|