Synopsis - Synopsis::SymbolLookup::Walker

namespace Synopsis::SymbolLookup
class Walker
File: ../Synopsis/SymbolLookup/Walker.hh

This Walker adjusts the symbol lookup table while the parse tree is being traversed such that symbols in the parse tree can be looked up correctly in the right context.

Public Member functions Summary:
constructor Walker(Scope*)
virtual destructor ~Walker()
virtual void visit(PTree::List*)
virtual void visit(PTree::Block*)
virtual void visit(PTree::TemplateDecl*)
virtual void visit(PTree::NamespaceSpec*)
virtual void visit(PTree::FunctionDefinition*)
virtual void visit(PTree::ClassSpec*)
virtual void visit(PTree::DotMemberExpr*)
virtual void visit(PTree::ArrowMemberExpr*)
void traverse_body(PTree::NamespaceSpec*)

Traverse the body of a namespace definition.

void traverse_body(PTree::ClassSpec*)

Traverse the body of the class definition.

void traverse_parameters(PTree::TemplateDecl*)

Traverse the template parameter list of a template declaration.

void traverse_body(PTree::FunctionDefinition*)

Traverse the body of the function definition.

Protected Member functions Summary:
const Scope* current_scope()
void leave_scope()
Private Typedefs Summary:
std::stack<Scope*> Scopes
Private Member functions Summary:
void visit_block(PTree::Block*)

the virtual visit(Block) version above does scoping, which isn't what we want if traversing a function (FIXME: or is it ?) so the following factors out the common code.

Private Data members Summary:
Scopes my_scopes

The symbol lookup table.

Public Member functions Details:
void traverse_body(PTree::NamespaceSpec*)

Traverse the body of a namespace definition.

void traverse_body(PTree::ClassSpec*)

Traverse the body of the class definition.

void traverse_parameters(PTree::TemplateDecl*)

Traverse the template parameter list of a template declaration.

void traverse_body(PTree::FunctionDefinition*)

Traverse the body of the function definition.

Private Member functions Details:
void visit_block(PTree::Block*)

the virtual visit(Block) version above does scoping, which isn't what we want if traversing a function (FIXME: or is it ?) so the following factors out the common code.

Private Data members Details:
Scopes my_scopes

The symbol lookup table.

Generated on Thu Apr 16 16:28:00 2009 by
synopsis (version devel)