Some cleanup in the AST nodes.

This commit is contained in:
Roberto Raggi
2009-06-17 16:08:01 +02:00
parent a29864ef01
commit c222f2aa27
14 changed files with 298 additions and 238 deletions

View File

@@ -326,8 +326,8 @@ void Document::check()
return; // nothing to do.
if (TranslationUnitAST *ast = _translationUnit->ast()->asTranslationUnit()) {
for (DeclarationAST *decl = ast->declarations; decl; decl = decl->next) {
semantic.check(decl, globals);
for (DeclarationListAST *decl = ast->declarations; decl; decl = decl->next) {
semantic.check(decl->declaration, globals);
}
} else if (ExpressionAST *ast = _translationUnit->ast()->asExpression()) {
semantic.check(ast, globals);