|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jrubyparser.ast.Node
org.jrubyparser.ast.ListNode
public class ListNode
All Nodes which have a list representation inherit this. This is also used as generic container for additional information that is not directly evaluated. In particular, f_arg production rule uses this to capture arg information for the editor projects who want position info saved.
| Constructor Summary | |
|---|---|
ListNode(SourcePosition position)
|
|
ListNode(SourcePosition position,
Node firstNode)
Create a new ListNode. |
|
| Method Summary | |
|---|---|
Object |
accept(NodeVisitor visitor)
|
ListNode |
add(Node node)
|
ListNode |
addAll(ListNode other)
Add all elements in other list to this list node. |
ListNode |
addAll(Node other)
Add other element to this list |
Node |
get(int idx)
|
Node |
getLast()
|
NodeType |
getNodeType()
|
boolean |
isSame(Node node)
Checks node for 'sameness' for diffing. |
ListNode |
prepend(Node node)
|
int |
size()
|
| 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 |
|---|
public ListNode(SourcePosition position,
Node firstNode)
position - type of listnodefirstNode - first element of the listpublic ListNode(SourcePosition position)
| Method Detail |
|---|
public boolean isSame(Node node)
isSame in class Nodenode - to be compared to
public NodeType getNodeType()
getNodeType in class Nodepublic ListNode add(Node node)
public ListNode prepend(Node node)
public int size()
public ListNode addAll(ListNode other)
other - list which has elements
public ListNode addAll(Node other)
other - list which has elements
public Node getLast()
public Object accept(NodeVisitor visitor)
accept in class Nodepublic Node get(int idx)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||