C# Класс Rhino.Ast.IfStatement

If-else statement.
If-else statement. Node type is Rhino.Token.IF .

IfStatement : if ( Expression ) Statement else Statement if ( Expression ) Statement
Наследование: AstNode
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
GetCondition ( ) : AstNode

Returns if condition

GetElsePart ( ) : AstNode

Returns statement to execute if condition is false

GetElsePosition ( ) : int

Returns position of "else" keyword, or -1

GetLp ( ) : int

Returns left paren offset

GetRp ( ) : int

Returns right paren position, -1 if missing

GetThenPart ( ) : AstNode

Returns statement to execute if condition is true

IfStatement ( ) : System.Text
IfStatement ( int pos ) : System.Text
IfStatement ( int pos, int len ) : System.Text
SetCondition ( AstNode condition ) : void

Sets if condition.

Sets if condition.

SetElsePart ( AstNode elsePart ) : void

Sets statement to execute if condition is false

SetElsePosition ( int elsePosition ) : void

Sets position of "else" keyword, -1 if not present

SetLp ( int lp ) : void

Sets left paren offset

SetParens ( int lp, int rp ) : void

Sets both paren positions

SetRp ( int rp ) : void

Sets right paren position, -1 if missing

SetThenPart ( AstNode thenPart ) : void

Sets statement to execute if condition is true

ToSource ( int depth ) : string
Visit ( NodeVisitor v ) : void

Visits this node, the condition, the then-part, and if supplied, the else-part.

Visits this node, the condition, the then-part, and if supplied, the else-part.

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

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

Returns if condition
public GetCondition ( ) : AstNode
Результат AstNode

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

Returns statement to execute if condition is false
public GetElsePart ( ) : AstNode
Результат AstNode

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

Returns position of "else" keyword, or -1
public GetElsePosition ( ) : int
Результат int

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

Returns left paren offset
public GetLp ( ) : int
Результат int

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

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

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

Returns statement to execute if condition is true
public GetThenPart ( ) : AstNode
Результат AstNode

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

public IfStatement ( ) : System.Text
Результат System.Text

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

public IfStatement ( int pos ) : System.Text
pos int
Результат System.Text

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

public IfStatement ( int pos, int len ) : System.Text
pos int
len int
Результат System.Text

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

Sets if condition.
Sets if condition.
/// if /// condition /// is /// null /// . ///
public SetCondition ( AstNode condition ) : void
condition AstNode
Результат void

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

Sets statement to execute if condition is false
public SetElsePart ( AstNode elsePart ) : void
elsePart AstNode /// statement to execute if condition is false. /// Can be /// null /// . ///
Результат void

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

Sets position of "else" keyword, -1 if not present
public SetElsePosition ( int elsePosition ) : void
elsePosition int
Результат void

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

Sets left paren offset
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, -1 if missing
public SetRp ( int rp ) : void
rp int
Результат void

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

Sets statement to execute if condition is true
/// if thenPart is /// null ///
public SetThenPart ( AstNode thenPart ) : void
thenPart AstNode
Результат void

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

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

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

Visits this node, the condition, the then-part, and if supplied, the else-part.
Visits this node, the condition, the then-part, and if supplied, the else-part.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
Результат void