Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Template_visitor Class Reference

#include <template_i.h>

Inheritance diagram for Template_visitor:

Inheritance graph
[legend]
Collaboration diagram for Template_visitor:

Collaboration graph
[legend]
List of all members.

Public Methods

 Template_visitor (Source *s, Abstract_scope *scope, const Template_thing &args)
Tpl_RT visit_type_declaration (Ptree *storagespec, Ptree *typespec)
Tpl_RT visit_name_declaration (Ptree *storagespec, Ptree *typespec, Ptree *decllist)
 Name declaration. More...

Tpl_RT visit_function (Ptree *storagespec, Ptree *typespec, PtreeDeclarator *decl, PtreeBlock *block)

Private Methods

void declare_name (Ptree *p, Ptree *tree)
void declare_class (Ptree *class_tree)

Private Attributes

Abstract_scopecurrent_scope
Template_thing args

Constructor & Destructor Documentation

Template_visitor::Template_visitor Source   s,
Abstract_scope   scope,
const Template_thing   args
 

Definition at line 309 of file template.cc.

References Tpl_RT.


Member Function Documentation

void Template_visitor::declare_class Ptree   class_tree [private]
 

Definition at line 453 of file template.cc.

References Abstract_scope::add_symbol(), args, compile_error(), current_scope, Ptree::First(), Symbol::get_name(), Symbol_name::get_name(), Symbol::is_defined(), Symbol_name::is_qualified(), Ptree::IsLeaf(), Ptree::Length(), Symbol_name::lookup_for_decl(), Abstract_scope::lookup_here(), Ptree::Second(), Template_class_symbol::set_definition(), Template_thing::set_tree(), and Symbol_pair::tag.

Referenced by visit_type_declaration().

void Template_visitor::declare_name Ptree   p,
Ptree   tree
[private]
 

Definition at line 389 of file template.cc.

References Template_class_symbol::add_member(), args, Ptree::Car(), Ptree::Cdr(), compile_error(), current_scope, Ptree::Eq(), expect_ptree(), Ptree::First(), Abstract_scope::get_global_scope(), Abstract_scope::get_parent(), Symbol_name::is_qualified_name(), Ptree::IsLeaf(), Abstract_scope::lookup_here(), Symbol_name::lookup_symbol_in_scope(), Abstract_scope::lookup_unqualified(), Template_thing::set_tree(), Symbol_pair::tag, and Ptree::ToString().

Referenced by visit_function(), and visit_name_declaration().

Tpl_RT Template_visitor::visit_function Ptree   storagespec,
Ptree   typespec,
PtreeDeclarator   decl,
PtreeBlock   block
[virtual]
 

Reimplemented from Ptree_program_visitor< Tpl_RT >.

Definition at line 370 of file template.cc.

References compile_error(), current_scope, declare_name(), get_name_from_declarator(), HACK_EXPLICIT, and Ptree::List().

Tpl_RT Template_visitor::visit_name_declaration Ptree   storagespec,
Ptree   typespec,
Ptree   decllist
[virtual]
 

Name declaration.

Parameters:
storagespec  list of static/mutable/friend/virtual/inline/extern
typespec  list of type specifiers and cv-qualifiers, or type definition
decllist  list of declarators, separated by comma

Reimplemented from Ptree_program_visitor< Tpl_RT >.

Definition at line 345 of file template.cc.

References Ptree::Car(), Ptree::Cdr(), compile_error(), current_scope, declare_name(), Ptree::Eq(), get_name_from_declarator(), HACK_EXPLICIT, and Ptree::List().

Tpl_RT Template_visitor::visit_type_declaration Ptree   storagespec,
Ptree   typespec
[virtual]
 

Reimplemented from Ptree_program_visitor< Tpl_RT >.

Definition at line 318 of file template.cc.

References bogus_ptree_error(), Ptree::Car(), compile_warning(), declare_class(), and Ptree::Eq().


Member Data Documentation

Template_thing Template_visitor::args [private]
 

Definition at line 83 of file template_i.h.

Referenced by declare_class(), and declare_name().

Abstract_scope* Template_visitor::current_scope [private]
 

Definition at line 82 of file template_i.h.

Referenced by declare_class(), declare_name(), visit_function(), and visit_name_declaration().


The documentation for this class was generated from the following files:
Generated on Mon Feb 10 17:36:44 2003 for VFiasco Semantics Compiler by doxygen1.2.15