|
Class: SelfNode
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
node for parse-trees, representing self
This is a helper class for the compiler.
copyrightCOPYRIGHT (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.
instance creation
-
value: val
-
accessing
-
name
-
-
value: val
-
code generation
-
codeForSideEffectOn: aStream inBlock: b for: aCompiler
-
no code at all
-
codeForSimpleReturnOn: aStream inBlock: b lineNumber: lineNrOrNil for: aCompiler
-
(comment from inherited method)
generate code to return myself as a simple method return
-
codeOn: aStream inBlock: codeBlock for: aCompiler
-
-
codeStoreOn: aStream inBlock: codeBlock valueNeeded: valueNeeded for: aCompiler
-
not reached - parser has already checked this
enumerating
-
nodeDo: anEnumerator
-
helper for parse tree walking
evaluation
-
evaluateIn: anEnvironment
-
-
store: aValue
-
not reached - parser has already checked this
printing & storing
-
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 ...)
-
printOn: aStream indent: i
-
testing
-
isSelf
-
return true, if this is a self-node
visiting
-
acceptVisitor: aVisitor
-
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)
|