|
Class: RBVariableNode
Object
|
+--RBProgramNode
|
+--RBStatementNode
|
+--RBValueNode
|
+--RBVariableNode
|
+--RBMetaVariableNode
|
+--RBPatternVariableNode
|
+--RBSyntheticVariableNode
- Package:
- stx:goodies/refactoryBrowser/parser
- Category:
- Refactory-AST-Nodes
- Version:
- rev:
1.41
date: 2023/09/10 09:14:52
- user: cg
- file: RBVariableNode.st directory: goodies/refactoryBrowser/parser
- module: stx stc-classLibrary: parser
BRVariableNode is an AST node that represent a variable (global, inst var, temp, etc.).
Instance Variables:
token <BRValueToken> the token that contains our name and position
instance creation
-
identifierToken: anIdentifierToken
-
-
named: aString
-
accessing
-
addReferencedVariablesTo: aCollection
-
-
definingScope
-
Return the sequenceNode, blockNode or MethodNode (i.e. the scope)
that defines this variable or argument.
Return nil, if none does
-
definingSequence
-
Return the sequenceNode (i.e. the scope) that defines this variable
or nil, if no sequenceNode does.
WARNING: this seems to be misused (or misdefined), in that it will only
look for sequenceNode scopes (i.e. temporary variables),
NOT for arguments.
Use definingScope to get to those as well.
(I am not sure, if this should be fixed here,
or not, to prevent breaking existing code.
Therefore this remains as is)
-
lineNumber
-
(comment from inherited method)
lineNumber isNil ifTrue:[
-
name
-
-
precedence
-
-
startWithoutParentheses
-
-
stopWithoutParentheses
-
-
token
-
-
tokenPosition
-
comparing
-
= anObject
-
(comment from inherited method)
return true if the receiver and the arg have the same structure.
Notice:
This method is partially open coded (inlined) by the compiler(s)
identical objects are always considered equal.
redefining it may not work as expected.
-
equalTo: anObject withMapping: aDictionary
-
return true, if I am equal to another node, with a given variable name mapping.
Side effect: update the mapping dictionary as required to reflect a matching mapping (if possible)
-
equalTo: anObject withSelectorMapping: aDictionary
-
return true, if I am equal to another node, with a given selector name mapping.
Side effect: update the mapping dictionary as required to reflect a matching mapping (if possible)
-
hash
-
(comment from inherited method)
return an Integer useful as a hash key for the receiver.
This hash should return same values for objects with same
contents (i.e. use this to hash on structure)
enumeration
-
variableNodesDo: aBlock
-
evaluate a Block for all variable nodes.
initialization & release
-
identifierToken: anIdentifierToken
-
libtool3 support
-
highlightInCodeView: aCodeView
-
-
leftClickMenuInCodeView: aCodeView
-
-
rightClickMenuInCodeView: aCodeView
-
matching
-
copyInContext: aDictionary
-
queries
-
isReferringToAnExceptionInContext: aSearchDictionary
-
true iff:
(node is a global variable or node is a class variable)
and the variable refers to an Exception class (but not a Notification)
testing
-
isClassVariableInContext: aSearchDictionary
-
-
isGlobal
-
Return true if the variable node is for
a non-local (not really global), false otherwise.
Actually wrong: also returns true for inst- and class variables
(i.e. anything that is not a block- or method local)
-
isImmediate
-
-
isInstanceVariable
-
not true - also returns true for class vars and globals
-
isLocal
-
Return true if the variable node is for
a local variable, false otherwise.
Returns true for anything that is a block- or method local
-
isRead
-
Return true, if the variable is read
-
isSelf
-
true if I am the self-variable node
-
isSuper
-
-
isTemporary
-
Return true if the variable node is for
a temporary variable, false otherwise
-
isVariable
-
-
isVariableNotInLeftHandSideOfAssignment
-
Returns true iff receiver is a variable node but not
in left-hand side of assignment
-
isWrite
-
Same as isWritten - bad naming here
-
isWritten
-
Return true, if the variable is written
-
reads: variableName
-
-
references: aVariableName
-
visitor
-
acceptVisitor: aProgramNodeVisitor
-
|