public abstract class Node extends Object implements ISourcePositionHolder, ParseResult
Modifier and Type | Field and Description |
---|---|
protected boolean |
containsVariableAssignment |
protected boolean |
newline |
Constructor and Description |
---|
Node(ISourcePosition position,
boolean containsAssignment) |
Modifier and Type | Method and Description |
---|---|
abstract <T> T |
accept(NodeVisitor<T> visitor) |
abstract List<Node> |
childNodes() |
boolean |
containsVariableAssignment()
Does this node or one of its children contain an assignment?
|
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) |
int |
getLine() |
protected String |
getNodeName() |
abstract NodeType |
getNodeType() |
ISourcePosition |
getPosition()
Location of this node within the source
|
boolean |
isNewline() |
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 |
setNewline() |
void |
setPosition(ISourcePosition position) |
String |
toString() |
String |
toString(boolean indent,
int indentation) |
protected boolean containsVariableAssignment
protected boolean newline
public Node(ISourcePosition position, boolean containsAssignment)
public void setNewline()
public boolean isNewline()
public ISourcePosition getPosition()
getPosition
in interface ISourcePositionHolder
public int getLine()
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()
public boolean containsVariableAssignment()
Copyright © 2001-2016 JRuby. All Rights Reserved.