|
Class: AssignmentNode
Object
|
+--ParseNode
|
+--AssignmentNode
|
+--JavaScriptParser::JavaScriptAssignmentNode
- Package:
- stx:libcomp
- Category:
- System-Compiler-Support
- Version:
- rev:
1.49
date: 2019/07/31 15:10:23
- user: cg
- file: AssignmentNode.st directory: libcomp
- module: stx stc-classLibrary: libcomp
- Author:
- Claus Gittinger
node for parse-trees, representing assignments.
This is a helper class for the compiler.
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
-
-
messagesDo: aBlock
-
evaluate aBlock for each message-node here and in subnodes
-
nodeDo: anEnumerator
-
helper for parse tree walking
evaluation
-
evaluateIn: anEnvironment
-
printing & storing
-
printOn: aStream indent: i
-
-
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)
|