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.32 date: 2017/11/30 16:54:00
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  definingSequence
Return the sequenceNode (i.e. the scope) that defines this variable
or nil, if no sequenceNode does

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 global variable, 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.1.0.0; WebServer 1.663 at exept.de:8081; Sun, 22 Jul 2018 03:09:39 GMT