org.jruby.ast
Class NewlineNode
java.lang.Object
org.jruby.ast.Node
org.jruby.ast.NewlineNode
- All Implemented Interfaces:
- ISourcePositionHolder
public class NewlineNode
- extends Node
A new (logical) source code line.
This is used to change the value of the ruby interpreter source and line values.
There is one such node for each logical line. Logical line differs
from physical line in that a ';' can be used to make several logical
line out of a physical line and a physical line if it is in a comment
or in a string does not necessarily correspond to a physical line.
This is normally a wrapper around another more significant node.
The parser generates such a node around each separate statement.
Methods inherited from class org.jruby.ast.Node |
addComment, addComments, assign, createList, definition, getComments, getNodeName, getPosition, getPositionIncludingComments, hasComments, isInvisible, setPosition, when |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NewlineNode
public NewlineNode(ISourcePosition position,
Node nextNode)
accept
public Instruction accept(NodeVisitor iVisitor)
- RubyMethod used by visitors.
accepts the visitor
- Specified by:
accept
in class Node
- Parameters:
iVisitor
- the visitor to accept
getNextNode
public Node getNextNode()
- Gets the nextNode.
- Returns:
- Returns a Node
childNodes
public java.util.List<Node> childNodes()
- Specified by:
childNodes
in class Node
interpret
public IRubyObject interpret(Ruby runtime,
ThreadContext context,
IRubyObject self,
Block aBlock)
- Overrides:
interpret
in class Node
toString
public java.lang.String toString()
- Overrides:
toString
in class Node
Copyright © 2002-2007 JRuby Team. All Rights Reserved.