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

Enum_symbol Class Reference

Enumeration type. More...

#include <enum.h>

Inheritance diagram for Enum_symbol:

Inheritance graph
[legend]
Collaboration diagram for Enum_symbol:

Collaboration graph
[legend]
List of all members.

Public Methods

 Enum_symbol ()
 ~Enum_symbol ()
Symbol::Kind get_kind () const
Ptreeprocess_value (Ptree *tree, Ptree *previous, Abstract_scope *scope)
 Process an enumerator definition. More...


Private Attributes

std::vector< Variable_symbol * > values

Detailed Description

Enumeration type.

We use the following representation for enums:

Definition at line 23 of file enum.h.


Constructor & Destructor Documentation

Enum_symbol::Enum_symbol  
 

Definition at line 19 of file enum.cc.

References Symbol::set_status(), and Symbol::st_Declared.

Enum_symbol::~Enum_symbol  
 

Definition at line 27 of file enum.cc.


Member Function Documentation

Symbol::Kind Enum_symbol::get_kind   const [virtual]
 

Implements Symbol.

Definition at line 33 of file enum.cc.

References Symbol::k_Enum.

Ptree * Enum_symbol::process_value Ptree   tree,
Ptree   previous,
Abstract_scope   scope
 

Process an enumerator definition.

Parameters:
tree  the enumerator definition. Either a symbol, or [symbol = expr]
previous  return value of process_value for previous enumerator, 0 on initial call
scope  scope to put identifiers into

Definition at line 45 of file enum.cc.

References Abstract_scope::add_symbol(), compile_error(), Expr_result::do_integral_promotions(), expect_ptree(), Ptree::First(), Expr_result::get_tree(), Type_symbol::get_type(), Expr_result::get_type(), Ptree::GetLength(), Ptree::GetPosition(), Source::instance(), Type::is_int(), Ptree::IsLeaf(), Ptree::List(), ntName, s_None, Ptree::Second(), Ptree::Third(), Ptree::ToString(), and values.

Referenced by parse_enum().


Member Data Documentation

std::vector<Variable_symbol*> Enum_symbol::values [private]
 

Definition at line 24 of file enum.h.

Referenced by process_value().


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