Commit b5061906 authored by Roberto Raggi's avatar Roberto Raggi

Added public methods to process declarations and expressions.

parent 105ec09e
......@@ -112,6 +112,20 @@ void Bind::operator()(TranslationUnitAST *ast, Namespace *globalNamespace)
(void) switchScope(previousScope);
}
void Bind::operator()(DeclarationAST *ast, Scope *scope)
{
Scope *previousScope = switchScope(scope);
declaration(ast);
(void) switchScope(previousScope);
}
void Bind::operator()(ExpressionAST *ast, Scope *scope)
{
Scope *previousScope = switchScope(scope);
expression(ast);
(void) switchScope(previousScope);
}
void Bind::statement(StatementAST *ast)
{
accept(ast);
......
......@@ -60,6 +60,8 @@ public:
Bind(TranslationUnit *unit);
void operator()(TranslationUnitAST *ast, Namespace *globalNamespace);
void operator()(DeclarationAST *ast, Scope *scope);
void operator()(ExpressionAST *ast, Scope *scope);
bool skipFunctionBodies() const;
void setSkipFunctionBodies(bool skipFunctionBodies);
......
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