|
Class: UnaryNode
Object
|
+--ParseNode
|
+--MessageNode
|
+--UnaryNode
|
+--JavaScriptParser::JavaScriptUnaryNode
- Package:
- stx:libcomp
- Category:
- System-Compiler-Support
- Version:
- rev:
1.66
date: 2018/05/25 14:06:28
- user: cg
- file: UnaryNode.st directory: libcomp
- module: stx stc-classLibrary: libcomp
- Author:
- Claus Gittinger
node for parse-trees, representing unary messages
This is a helper class for the compiler.
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)
|