summaryrefslogtreecommitdiffstats
path: root/Sencha-lang/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Sencha-lang/main.cpp')
-rw-r--r--Sencha-lang/main.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/Sencha-lang/main.cpp b/Sencha-lang/main.cpp
index 64e0de5..d91ece4 100644
--- a/Sencha-lang/main.cpp
+++ b/Sencha-lang/main.cpp
@@ -7,6 +7,7 @@
#include "Parser.h"
#include "Tests/TestLexer.h"
#include "Context.h"
+#include "ASTInspector.h"
#include "Tests/tests.h"
using namespace std;
@@ -131,7 +132,7 @@ void interactive()
context.register_function("tan", s_tan);
Parser parser(&context);
-
+ ASTInspector inspector;
vector<Token> tokens;
string input;
@@ -157,7 +158,10 @@ void interactive()
//cout << parser.show_tokens() << endl;
//cout << "My tree:\n";
//cout << parser.program->debug();
- cout << parser.context->debug();
+ inspector.visit(parser.program);
+ //cout << parser.context->debug();
+ cout << inspector.get_report();
+ inspector.forget_everything();
}
}
@@ -188,6 +192,7 @@ int main(int argc, char *argv[])
context.register_function("tan", s_tan);
Parser parser(&context);
+
vector<Token> tokens;
string line;
ifstream input_file (name);