|
Class: AssignmentNode
Object
|
+--ParseNode
|
+--AssignmentNode
|
+--JavaScriptParser::JavaScriptAssignmentNode
- Package:
- stx:libcomp
- Category:
- System-Compiler-Support
- Version:
- rev:
1.53
date: 2021/02/15 21:33:05
- user: cg
- file: AssignmentNode.st directory: libcomp
- module: stx stc-classLibrary: libcomp
node for parse-trees, representing assignments.
This is a helper class for the compiler.
copyrightCOPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
instance creation
-
variable: v expression: e
-
accessing
-
endCharPosition
-
-
endCharPosition: something
-
-
endLineNr
-
-
endLineNr: something
-
-
expression
-
-
expression: something
-
-
lineNr
-
-
lineNr: something
-
-
lineNumber
-
return lineNr
-
lineNumber: something
-
set lineNr
-
variable
-
-
variable: something
-
-
variable: v expression: e
-
any block, which gets assigned to something
code generation
-
checkIncDecOn: aStream
-
check if we can use incMvar / decMvar instruction.
If so, code it and return true.
Otherwise, return false.
-
codeForSideEffectOn: aStream inBlock: b for: aCompiler
-
(comment from inherited method)
generate code for this statement - value not needed
-
codeNormalOn: aStream valueNeeded: forValue inBlock: b for: aCompiler
-
must do workspace variables here, because these
-
codeOn: aStream inBlock: b for: aCompiler
-
enumerating
-
allSubNodesDo: aBlock
-
(comment from inherited method)
self subclassResponsibility.
-
childrenDo: aBlock
-
-
messagesDo: aBlock
-
evaluate aBlock for each message-node here and in subnodes
-
nodeDo: anEnumerator
-
helper for parse tree walking
-
variableNodesDo: aBlock
-
evaluate aBlock for each variable-node in this node and subnodes
evaluation
-
evaluateIn: anEnvironment
-
printing & storing
-
printOn: aStream indent: i
-
(comment from inherited method)
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.
-
printOperatorOn: aStream
-
queries
-
collectBlocksInto: aCollection
-
-
evaluatesToConstant
-
return true, if this is a node for an assignment
-
precedence
-
-
withConstantValueDo: aBlock
-
return true, if this evaluates to a constant value
and evaluate aBlock with it
testing
-
isAssignment
-
return true, if this is a node for an assignment
visiting
-
acceptVisitor: aVisitor
-
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)
|