return 0;
}
+ /// ActOnEndOfTranslationUnit - This is called at the very end of the
+ /// translation unit when EOF is reached and all but the top-level scope is
+ /// popped.
virtual void ActOnEndOfTranslationUnit() {}
//===--------------------------------------------------------------------===//
/// action tells us to. This returns true if the EOF was encountered.
bool Parser::ParseTopLevelDecl(DeclTy*& Result) {
Result = 0;
- if (Tok.is(tok::eof)) return true;
+ if (Tok.is(tok::eof)) {
+ Actions.ActOnEndOfTranslationUnit();
+ return true;
+ }
Result = ParseExternalDeclaration();
return false;
ExitScope();
assert(CurScope == 0 && "Scope imbalance!");
-
- Actions.ActOnEndOfTranslationUnit();
}
/// ParseExternalDeclaration:
delete static_cast<Stmt*>(S);
}
+/// ActOnEndOfTranslationUnit - This is called at the very end of the
+/// translation unit when EOF is reached and all but the top-level scope is
+/// popped.
+void Sema::ActOnEndOfTranslationUnit() {
+
+}
+
+
//===----------------------------------------------------------------------===//
// Helper functions.
//===----------------------------------------------------------------------===//
virtual void DeleteExpr(ExprTy *E);
virtual void DeleteStmt(StmtTy *S);
+ virtual void ActOnEndOfTranslationUnit();
+
//===--------------------------------------------------------------------===//
// Type Analysis / Processing: SemaType.cpp.
//