eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SelfNode':

Home

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

Class: SelfNode


Inheritance:

   Object
   |
   +--ParseNode
      |
      +--PrimaryNode
         |
         +--SelfNode
            |
            +--JavaScriptParser::ThisNode
            |
            +--SuperNode

Package:
stx:libcomp
Category:
System-Compiler-Support
Version:
rev: 1.25 date: 2021/01/20 10:29:21
user: cg
file: SelfNode.st directory: libcomp
module: stx stc-classLibrary: libcomp

Description:


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

copyright

COPYRIGHT (c) 1994 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  value: val


Instance protocol:

accessing
o  name

o  value: val

code generation
o  codeForSideEffectOn: aStream inBlock: b for: aCompiler
no code at all

o  codeForSimpleReturnOn: aStream inBlock: b lineNumber: lineNrOrNil for: aCompiler
(comment from inherited method)
generate code to return myself as a simple method return

o  codeOn: aStream inBlock: codeBlock for: aCompiler

o  codeStoreOn: aStream inBlock: codeBlock valueNeeded: valueNeeded for: aCompiler
not reached - parser has already checked this

enumerating
o  nodeDo: anEnumerator
helper for parse tree walking

evaluation
o  evaluateIn: anEnvironment

o  store: aValue
not reached - parser has already checked this

printing & storing
o  displayOn: aGCOrStream
Compatibility
append a printed desription on some stream (Dolphin, Squeak)
OR:
display the receiver in a graphicsContext at 0@0 (ST80).
This method allows for any object to be displayed in some view
(although the fallBack is to display its printString ...)

o  printOn: aStream indent: i

testing
o  isSelf
return true, if this is a self-node

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; Mon, 18 Nov 2024 06:37:44 GMT