eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'AssignmentNode':

Home

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

Class: AssignmentNode


Inheritance:

   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

Description:


node for parse-trees, representing assignments.
This is a helper class for the compiler.


Class protocol:

instance creation
o  variable: v expression: e


Instance protocol:

accessing
o  endCharPosition

o  endCharPosition: something

o  endLineNr

o  endLineNr: something

o  expression

o  expression: something

o  lineNr

o  lineNr: something

o  lineNumber
return lineNr

o  lineNumber: something
set lineNr

o  variable

o  variable: something

o  variable: v expression: e
any block, which gets assigned to something

code generation
o  checkIncDecOn: aStream
check if we can use incMvar / decMvar instruction.
If so, code it and return true.
Otherwise, return false.

o  codeForSideEffectOn: aStream inBlock: b for: aCompiler
(comment from inherited method)
generate code for this statement - value not needed

o  codeNormalOn: aStream valueNeeded: forValue inBlock: b for: aCompiler
must do workspace variables here, because these

o  codeOn: aStream inBlock: b for: aCompiler

enumerating
o  allSubNodesDo: aBlock

o  messagesDo: aBlock
evaluate aBlock for each message-node here and in subnodes

o  nodeDo: anEnumerator
helper for parse tree walking

evaluation
o  evaluateIn: anEnvironment

printing & storing
o  printOn: aStream indent: i

o  printOperatorOn: aStream

queries
o  collectBlocksInto: aCollection

o  evaluatesToConstant
return true, if this is a node for an assignment

o  precedence

o  withConstantValueDo: aBlock
return true, if this evaluates to a constant value
and evaluate aBlock with it

testing
o  isAssignment
return true, if this is a node for an assignment

visiting
o  acceptVisitor: aVisitor
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 31 Jan 2023 21:19:44 GMT