C# Class Rhino.Ast.SwitchStatement

Switch statement AST node type.
Switch statement AST node type. Node type is Rhino.Token.SWITCH .

SwitchStatement : switch ( Expression ) CaseBlock CaseBlock : { [CaseClauses] } { [CaseClauses] DefaultClause [CaseClauses] } CaseClauses : CaseClause CaseClauses CaseClause CaseClause : case Expression : [StatementList] DefaultClause : default : [StatementList]
Inheritance: Jump
Afficher le fichier Open project: hazzik/Rhino.Net Class Usage Examples

Méthodes publiques

Méthode Description
AddCase ( SwitchCase switchCase ) : void

Adds a switch case statement to the end of the list.

Adds a switch case statement to the end of the list.

GetCases ( ) : IList

Returns case statement list.

Returns case statement list. If there are no cases, returns an immutable empty list.

GetExpression ( ) : AstNode

Returns the switch discriminant expression

GetLp ( ) : int

Returns left paren position, -1 if missing

GetRp ( ) : int

Returns right paren position, -1 if missing

SetCases ( IList cases ) : void

Sets case statement list, and sets the parent of each child case to this node.

Sets case statement list, and sets the parent of each child case to this node.

SetExpression ( AstNode expression ) : void

Sets the switch discriminant expression, and sets its parent to this node.

Sets the switch discriminant expression, and sets its parent to this node.

SetLp ( int lp ) : void

Sets left paren position

SetParens ( int lp, int rp ) : void

Sets both paren positions

SetRp ( int rp ) : void

Sets right paren position

SwitchStatement ( ) : System.Collections.Generic
SwitchStatement ( int pos ) : System.Collections.Generic
SwitchStatement ( int pos, int len ) : System.Collections.Generic
ToSource ( int depth ) : string
Visit ( NodeVisitor v ) : void

Visits this node, then the switch-expression, then the cases in lexical order.

Visits this node, then the switch-expression, then the cases in lexical order.

Method Details

AddCase() public méthode

Adds a switch case statement to the end of the list.
Adds a switch case statement to the end of the list.
/// } if switchCase is /// null ///
public AddCase ( SwitchCase switchCase ) : void
switchCase SwitchCase
Résultat void

GetCases() public méthode

Returns case statement list.
Returns case statement list. If there are no cases, returns an immutable empty list.
public GetCases ( ) : IList
Résultat IList

GetExpression() public méthode

Returns the switch discriminant expression
public GetExpression ( ) : AstNode
Résultat AstNode

GetLp() public méthode

Returns left paren position, -1 if missing
public GetLp ( ) : int
Résultat int

GetRp() public méthode

Returns right paren position, -1 if missing
public GetRp ( ) : int
Résultat int

SetCases() public méthode

Sets case statement list, and sets the parent of each child case to this node.
Sets case statement list, and sets the parent of each child case to this node.
public SetCases ( IList cases ) : void
cases IList /// list, which may be /// null /// to remove all the cases ///
Résultat void

SetExpression() public méthode

Sets the switch discriminant expression, and sets its parent to this node.
Sets the switch discriminant expression, and sets its parent to this node.
/// } if expression is /// null ///
public SetExpression ( AstNode expression ) : void
expression AstNode
Résultat void

SetLp() public méthode

Sets left paren position
public SetLp ( int lp ) : void
lp int
Résultat void

SetParens() public méthode

Sets both paren positions
public SetParens ( int lp, int rp ) : void
lp int
rp int
Résultat void

SetRp() public méthode

Sets right paren position
public SetRp ( int rp ) : void
rp int
Résultat void

SwitchStatement() public méthode

public SwitchStatement ( ) : System.Collections.Generic
Résultat System.Collections.Generic

SwitchStatement() public méthode

public SwitchStatement ( int pos ) : System.Collections.Generic
pos int
Résultat System.Collections.Generic

SwitchStatement() public méthode

public SwitchStatement ( int pos, int len ) : System.Collections.Generic
pos int
len int
Résultat System.Collections.Generic

ToSource() public méthode

public ToSource ( int depth ) : string
depth int
Résultat string

Visit() public méthode

Visits this node, then the switch-expression, then the cases in lexical order.
Visits this node, then the switch-expression, then the cases in lexical order.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Résultat void