eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'RBVariableNode':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: RBVariableNode


Inheritance:

   Object
   |
   +--RBProgramNode
      |
      +--RBStatementNode
         |
         +--RBValueNode
            |
            +--RBVariableNode
               |
               +--RBMetaVariableNode
               |
               +--RBPatternVariableNode

Package:
stx:goodies/refactoryBrowser/parser
Category:
Refactory-AST-Nodes
Version:
rev: 1.34 date: 2019/02/03 15:29:45
user: cg
file: RBVariableNode.st directory: goodies/refactoryBrowser/parser
module: stx stc-classLibrary: parser

Description:


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


Class protocol:

instance creation
o  identifierToken: anIdentifierToken

o  named: aString


Instance protocol:

accessing
o  addReferencedVariablesTo: aCollection

o  definingScope
Return the sequenceNode, blockNode or MethodNode (i.e. the scope)
that defines this variable or nil, if none does

o  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)

o  lineNumber
(comment from inherited method)
lineNumber isNil ifTrue:[

o  name

o  precedence

o  startWithoutParentheses

o  stopWithoutParentheses

o  token

o  tokenPosition

comparing
o  = anObject

o  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)

o  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)

o  hash

enumeration
o  variableNodesDo: aBlock
evaluate a Block for all variable nodes.

initialization & release
o  identifierToken: anIdentifierToken

libtool3 support
o  highlightInCodeView: aCodeView

o  leftClickMenuInCodeView: aCodeView

o  rightClickMenuInCodeView: aCodeView

matching
o  copyInContext: aDictionary

queries
o  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
o  isClassVariableInContext: aSearchDictionary
not true - also returns true for class vars and globals

o  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)

o  isImmediate

o  isInstanceVariable
not true - also returns true for class vars and globals

o  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

o  isRead
Return true, if the variable is read

o  isSelf
true if I am the self-variable node

o  isSuper

o  isTemporary
Return true if the variable node is for
a temporary variable, false otherwise

o  isVariable

o  isVariableNotInLeftHandSideOfAssignment
Returns true iff receiver is variable node but not
in left-hand side of assignment

o  isWrite
Same as isWritten - bad naming here

o  isWritten
Return true, if the variable is written

o  reads: variableName

o  references: aVariableName

visitor
o  acceptVisitor: aProgramNodeVisitor



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Wed, 21 Aug 2019 22:15:42 GMT