CsSwitchLabel Struct Reference

Switch label AST node. More...

Inheritance diagram for CsSwitchLabel:

CsNode List of all members.

Public Member Functions

 CsSwitchLabel ()
 CsSwitchLabel (CsNode *parent, LineInfo line_info)
virtual ~CsSwitchLabel ()
virtual void build_entities (CsDisplay &display)
 Build Entities - pass 2 (for internal purpose only).
virtual void type_lookup (CsDisplay &display)
 Type Lookup - pass 3 (for internal purpose only).
virtual void member_lookup (CsDisplay &display)
 Member Lookup - pass 4 (for internal purpose only).
virtual void addTokensRecursive (CsTokenCollector &tokenCollector)
 Recusively collect token indexes in source code order.
virtual void addTokens (CsTokenCollector &tokenCollector)
 Collect token indexes associated with this AST node.
virtual void addEntityDefinitions (CsEntityCollector &tokenCollector)
 Collect entities defined in this AST node.
virtual void addEntityReferences (CsEntityCollector &tokenCollector)
 Collect entity references.
virtual void clearEntities ()
 Clear all entity references (for internal purpose only).

Public Attributes

bool bDefault
 true - default, false - case.
CsExpressionexpression
 Case expression.
CsTokenIndex case_default_token
CsTokenIndex colon_token

Detailed Description

Switch label AST node.

EBNF grammar:

switch-label:
  "case" constant-expression ":"
  "default" ":"


Constructor & Destructor Documentation

CsSwitchLabel::CsSwitchLabel  )  [inline]
 

CsSwitchLabel::CsSwitchLabel CsNode parent,
LineInfo  line_info
[inline]
 

virtual CsSwitchLabel::~CsSwitchLabel  )  [inline, virtual]
 


Member Function Documentation

virtual void CsSwitchLabel::addEntityDefinitions CsEntityCollector tokenCollector  )  [inline, virtual]
 

Collect entities defined in this AST node.

Implements CsNode.

virtual void CsSwitchLabel::addEntityReferences CsEntityCollector tokenCollector  )  [inline, virtual]
 

Collect entity references.

Implements CsNode.

virtual void CsSwitchLabel::addTokens CsTokenCollector tokenCollector  )  [virtual]
 

Collect token indexes associated with this AST node.

Implements CsNode.

virtual void CsSwitchLabel::addTokensRecursive CsTokenCollector tokenCollector  )  [virtual]
 

Recusively collect token indexes in source code order.

Implements CsNode.

virtual void CsSwitchLabel::build_entities CsDisplay &  display  )  [inline, virtual]
 

Build Entities - pass 2 (for internal purpose only).

Implements CsNode.

virtual void CsSwitchLabel::clearEntities  )  [virtual]
 

Clear all entity references (for internal purpose only).

Implements CsNode.

virtual void CsSwitchLabel::member_lookup CsDisplay &  display  )  [virtual]
 

Member Lookup - pass 4 (for internal purpose only).

Implements CsNode.

virtual void CsSwitchLabel::type_lookup CsDisplay &  display  )  [virtual]
 

Type Lookup - pass 3 (for internal purpose only).

Implements CsNode.


Member Data Documentation

bool CsSwitchLabel::bDefault
 

true - default, false - case.

CsTokenIndex CsSwitchLabel::case_default_token
 

CsTokenIndex CsSwitchLabel::colon_token
 

CsExpression* CsSwitchLabel::expression
 

Case expression.

© 2005 metaspec