Get rid of the old Semantic pass.

This commit is contained in:
Roberto Raggi
2010-08-13 16:17:44 +02:00
parent 6659e3ecba
commit 0540aa362d
26 changed files with 20 additions and 4256 deletions

View File

@@ -162,11 +162,20 @@ void Bind::operator()(DeclarationAST *ast, Scope *scope)
(void) switchScope(previousScope);
}
void Bind::operator()(ExpressionAST *ast, Scope *scope)
FullySpecifiedType Bind::operator()(ExpressionAST *ast, Scope *scope)
{
Scope *previousScope = switchScope(scope);
expression(ast);
FullySpecifiedType ty = expression(ast);
(void) switchScope(previousScope);
return ty;
}
FullySpecifiedType Bind::operator()(NewTypeIdAST *ast, Scope *scope)
{
Scope *previousScope = switchScope(scope);
FullySpecifiedType ty = newTypeId(ast);
(void) switchScope(previousScope);
return ty;
}
void Bind::statement(StatementAST *ast)
@@ -1875,7 +1884,7 @@ bool Bind::visit(FunctionDefinitionAST *ast)
this->ctorInitializer(ast->ctor_initializer, fun);
if (! _skipFunctionBodies && ast->function_body) {
if (fun && ! _skipFunctionBodies && ast->function_body) {
Scope *previousScope = switchScope(fun);
this->statement(ast->function_body);
(void) switchScope(previousScope);