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
파일 보기 프로젝트 열기: hazzik/Rhino.Net 1 사용 예제들

공개 메소드들

메소드 설명
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