CsSwitchStatement Class Reference

Switch statement AST node. More...

Inheritance diagram for CsSwitchStatement:
CsStatement CsNode

List of all members.

Public Member Functions

 CsSwitchStatement ()
override void replace (CsNode old_node, CsNode new_node)
 Replace CsNode fields.
override CsNode clone (clone_options options)
 Clone AST node.
override void addTokensRecursive (CsTokenCollector tokenCollector)
 Recursively collect token indexes in source code order.
override void addTokens (CsTokenCollector tokenCollector)
 Collect token indexes associated with this AST node.
override void visit (ICsAstVisitor visitor)
 ICsAstVisitor support.
override void callback (ICsAstCallback visitor)
 ICsAstCallback support.

Public Attributes

CsExpression expression
 Switch expression.
List< CsSwitchSectionsections
 Sections.
CsEntityBlock entity
 Switch block entity.
CsEntityTypeRef governing_type
 Governing type [ECMA-334, 15.7.2].
Dictionary< ulong, CsSwitchLabelint_label_table
 Int label table.
Dictionary< string, CsSwitchLabelstring_label_table
 String label table.
CsSwitchLabel default_label
 Default label.
CsSwitchLabel literal_null_label
 Literal null label.
int switch_token
int lparen_token
int rparen_token
int lcurly_token
int 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


Member Function Documentation

override void addTokens ( CsTokenCollector  tokenCollector  )  [virtual]

Collect token indexes associated with this AST node.

Implements CsNode.

override void addTokensRecursive ( CsTokenCollector  tokenCollector  )  [virtual]

Recursively collect token indexes in source code order.

Implements CsNode.

override void callback ( ICsAstCallback  visitor  )  [virtual]

ICsAstCallback support.

Implements CsNode.

override CsNode clone ( clone_options  options  )  [virtual]

Clone AST node.

Implements CsNode.

override void replace ( CsNode  old_node,
CsNode  new_node 
) [virtual]

Replace CsNode fields.

Reimplemented from CsNode.

override void visit ( ICsAstVisitor  visitor  )  [virtual]

ICsAstVisitor support.

Implements CsNode.


Member Data Documentation

Default label.

Switch block entity.

Switch expression.

Governing type [ECMA-334, 15.7.2].

Dictionary<ulong, CsSwitchLabel> int_label_table

Int label table.

Literal null label.

Sections.

Dictionary<string, CsSwitchLabel> string_label_table

String label table.

© 2010 metaspec