|
Class: UnaryNode
Object
|
+--ParseNode
|
+--MessageNode
|
+--UnaryNode
|
+--JavaScriptParser::JavaScriptUnaryNode
- Package:
- stx:libcomp
- Category:
- System-Compiler-Support
- Version:
- rev:
1.69
date: 2021/11/27 02:26:29
- user: cg
- file: UnaryNode.st directory: libcomp
- module: stx stc-classLibrary: libcomp
node for parse-trees, representing unary messages
This is a helper class for the compiler.
copyrightCOPYRIGHT (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.
instance creation
-
receiver: r selector: s
-
return a new UnaryNode for sending selector s to receiver r.
Fold constants.
-
receiver: r selector: selectorString fold: folding
-
return a new UnaryNode for sending selector selectorString to receiver r.
If folding is true, fold constant expressions.
accessing
-
selectorPartPositions
-
checks
-
plausibilityCheckIn: aParser
-
check for funny selector - careful to do string compare instead
of symbol identity compare: I don't want to introduce these as symbols
into the system (would make the '... is nowhere implemented' warning
go away.
TODO: rewite to use lint/lint rules and apply them before accepting
code generation
-
codeOn: aStream inBlock: b for: aCompiler
-
append bytecode for the receiver to aStream.
evaluation
-
evaluateIn: anEnvironment
-
evaluate the expression represented by the receiver
printing & storing
-
printOn: aStream indent: i
-
prettyprint the expression represented by the receiver
queries
-
precedence
-
testing
-
isJavaPackageReference
-
Return true, given node is JAVA class reference in form:
JAVA package1 package2
-
isUnaryMessage
-
return true, if this node is one for a unary message
visiting
-
acceptVisitor: aVisitor
-
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)
|