org.jruby.ast
Class Node
java.lang.Object
org.jruby.ast.Node
- All Implemented Interfaces:
- ISourcePositionHolder
- Direct Known Subclasses:
- AliasNode, AndNode, ArgAuxillaryNode, ArgsCatNode, ArgsNode, ArgsPushNode, ArgumentNode, AssignableNode, AttrAssignNode, BackRefNode, BeginNode, BignumNode, BlockArg18Node, BlockArgNode, BlockPassNode, BreakNode, CallNode, CaseNode, ClassNode, ClassVarNode, Colon3Node, ConstNode, DefinedNode, DotNode, DVarNode, EncodingNode, EnsureNode, EvStrNode, FalseNode, FCallNode, FixnumNode, FlipNode, FloatNode, GlobalVarNode, HashNode, IfNode, InstVarNode, IterNode, ListNode, LiteralNode, LocalVarNode, Match2Node, Match3Node, MatchNode, MethodDefNode, ModuleNode, NewlineNode, NextNode, NilNode, NotNode, NthRefNode, OpAsgnAndNode, OpAsgnNode, OpAsgnOrNode, OpElementAsgnNode, OptArgNode, OrNode, RedoNode, RegexpNode, RescueBodyNode, RescueNode, RetryNode, ReturnNode, RootNode, SClassNode, SelfNode, SplatNode, StarNode, StrNode, SuperNode, SValueNode, SymbolNode, ToAryNode, TrueNode, UndefNode, UntilNode, VAliasNode, VCallNode, WhenNode, WhileNode, XStrNode, YieldNode, ZArrayNode, ZeroArgNode, ZSuperNode
public abstract class Node
- extends java.lang.Object
- implements ISourcePositionHolder
Base class for all Nodes in the AST
Method Summary |
abstract java.lang.Object |
accept(NodeVisitor visitor)
|
IRubyObject |
assign(Ruby runtime,
ThreadContext context,
IRubyObject self,
IRubyObject value,
Block block,
boolean checkArity)
|
abstract java.util.List<Node> |
childNodes()
|
protected static java.util.List<Node> |
createList(Node... nodes)
|
org.jruby.util.ByteList |
definition(Ruby runtime,
ThreadContext context,
IRubyObject self,
Block aBlock)
|
protected java.lang.String |
getNodeName()
|
abstract NodeType |
getNodeType()
|
ISourcePosition |
getPosition()
Location of this node within the source |
IRubyObject |
interpret(Ruby runtime,
ThreadContext context,
IRubyObject self,
Block aBlock)
|
boolean |
isInvisible()
Is the current node something that is syntactically visible in the AST. |
void |
setPosition(ISourcePosition position)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EXPRESSION_BYTELIST
public static final org.jruby.util.ByteList EXPRESSION_BYTELIST
ASSIGNMENT_BYTELIST
public static final org.jruby.util.ByteList ASSIGNMENT_BYTELIST
GLOBAL_VARIABLE_BYTELIST
public static final org.jruby.util.ByteList GLOBAL_VARIABLE_BYTELIST
METHOD_BYTELIST
public static final org.jruby.util.ByteList METHOD_BYTELIST
CLASS_VARIABLE_BYTELIST
public static final org.jruby.util.ByteList CLASS_VARIABLE_BYTELIST
CONSTANT_BYTELIST
public static final org.jruby.util.ByteList CONSTANT_BYTELIST
LOCAL_VARIABLE_BYTELIST
public static final org.jruby.util.ByteList LOCAL_VARIABLE_BYTELIST
LOCAL_VARIABLE_IN_BLOCK_BYTELIST
public static final org.jruby.util.ByteList LOCAL_VARIABLE_IN_BLOCK_BYTELIST
FALSE_BYTELIST
public static final org.jruby.util.ByteList FALSE_BYTELIST
INSTANCE_VARIABLE_BYTELIST
public static final org.jruby.util.ByteList INSTANCE_VARIABLE_BYTELIST
NIL_BYTELIST
public static final org.jruby.util.ByteList NIL_BYTELIST
SELF_BYTELIST
public static final org.jruby.util.ByteList SELF_BYTELIST
SUPER_BYTELIST
public static final org.jruby.util.ByteList SUPER_BYTELIST
TRUE_BYTELIST
public static final org.jruby.util.ByteList TRUE_BYTELIST
YIELD_BYTELIST
public static final org.jruby.util.ByteList YIELD_BYTELIST
Node
public Node(ISourcePosition position)
getPosition
public ISourcePosition getPosition()
- Location of this node within the source
- Specified by:
getPosition
in interface ISourcePositionHolder
setPosition
public void setPosition(ISourcePosition position)
- Specified by:
setPosition
in interface ISourcePositionHolder
accept
public abstract java.lang.Object accept(NodeVisitor visitor)
childNodes
public abstract java.util.List<Node> childNodes()
createList
protected static java.util.List<Node> createList(Node... nodes)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getNodeName
protected java.lang.String getNodeName()
isInvisible
public boolean isInvisible()
- Is the current node something that is syntactically visible in the AST. IDE consumers
should ignore these elements.
interpret
public IRubyObject interpret(Ruby runtime,
ThreadContext context,
IRubyObject self,
Block aBlock)
assign
public IRubyObject assign(Ruby runtime,
ThreadContext context,
IRubyObject self,
IRubyObject value,
Block block,
boolean checkArity)
definition
public org.jruby.util.ByteList definition(Ruby runtime,
ThreadContext context,
IRubyObject self,
Block aBlock)
getNodeType
public abstract NodeType getNodeType()
- Returns:
- the nodeId
Copyright © 2002-2009 JRuby Team. All Rights Reserved.