org.jruby.ast
Class NewlineNode

java.lang.Object
  extended byorg.jruby.ast.Node
      extended byorg.jruby.ast.NewlineNode
All Implemented Interfaces:
InstructionContext, ISourcePositionHolder, java.io.Serializable

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.

Author:
jpetersen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jruby.ast.Node
instruction, nodeId
 
Constructor Summary
NewlineNode(ISourcePosition position, Node nextNode)
           
 
Method Summary
 Instruction accept(NodeVisitor iVisitor)
          RubyMethod used by visitors.
 java.util.List childNodes()
           
 Node getNextNode()
          Gets the nextNode.
 
Methods inherited from class org.jruby.ast.Node
addComment, addComments, createList, createList, createList, createList, getComments, getNodeName, getPosition, getPositionIncludingComments, hasComments, setPosition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NewlineNode

public NewlineNode(ISourcePosition position,
                   Node nextNode)
Method Detail

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 childNodes()
Specified by:
childNodes in class Node


Copyright © 2002-2007 JRuby Team. All Rights Reserved.