Commit d0abb5da authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Run the semantic passes.

parent 51de95c4
......@@ -40,7 +40,7 @@
#include <string>
#include <cstdlib>
#include <cstdlib>
#include <sstream>
using namespace CPlusPlus;
......@@ -75,5 +75,13 @@ int main(int argc, char *argv[])
unit.setSource(source.c_str(), 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->members());
}
}
return EXIT_SUCCESS;
}
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