Package org.jruby.ast

Class NewlineNode

java.lang.Object
org.jruby.ast.Node
org.jruby.ast.NewlineNode

public class NewlineNode extends Node
Note: This is a dead class but we leave it because people write against Visitor and we do not want those consumers to break. 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.
  • Constructor Details

    • NewlineNode

      @Deprecated public NewlineNode(int line, Node nextNode)
      Deprecated.
  • Method Details

    • getNodeType

      public NodeType getNodeType()
      Specified by:
      getNodeType in class Node
      Returns:
      the nodeId
    • accept

      public <T> T accept(NodeVisitor<T> 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 List<Node> childNodes()
      Specified by:
      childNodes in class Node