summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-18 00:08:50 +0100
committerJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-18 00:08:50 +0100
commit1be5804f4cae0299984764492dc57768b056daae (patch)
tree9f093d0ccf15348361bd53f969a6219663b44a7e
parentcc3e55c8885ca2ea145b5a811f038d7e4128b1ee (diff)
downloadsencha-lang-1be5804f4cae0299984764492dc57768b056daae.tar.gz
sencha-lang-1be5804f4cae0299984764492dc57768b056daae.tar.bz2
sencha-lang-1be5804f4cae0299984764492dc57768b056daae.tar.xz
sencha-lang-1be5804f4cae0299984764492dc57768b056daae.zip
Some implementation of ASTInspector
-rw-r--r--Sencha-lang/ASTInspector.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Sencha-lang/ASTInspector.h b/Sencha-lang/ASTInspector.h
index 941c82e..609ee82 100644
--- a/Sencha-lang/ASTInspector.h
+++ b/Sencha-lang/ASTInspector.h
@@ -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();
};