#include <symbol_table.h>
Inheritance diagram for Symbol:
Public Types | |
enum | Kind { k_Variable, k_Namespace, k_Typedef, k_Function, k_Enum, k_ClassOrStruct, k_Union, k_ClassTemplate } |
enum | Status { st_Undefined, st_Declared, st_Defined } |
Public Methods | |
const std::string & | get_name () const |
void | set_name (const std::string &n, std::string::size_type bl) |
bool | is_tagged () const |
Status | get_status () const |
bool | is_defined () const |
bool | is_declared () const |
virtual Kind | get_kind () const=0 |
Symbol () | |
virtual | ~Symbol () |
virtual Abstract_scope * | get_scope () |
If this symbol names a scope, return that scope. More... | |
void | set_status (Status st) |
Set status of this symbol. More... | |
std::string | get_basename () const |
virtual void | dump (std::ostream &out) |
Dump symbol on /out/. More... | |
Static Public Methods | |
bool | is_tagged (Kind k) |
Private Attributes | |
std::string | name |
std::string::size_type | base_len |
Status | status |
Definition at line 28 of file symbol_table.h.
|
Definition at line 37 of file symbol_table.h. Referenced by Template_class_adder::add_class(), Default_class_adder::add_class(), is_tagged(), and parse_class(). |
|
Definition at line 50 of file symbol_table.h. Referenced by get_status(), and Variable_symbol::Variable_symbol(). |
|
Definition at line 164 of file symbol_table.h. |
|
Definition at line 129 of file symbol_table.cc. |
|
Dump symbol on /out/. Derived classes can override this to add own information. Reimplemented in Class_symbol, Function_signature, Function_symbol, Typedef_symbol, and Variable_symbol. Definition at line 169 of file symbol_table.cc. References get_kind(), is_declared(), and is_defined(). Referenced by Variable_symbol::dump(), Typedef_symbol::dump(), Function_signature::dump(), Function_symbol::dump(), and Class_symbol::dump(). |
|
Definition at line 158 of file symbol_table.cc. References base_len, Symbol_name::get_basename_from_symbol(), and name. Referenced by Function_symbol::fill_in_mangled_names(), and Template_class_symbol::get_specialisation(). |
|
Implemented in Class_symbol, Enum_symbol, Function_signature, Function_symbol, Namespace_symbol, Template_class_symbol, Typedef_symbol, and Variable_symbol. Referenced by dump(), gen_builtin_conversions(), Type::get_promoted_integer(), Type::is_class_type(), Type::is_enum_type(), is_static(), is_tagged(), Symbol_name::lookup_symbol_in_scope(), parse_class(), parse_enum(), process_base_classes(), Type_reader::Type_reader(), Expr_annotator::visit_name(), and Annotator::visit_namespacespec(). |
|
Definition at line 32 of file symbol_table.h. References name. Referenced by Class_symbol::add_base_class(), Namespace_scope::add_variable(), Class_scope::add_variable(), Template_visitor::declare_class(), Expr_annotator::do_funcall(), enumerate_conversion_ops(), Function_symbol::fill_in_mangled_names(), get_composite_pointer_type(), Type_symbol::get_type(), Class_symbol::lookup_helper(), Init_handler::make_constructor_call(), make_declaration(), make_name(), Class_symbol::maybe_add_vbc(), parse_class(), print_annotated_tree(), Init_handler::process_brace(), process_initializers(), Expr_annotator::process_member_access(), Expr_annotator::process_pm_expr(), Symbol_table::set_peer(), and Expr_annotator::visit_assign(). |
|
If this symbol names a scope, return that scope. Otherwise, return 0 Reimplemented in Class_symbol, and Namespace_symbol. Definition at line 138 of file symbol_table.cc. Referenced by Symbol_name::lookup_symbol_in_scope(). |
|
Definition at line 64 of file symbol_table.h. References status, and Status. Referenced by Type::is_complete(). |
|
Definition at line 66 of file symbol_table.h. References st_Declared, and status. Referenced by Namespace_scope::add_function_decl(), Class_scope::add_function_decl(), Namespace_scope::add_variable(), dump(), gen_constructors(), parse_class(), and Function_signature::set_generated(). |
|
Definition at line 65 of file symbol_table.h. References st_Defined, and status. Referenced by Class_symbol::add_base_class(), Namespace_scope::add_variable(), Class_scope::add_variable(), Template_visitor::declare_class(), dump(), enumerate_conversion_ops(), gen_constructors(), Function_signature::get_body(), Function_signature::get_initializers(), parse_class(), parse_enum(), and Template_class_symbol::set_definition(). |
|
Definition at line 62 of file symbol_table.h. References get_kind(). |
|
Definition at line 61 of file symbol_table.h. Referenced by Symbol_table::add_symbol(), and Symbol_table::set_peer(). |
|
Definition at line 33 of file symbol_table.h. References base_len, and name. Referenced by Symbol_table::add_symbol(), and Function_signature::make_builtin(). |
|
Set status of this symbol.
Definition at line 147 of file symbol_table.cc. References status. Referenced by Template_class_adder::add_class(), Default_class_adder::add_class(), Namespace_scope::add_function_decl(), Class_scope::add_function_decl(), Namespace_scope::add_variable(), Variable_symbol::define_variable(), Enum_symbol::Enum_symbol(), Function_symbol::Function_symbol(), Namespace_symbol::Namespace_symbol(), parse_class(), Function_signature::set_body(), Type_symbol::set_defined(), Template_class_symbol::set_definition(), Function_signature::set_generated(), Template_class_symbol::Template_class_symbol(), Typedef_symbol::Typedef_symbol(), and Variable_symbol::Variable_symbol(). |
|
Definition at line 30 of file symbol_table.h. Referenced by get_basename(), and set_name(). |
|
Definition at line 29 of file symbol_table.h. Referenced by get_basename(), get_name(), and set_name(). |
|
Definition at line 70 of file symbol_table.h. Referenced by get_status(), is_declared(), is_defined(), and set_status(). |