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 clearEntities ()
 Clear all entity references (for internal purpose only).
virtual void addTokensRecursive (CsTokenCollector &tokenCollector)
 Recursively 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 visit (CsAstVisitor *visitor)
 CsAstVisitor support.
virtual void callback (CsAstCallback *visitor)
 CsAstCallback support.

Public Attributes

CsExpressionexpression
 Switch expression.
FastArray< CsSwitchSection * > sections
 Sections.
CsEntityBlockentity
 Switch block entity.
CsEntityTypeRefgoverning_type
 Governing type [ECMA-334, 15.7.2].
Int64HashTableTemplate
< CsSwitchLabel * > * 
int_label_table
 Int label table.
HashTableTemplate
< CsSwitchLabel * > * 
string_label_table
 String label table.
CsSwitchLabeldefault_label
 Default label.
CsSwitchLabelliteral_null_label
 Literal null label.
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]

Recursively 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).

Reimplemented from CsStatement.

virtual void CsSwitchStatement::callback ( CsAstCallback visitor  )  [inline, virtual]

CsAstCallback support.

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).

Reimplemented from CsStatement.

virtual void CsSwitchStatement::visit ( CsAstVisitor visitor  )  [inline, virtual]

CsAstVisitor support.

Implements CsNode.


Member Data Documentation

Governing type [ECMA-334, 15.7.2].

Int label table.

String label table.

© 2010 metaspec