-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathVisitor.h
30 lines (29 loc) · 1.42 KB
/
Visitor.h
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
#pragma once
#include "GramTreeNode.h"
class Visitor {
public:
~Visitor(){}
virtual void visit(ChunkNode *, void *) = 0;
virtual void visit(BlockNode *, void *) = 0;
virtual void visit(SyntaxTreeNodeBase*, void*) = 0;
virtual void visit(AssignStatement* stm, void* data) = 0;
virtual void visit(LocalNameListStatement* nls, void* data) = 0;
virtual void visit(UnaryExpression* uexp, void* data) = 0;
virtual void visit(Terminator* ter, void* data) = 0;
virtual void visit(IdentifierNode* idt, void* data) = 0;
virtual void visit(NormalCallFunciton* callFun, void* data) = 0;
virtual void visit(OperateStatement* ops, void* data) = 0;
virtual void visit(FunctionStatement* fsm, void* data) = 0;
virtual void visit(ReturnStatement* rtSmt, void* data) = 0;
virtual void visit(IfStatement* ifSmt, void* data) = 0;
virtual void visit(CompareStatement* cmpSmt, void* data) = 0;
virtual void visit(TableDefine* tbdSmt, void* data) = 0;
virtual void visit(TableNameField* tbdSmt, void* data) = 0;
virtual void visit(TableArrayFiled* taSmt, void* data) = 0;
virtual void visit(TableIndexField* taSmt, void* data) = 0;
virtual void visit(TabMemberAccessor* tmsSmt, void* data) = 0;
virtual void visit(TabIndexAccessor* tmsSmt, void* data) = 0;
virtual void visit(NumericForStatement* nforSmt, void* data) = 0;
virtual void visit(GenericForStatement* gforSmt, void* data) = 0;
virtual void visit(BreakStatement* brkSmt, void* data) = 0;
};