public abstract class Node extends Object implements ISourcePositionHolder, ParseResult
Constructor and Description |
---|
Node(ISourcePosition position) |
Modifier and Type | Method and Description |
---|---|
abstract <T> T |
accept(NodeVisitor<T> visitor) |
abstract List<Node> |
childNodes() |
protected static List<Node> |
createList(Node... nodes) |
protected static List<Node> |
createList(Node node) |
protected static List<Node> |
createList(Node node1,
Node node2) |
protected static List<Node> |
createList(Node node1,
Node node2,
Node node3) |
<T extends Node> |
findFirstChild(Class<T> nodeClass) |
protected String |
getNodeName() |
abstract NodeType |
getNodeType() |
ISourcePosition |
getPosition()
Location of this node within the source
|
boolean |
isNil()
Whether the node evaluates to nil and has no side effects.
|
boolean |
needsDefinitionCheck()
Check whether the given node is considered always "defined" or whether it
has some form of definition check.
|
void |
setPosition(ISourcePosition position) |
String |
toString() |
String |
toString(boolean indent,
int indentation) |
public Node(ISourcePosition position)
public ISourcePosition getPosition()
getPosition
in interface ISourcePositionHolder
public void setPosition(ISourcePosition position)
setPosition
in interface ISourcePositionHolder
public abstract <T> T accept(NodeVisitor<T> visitor)
public String toString(boolean indent, int indentation)
protected String getNodeName()
public abstract NodeType getNodeType()
public boolean isNil()
public boolean needsDefinitionCheck()
Copyright © 2001-2015 JRuby. All Rights Reserved.