org.jrubyparser.ast
Class YieldNode

java.lang.Object
  extended by org.jrubyparser.ast.Node
      extended by org.jrubyparser.ast.YieldNode
All Implemented Interfaces:
IArgumentNode, ISourcePositionHolder
Direct Known Subclasses:
ZYieldNode

public class YieldNode
extends Node
implements IArgumentNode

Represents a yield statement.


Constructor Summary
YieldNode(SourcePosition position, Node argsNode, boolean expandedArguments)
          Construct a new YieldNode.
 
Method Summary
 Object accept(NodeVisitor iVisitor)
          Accept for the visitor pattern.
 Node getArgs()
           
 Node getArgsNode()
          Deprecated. 
 boolean getExpandArguments()
           
 NodeType getNodeType()
           
 boolean hasParens()
           
 boolean isSame(Node other)
          Checks node for 'sameness' for diffing.
 void setArgs(Node args)
           
 void setHasParens(boolean hasParens)
           
 
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

YieldNode

public YieldNode(SourcePosition position,
                 Node argsNode,
                 boolean expandedArguments)
Construct a new YieldNode.

Parameters:
position - position of the node in the source
argsNode - the arguments to the yield
expandedArguments - whether the arguments should be treated as directly-passed args as in yield 1, 2, 3 (expandArguments = true) versus yield [1, 2, 3] (expandArguments = false).
Method Detail

isSame

public boolean isSame(Node other)
Description copied from class: Node
Checks node for 'sameness' for diffing.

Overrides:
isSame in class Node
Parameters:
other - The node to be compared to.
Returns:
Returns a boolean.

getNodeType

public NodeType getNodeType()
Specified by:
getNodeType in class Node
Returns:
the nodeId

accept

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

Specified by:
accept in class Node
Parameters:
iVisitor - the visitor

getArgsNode

@Deprecated
public Node getArgsNode()
Deprecated. 

Gets the argsNode.

Returns:
Returns a Node

getArgs

public Node getArgs()
Specified by:
getArgs in interface IArgumentNode

setArgs

public void setArgs(Node args)
Specified by:
setArgs in interface IArgumentNode

getExpandArguments

public boolean getExpandArguments()

hasParens

public boolean hasParens()
Specified by:
hasParens in interface IArgumentNode

setHasParens

public void setHasParens(boolean hasParens)
Specified by:
setHasParens in interface IArgumentNode


Copyright © 2013. All Rights Reserved.