public abstract class Node
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
containsVariableAssignment |
protected boolean |
newline |
| Constructor and Description |
|---|
Node(int line,
boolean containsAssignment) |
| Modifier and Type | Method and Description |
|---|---|
abstract <T> T |
accept(NodeVisitor<T> visitor) |
abstract java.util.List<Node> |
childNodes() |
boolean |
containsVariableAssignment()
Does this node or one of its children contain an assignment?
|
protected static java.util.List<Node> |
createList(Node... nodes) |
protected static java.util.List<Node> |
createList(Node node) |
protected static java.util.List<Node> |
createList(Node node1,
Node node2) |
protected static java.util.List<Node> |
createList(Node node1,
Node node2,
Node node3) |
boolean |
executesOnce() |
<T extends Node> |
findFirstChild(java.lang.Class<T> nodeClass) |
java.lang.String |
getFile() |
int |
getLine() |
protected java.lang.String |
getNodeName() |
abstract NodeType |
getNodeType() |
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 |
setLine(int line) |
void |
setNewline() |
java.lang.String |
toString() |
java.lang.String |
toString(boolean indent,
int indentation) |
java.lang.String |
toStringExtraInfo()
Not all interesting info in the AST is from Node data.
|
protected java.lang.String |
toStringInternal()
Overridden by nodes that have additional internal state to be displated in toString.
|
void |
unsetNewline() |
protected boolean containsVariableAssignment
protected boolean newline
public void setNewline()
public void unsetNewline()
public boolean isNewline()
public int getLine()
public java.lang.String getFile()
public void setLine(int line)
public abstract <T> T accept(NodeVisitor<T> visitor)
public abstract java.util.List<Node> childNodes()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringExtraInfo()
public java.lang.String toString(boolean indent,
int indentation)
protected java.lang.String toStringInternal()
protected java.lang.String getNodeName()
public <T extends Node> T findFirstChild(java.lang.Class<T> nodeClass)
public abstract NodeType getNodeType()
public boolean isNil()
public boolean needsDefinitionCheck()
public boolean containsVariableAssignment()
public boolean executesOnce()
Copyright © 2001-2022 JRuby. All Rights Reserved.