summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/ASTInspector.h
diff options
context:
space:
mode:
authorJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-22 11:06:55 +0100
committerJustyna Ilczuk <justyna.ilczuk@gmail.com>2012-12-22 11:06:55 +0100
commit4d7205920055139596a07e8a74f7c6e4f79f698f (patch)
treef54f43afcfe41bd0a84fc9f96c9f48192de1d5e8 /Sencha-lang/ASTInspector.h
parent509a416bf9d74cc0bc679dcd9956bc438d142362 (diff)
downloadsencha-lang-4d7205920055139596a07e8a74f7c6e4f79f698f.tar.gz
sencha-lang-4d7205920055139596a07e8a74f7c6e4f79f698f.tar.bz2
sencha-lang-4d7205920055139596a07e8a74f7c6e4f79f698f.tar.xz
sencha-lang-4d7205920055139596a07e8a74f7c6e4f79f698f.zip
Almost everything is ready with visitor pattern and ASTInspector class.
Diffstat (limited to 'Sencha-lang/ASTInspector.h')
-rw-r--r--Sencha-lang/ASTInspector.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/Sencha-lang/ASTInspector.h b/Sencha-lang/ASTInspector.h
index c69d234..88e6a56 100644
--- a/Sencha-lang/ASTInspector.h
+++ b/Sencha-lang/ASTInspector.h
@@ -18,9 +18,11 @@ public:
unsigned int how_many_visits() { return number_of_visits; }
unsigned int how_many_occurences_of(std::string type);
std::string get_report() { return this->inspection_report; }
- void visit(Visitable * node);
+
virtual ~ASTInspector();
void forget_everything();
+ void visit(Visitable * node);
+ void visit(ProgramNode * node);
private:
unsigned int number_of_visits;
@@ -30,13 +32,23 @@ private:
unsigned int depth_level;
std::string compute_indent();
void write_report(std::string visit_notes);
- void visit(ConstantExpression & node);
- void visit(BasicExpression & node);
- void visit(PostfixExpression & node);
- void visit(WhileNode & node);
- void visit(ProgramNode & node);
- void visit(BasicStatement & node);
- void visit(DeclarationStatement & node);
+ void visit(ConstantExpression * node);
+ void visit(BasicExpression * node);
+ void visit(PostfixExpression * node);
+ void visit(WhileNode * node);
+
+ void visit(BasicStatement * node);
+ void visit(DeclarationStatement * node);
+ void visit(Assignment * node);
+ void visit(IfNode * node);
+ void visit(IncorrectExpression * node);
+ void visit(RepeatStatement * node);
+ void visit(VariableExpression * node);
+
+
+
+
+
};