C# Class Rhino.Ast.IfStatement

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

IfStatement : if ( Expression ) Statement else Statement if ( Expression ) Statement
Inheritance: AstNode
Afficher le fichier Open project: hazzik/Rhino.Net Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

GetCondition() public méthode

Returns if condition
public GetCondition ( ) : AstNode
Résultat AstNode

GetElsePart() public méthode

Returns statement to execute if condition is false
public GetElsePart ( ) : AstNode
Résultat AstNode

GetElsePosition() public méthode

Returns position of "else" keyword, or -1
public GetElsePosition ( ) : int
Résultat int

GetLp() public méthode

Returns left paren offset
public GetLp ( ) : int
Résultat int

GetRp() public méthode

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

GetThenPart() public méthode

Returns statement to execute if condition is true
public GetThenPart ( ) : AstNode
Résultat AstNode

IfStatement() public méthode

public IfStatement ( ) : System.Text
Résultat System.Text

IfStatement() public méthode

public IfStatement ( int pos ) : System.Text
pos int
Résultat System.Text

IfStatement() public méthode

public IfStatement ( int pos, int len ) : System.Text
pos int
len int
Résultat System.Text

SetCondition() public méthode

Sets if condition.
Sets if condition.
/// if /// condition /// is /// null /// . ///
public SetCondition ( AstNode condition ) : void
condition AstNode
Résultat void

SetElsePart() public méthode

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 /// . ///
Résultat void

SetElsePosition() public méthode

Sets position of "else" keyword, -1 if not present
public SetElsePosition ( int elsePosition ) : void
elsePosition int
Résultat void

SetLp() public méthode

Sets left paren offset
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, -1 if missing
public SetRp ( int rp ) : void
rp int
Résultat void

SetThenPart() public méthode

Sets statement to execute if condition is true
/// if thenPart is /// null ///
public SetThenPart ( AstNode thenPart ) : void
thenPart AstNode
Résultat void

ToSource() public méthode

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

Visit() public méthode

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
Résultat void