CsSwitchStatement Struct Reference

Switch statement AST node. More...

Inheritance diagram for CsSwitchStatement:

CsStatement CsNode List of all members.

Public Member Functions

 CsSwitchStatement ()
 CsSwitchStatement (LineInfo line_info)
virtual ~CsSwitchStatement ()
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

CsExpressionexpression
 Switch expression.
FastArray< CsSwitchSection * > sections
 Sections.
CsEntityBlockentity
 Switch block entity.
CsEntityTypeRefgoverning_type
 Governing type [ECMA-334, 15.7.2].
CsTokenIndex switch_token
CsTokenIndex lparen_token
CsTokenIndex rparen_token
CsTokenIndex lcurly_token
CsTokenIndex rcurly_token

Detailed Description

Switch statement AST node.

EBNF grammar:

switch-statement:
  "switch" "(" expression ")" switch-block

switch-block:
  "{" (switch-sections)? "}"

switch-sections:
  ( switch-section )+


Constructor & Destructor Documentation

CsSwitchStatement::CsSwitchStatement  )  [inline]
 

CsSwitchStatement::CsSwitchStatement LineInfo  line_info  )  [inline, explicit]
 

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


Member Function Documentation

virtual void CsSwitchStatement::addEntityDefinitions CsEntityCollector tokenCollector  )  [virtual]
 

Collect entities defined in this AST node.

Implements CsNode.

virtual void CsSwitchStatement::addEntityReferences CsEntityCollector tokenCollector  )  [virtual]
 

Collect entity references.

Implements CsNode.

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

Collect token indexes associated with this AST node.

Implements CsNode.

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

Recusively collect token indexes in source code order.

Implements CsNode.

virtual void CsSwitchStatement::build_entities CsDisplay &  display  )  [virtual]
 

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

Implements CsNode.

virtual void CsSwitchStatement::clearEntities  )  [virtual]
 

Clear all entity references (for internal purpose only).

Implements CsNode.

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

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

Implements CsNode.

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

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

Implements CsNode.


Member Data Documentation

CsEntityBlock* CsSwitchStatement::entity
 

Switch block entity.

CsExpression* CsSwitchStatement::expression
 

Switch expression.

CsEntityTypeRef* CsSwitchStatement::governing_type
 

Governing type [ECMA-334, 15.7.2].

CsTokenIndex CsSwitchStatement::lcurly_token
 

CsTokenIndex CsSwitchStatement::lparen_token
 

CsTokenIndex CsSwitchStatement::rcurly_token
 

CsTokenIndex CsSwitchStatement::rparen_token
 

FastArray<CsSwitchSection*> CsSwitchStatement::sections
 

Sections.

CsTokenIndex CsSwitchStatement::switch_token
 

© 2005 metaspec