|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jrubyparser.ast.Node
org.jrubyparser.ast.UnaryCallNode
public class UnaryCallNode
An operator call on one of the unary operators '+' or '-' that lexically appears to have the same name as the binary operator, but semantically has a name decorated with an '@' sigil. These two operators are syntactically distinct from use of other operators, so they are made distinct in the AST with this node.
| Field Summary | |
|---|---|
protected String |
lexicalName
|
| Constructor Summary | |
|---|---|
UnaryCallNode(SourcePosition position,
Node receiverNode,
String lexicalName)
|
|
| Method Summary | |
|---|---|
Object |
accept(NodeVisitor iVisitor)
Accept for the visitor pattern. |
String |
getLexicalName()
Gets the name as it lexically appears in the source code, undecorated by the '@' sigil. |
SourcePosition |
getLexicalNamePosition()
The position of the name + any sigils that come with it. |
String |
getName()
Gets the name as it is semantically, decorated by the '@' sigil. |
SourcePosition |
getNamePosition()
The position of just the name part of the node. |
NodeType |
getNodeType()
|
Node |
getReceiver()
|
Node |
getReceiverNode()
Deprecated. |
boolean |
hasParens()
|
boolean |
isLexicalNameMatch(String name)
|
boolean |
isNameMatch(String name)
|
boolean |
isSame(Node node)
Checks node for 'sameness' for diffing. |
void |
setHasParens(boolean hasParens)
|
void |
setLexicalName(String lexicalName)
|
void |
setName(String name)
Set the name (name should not include sigils). |
void |
setReceiver(Node receiver)
|
| 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, setParent, setPosition, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String lexicalName
| Constructor Detail |
|---|
public UnaryCallNode(SourcePosition position,
Node receiverNode,
String lexicalName)
| Method Detail |
|---|
public boolean isSame(Node node)
Node
isSame in class Nodenode - The node to be compared to.
public NodeType getNodeType()
getNodeType in class Nodepublic Object accept(NodeVisitor iVisitor)
accept in class NodeiVisitor - the visitorpublic boolean hasParens()
public void setHasParens(boolean hasParens)
public String getLexicalName()
getLexicalName in interface INameNodepublic String getName()
getName in interface INameNodepublic void setLexicalName(String lexicalName)
public void setName(String name)
INameNode
setName in interface INameNodepublic boolean isLexicalNameMatch(String name)
public boolean isNameMatch(String name)
isNameMatch in interface INameMatchable@Deprecated public Node getReceiverNode()
public Node getReceiver()
public void setReceiver(Node receiver)
public SourcePosition getNamePosition()
INameNode
getNamePosition in interface INameNodepublic SourcePosition getLexicalNamePosition()
INameNode
getLexicalNamePosition in interface INameNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||