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.53 date: 2021/02/15 21:33:05
user: cg
file: AssignmentNode.st directory: libcomp
module: stx stc-classLibrary: libcomp

Description:


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

copyright

COPYRIGHT (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.

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
(comment from inherited method)
self subclassResponsibility.

o  childrenDo: aBlock

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

o  nodeDo: anEnumerator
helper for parse tree walking

o  variableNodesDo: aBlock
evaluate aBlock for each variable-node in this node and subnodes

evaluation
o  evaluateIn: anEnvironment

printing & storing
o  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.

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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:55:19 GMT