C# Class Rhino.Ast.ForInLoop

For-in or for-each-in statement.
For-in or for-each-in statement. Node type is Rhino.Token.FOR .

for [each] ( LeftHandSideExpression in Expression ) Statement
for [each] ( var VariableDeclarationNoIn in Expression ) Statement
Inheritance: Loop
Mostrar archivo Open project: hazzik/Rhino.Net Class Usage Examples

Protected Properties

Property Type Description
eachPosition int
inPosition int
isForEach bool
iteratedObject AstNode
iterator AstNode

Public Methods

Method Description
ForInLoop ( ) : System.Text
ForInLoop ( int pos ) : System.Text
ForInLoop ( int pos, int len ) : System.Text
GetEachPosition ( ) : int

Returns position of "each" keyword

GetInPosition ( ) : int

Returns position of "in" keyword

GetIteratedObject ( ) : AstNode

Returns object being iterated over

GetIterator ( ) : AstNode

Returns loop iterator expression

IsForEach ( ) : bool

Returns whether the loop is a for-each loop

SetEachPosition ( int eachPosition ) : void

Sets position of "each" keyword

SetInPosition ( int inPosition ) : void

Sets position of "in" keyword

SetIsForEach ( bool isForEach ) : void

Sets whether the loop is a for-each loop

SetIteratedObject ( AstNode @object ) : void

Sets object being iterated over, and sets its parent to this node.

Sets object being iterated over, and sets its parent to this node.

SetIterator ( AstNode iterator ) : void

Sets loop iterator expression: the part before the "in" keyword.

Sets loop iterator expression: the part before the "in" keyword. Also sets its parent to this node.

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

Visits this node, the iterator, the iterated object, and the body.

Visits this node, the iterator, the iterated object, and the body.

Method Details

ForInLoop() public method

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

ForInLoop() public method

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

ForInLoop() public method

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

GetEachPosition() public method

Returns position of "each" keyword
public GetEachPosition ( ) : int
return int

GetInPosition() public method

Returns position of "in" keyword
public GetInPosition ( ) : int
return int

GetIteratedObject() public method

Returns object being iterated over
public GetIteratedObject ( ) : AstNode
return AstNode

GetIterator() public method

Returns loop iterator expression
public GetIterator ( ) : AstNode
return AstNode

IsForEach() public method

Returns whether the loop is a for-each loop
public IsForEach ( ) : bool
return bool

SetEachPosition() public method

Sets position of "each" keyword
public SetEachPosition ( int eachPosition ) : void
eachPosition int /// position of "each" keyword, /// or -1 if not present. ///
return void

SetInPosition() public method

Sets position of "in" keyword
public SetInPosition ( int inPosition ) : void
inPosition int /// position of "in" keyword, /// or -1 if not present (e.g. in presence of a syntax error) ///
return void

SetIsForEach() public method

Sets whether the loop is a for-each loop
public SetIsForEach ( bool isForEach ) : void
isForEach bool
return void

SetIteratedObject() public method

Sets object being iterated over, and sets its parent to this node.
Sets object being iterated over, and sets its parent to this node.
/// if /// object /// is /// null ///
public SetIteratedObject ( AstNode @object ) : void
@object AstNode
return void

SetIterator() public method

Sets loop iterator expression: the part before the "in" keyword.
Sets loop iterator expression: the part before the "in" keyword. Also sets its parent to this node.
/// if /// iterator /// is /// null ///
public SetIterator ( AstNode iterator ) : void
iterator AstNode
return void

ToSource() public method

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

Visit() public method

Visits this node, the iterator, the iterated object, and the body.
Visits this node, the iterator, the iterated object, and the body.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
return void

Property Details

eachPosition protected_oe property

protected int eachPosition
return int

inPosition protected_oe property

protected int inPosition
return int

isForEach protected_oe property

protected bool isForEach
return bool

iteratedObject protected_oe property

protected AstNode iteratedObject
return AstNode

iterator protected_oe property

protected AstNode iterator
return AstNode