Some implementation of ASTInspector
parent
cc3e55c888
commit
1be5804f4c
|
@ -8,11 +8,23 @@
|
|||
#ifndef ASTINSPECTOR_H_
|
||||
#define ASTINSPECTOR_H_
|
||||
|
||||
#include <map>
|
||||
#include "Visitor.h"
|
||||
#include "AST/AllTypesOfASTNodes.h"
|
||||
|
||||
class ASTInspector: public Visitor {
|
||||
public:
|
||||
ASTInspector();
|
||||
typedef unsigned int NumberOfNodes;
|
||||
|
||||
std::map<std::string, NumberOfNodes> occurences;
|
||||
|
||||
virtual void visit(ASTNode * node);
|
||||
virtual void visit(ConstantExpression * node);
|
||||
virtual void visit(BasicExpression * node);
|
||||
void visit(PostfixExpression * node);
|
||||
void visit(WhileNode * node);
|
||||
|
||||
virtual ~ASTInspector();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue