C# Class Rhino.Ast.ForLoop

C-style for-loop statement.
C-style for-loop statement. Node type is Rhino.Token.FOR .

for ( ExpressionNoInopt; Expressionopt ; Expressionopt ) Statement
for ( var VariableDeclarationListNoIn; Expressionopt ; Expressionopt ) Statement
Inheritance: Loop
显示文件 Open project: hazzik/Rhino.Net Class Usage Examples

Public Methods

Method Description
ForLoop ( ) : System.Text
ForLoop ( int pos ) : System.Text
ForLoop ( int pos, int len ) : System.Text
GetCondition ( ) : AstNode

Returns loop condition

GetIncrement ( ) : AstNode

Returns loop increment expression

GetInitializer ( ) : AstNode

Returns loop initializer variable declaration list.

Returns loop initializer variable declaration list. This is either a VariableDeclaration , an Assignment , or an InfixExpression of type COMMA that chains multiple variable assignments.

SetCondition ( AstNode condition ) : void

Sets loop condition, and sets its parent to this node.

Sets loop condition, and sets its parent to this node.

SetIncrement ( AstNode increment ) : void

Sets loop increment expression, and sets its parent to this node.

Sets loop increment expression, and sets its parent to this node.

SetInitializer ( AstNode initializer ) : void

Sets loop initializer expression, and sets its parent to this node.

Sets loop initializer expression, and sets its parent to this node. Virtually any expression can be in the initializer, so no error-checking is done other than a null -check.

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

Visits this node, the initializer expression, the loop condition expression, the increment expression, and then the loop body.

Visits this node, the initializer expression, the loop condition expression, the increment expression, and then the loop body.

Method Details

ForLoop() public method

public ForLoop ( ) : System.Text
return System.Text

ForLoop() public method

public ForLoop ( int pos ) : System.Text
pos int
return System.Text

ForLoop() public method

public ForLoop ( int pos, int len ) : System.Text
pos int
len int
return System.Text

GetCondition() public method

Returns loop condition
public GetCondition ( ) : AstNode
return AstNode

GetIncrement() public method

Returns loop increment expression
public GetIncrement ( ) : AstNode
return AstNode

GetInitializer() public method

Returns loop initializer variable declaration list.
Returns loop initializer variable declaration list. This is either a VariableDeclaration , an Assignment , or an InfixExpression of type COMMA that chains multiple variable assignments.
public GetInitializer ( ) : AstNode
return AstNode

SetCondition() public method

Sets loop condition, and sets its parent to this node.
Sets loop condition, and sets its parent to this node.
/// } if condition is /// null ///
public SetCondition ( AstNode condition ) : void
condition AstNode /// loop condition. Pass an /// EmptyExpression /// if the condition is missing. ///
return void

SetIncrement() public method

Sets loop increment expression, and sets its parent to this node.
Sets loop increment expression, and sets its parent to this node.
/// } if increment is /// null ///
public SetIncrement ( AstNode increment ) : void
increment AstNode /// loop increment expression. Pass an /// EmptyExpression /// if increment is /// null /// . ///
return void

SetInitializer() public method

Sets loop initializer expression, and sets its parent to this node.
Sets loop initializer expression, and sets its parent to this node. Virtually any expression can be in the initializer, so no error-checking is done other than a null -check.
/// if condition is /// null ///
public SetInitializer ( AstNode initializer ) : void
initializer AstNode /// loop initializer. Pass an /// EmptyExpression /// if the initializer is not specified. ///
return void

ToSource() public method

public ToSource ( int depth ) : string
depth int
return string

Visit() public method

Visits this node, the initializer expression, the loop condition expression, the increment expression, and then the loop body.
Visits this node, the initializer expression, the loop condition expression, the increment expression, and then the loop body.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
return void