org.jrubyparser.ast
Class NewlineNode
java.lang.Object
org.jrubyparser.ast.Node
org.jrubyparser.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.jrubyparser.ast.Node |
adopt, adopt, adoptUsingNodesPosition, childNodes, comparePositionWith, createList, getClosestIScope, getClosestModule, getGrandParent, getInlineComment, getInnermostIter, getMethodFor, getNodeAt, getNodeName, getOutermostIter, getParent, getPosition, getPositionIncludingComments, getPreviousComments, insertAfter, insertAll, insertBefore, insertNode, isBlockParameter, isDescendentOf, isLeaf, isMethodParameter, isSame, setParent, setPosition, toString |
NewlineNode
public NewlineNode(SourcePosition position,
Node nextNode)
getNodeType
public NodeType getNodeType()
- Specified by:
getNodeType in class Node
- Returns:
- the nodeId
accept
public Object 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
Copyright © 2013. All Rights Reserved.