C# Класс 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]
Наследование: Jump
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

AddCase() публичный Метод

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
Результат void

GetCases() публичный Метод

Returns case statement list.
Returns case statement list. If there are no cases, returns an immutable empty list.
public GetCases ( ) : IList
Результат IList

GetExpression() публичный Метод

Returns the switch discriminant expression
public GetExpression ( ) : AstNode
Результат AstNode

GetLp() публичный Метод

Returns left paren position, -1 if missing
public GetLp ( ) : int
Результат int

GetRp() публичный Метод

Returns right paren position, -1 if missing
public GetRp ( ) : int
Результат int

SetCases() публичный Метод

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 ///
Результат void

SetExpression() публичный Метод

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
Результат void

SetLp() публичный Метод

Sets left paren position
public SetLp ( int lp ) : void
lp int
Результат void

SetParens() публичный Метод

Sets both paren positions
public SetParens ( int lp, int rp ) : void
lp int
rp int
Результат void

SetRp() публичный Метод

Sets right paren position
public SetRp ( int rp ) : void
rp int
Результат void

SwitchStatement() публичный Метод

public SwitchStatement ( ) : System.Collections.Generic
Результат System.Collections.Generic

SwitchStatement() публичный Метод

public SwitchStatement ( int pos ) : System.Collections.Generic
pos int
Результат System.Collections.Generic

SwitchStatement() публичный Метод

public SwitchStatement ( int pos, int len ) : System.Collections.Generic
pos int
len int
Результат System.Collections.Generic

ToSource() публичный Метод

public ToSource ( int depth ) : string
depth int
Результат string

Visit() публичный Метод

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
Результат void