org.jruby.ast
Class ForNode

java.lang.Object
  extended byorg.jruby.ast.Node
      extended byorg.jruby.ast.IterNode
          extended byorg.jruby.ast.ForNode
All Implemented Interfaces:
InstructionContext, ISourcePositionHolder, java.io.Serializable

public class ForNode
extends IterNode

A 'for' statement. This is implemented using iter and that is how MRI does things, but 'for's do not have their own stack, so doing this way is mildly painful.

See Also:
IterNode, Serialized Form

Field Summary
 
Fields inherited from class org.jruby.ast.Node
instruction, nodeId
 
Constructor Summary
ForNode(ISourcePosition position, Node varNode, Node bodyNode, Node iterNode)
           
 
Method Summary
 Instruction accept(NodeVisitor iVisitor)
          Accept for the visitor pattern.
 java.util.List childNodes()
           
 Node getIterNode()
           
 
Methods inherited from class org.jruby.ast.IterNode
getBodyNode, getScope, getVarNode
 
Methods inherited from class org.jruby.ast.Node
addComment, addComments, createList, createList, createList, createList, getComments, getNodeName, getPosition, getPositionIncludingComments, hasComments, setPosition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForNode

public ForNode(ISourcePosition position,
               Node varNode,
               Node bodyNode,
               Node iterNode)
Method Detail

getIterNode

public Node getIterNode()

accept

public Instruction accept(NodeVisitor iVisitor)
Accept for the visitor pattern.

Overrides:
accept in class IterNode
Parameters:
iVisitor - the visitor

childNodes

public java.util.List childNodes()
Overrides:
childNodes in class IterNode


Copyright © 2002-2007 JRuby Team. All Rights Reserved.