org.jrubyparser.ast
Class ForNode

java.lang.Object
  extended by org.jrubyparser.ast.Node
      extended by org.jrubyparser.ast.IterNode
          extended by org.jrubyparser.ast.ForNode
All Implemented Interfaces:
IBlockScope, IParameterScope, IScope, ISourcePositionHolder

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

Constructor Summary
ForNode(SourcePosition position, Node varNode, Node bodyNode, Node iterNode, StaticScope scope)
           
 
Method Summary
 Object accept(NodeVisitor iVisitor)
          Accept for the visitor pattern.
 Node getIter()
           
 Node getIterNode()
          Deprecated. 
 NodeType getNodeType()
           
 boolean isSame(Node node)
          Checks node for 'sameness' for diffing.
 
Methods inherited from class org.jrubyparser.ast.IterNode
getBody, getBodyNode, getParameterNamed, getScope, getVar, getVariableReferencesNamed, getVarNode, isParameterUsed
 
Methods inherited from class org.jrubyparser.ast.Node
adopt, adopt, adoptUsingNodesPosition, childNodes, comparePositionWith, createList, getClosestIScope, getClosestModule, getGrandParent, getInlineComment, getInnermostIter, getMethodFor, getNodeAt, getNodeName, getOutermostIter, getParent, getPosition, getPositionIncludingComments, getPreviousComments, insertAfter, insertAll, insertBefore, insertNode, isBlockParameter, isDescendentOf, isLeaf, isMethodParameter, setParent, setPosition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForNode

public ForNode(SourcePosition position,
               Node varNode,
               Node bodyNode,
               Node iterNode,
               StaticScope scope)
Method Detail

isSame

public boolean isSame(Node node)
Checks node for 'sameness' for diffing.

Overrides:
isSame in class IterNode
Parameters:
node - to be compared to
Returns:
Returns a boolean

getNodeType

public NodeType getNodeType()
Overrides:
getNodeType in class IterNode
Returns:
the nodeId

getIter

public Node getIter()

getIterNode

@Deprecated
public Node getIterNode()
Deprecated. 


accept

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

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


Copyright © 2013. All Rights Reserved.