Commit 5de57dda authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Test the new binder.

parent 308f481e
......@@ -32,12 +32,12 @@
#include <ASTVisitor.h>
#include <Control.h>
#include <Scope.h>
#include <Semantic.h>
#include <TranslationUnit.h>
#include <Literals.h>
#include <Symbols.h>
#include <Names.h>
#include <CoreTypes.h>
#include <Bind.h>
#include <string>
#include <cstdlib>
......@@ -126,11 +126,7 @@ void parse(const char *fileName, const char *source, unsigned size)
unit.setSource(source, size);
unit.parse();
if (TranslationUnitAST *ast = unit.ast()->asTranslationUnit()) {
Semantic sem(&unit);
Namespace *globalNamespace = control.newNamespace(0);
for (List<DeclarationAST *> *it = ast->declaration_list; it; it = it->next) {
sem.check(it->value, globalNamespace);
}
}
Namespace *globalNamespace = control.newNamespace(0);
Bind bind(&unit);
bind(unit.ast()->asTranslationUnit(), globalNamespace);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment