eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'UnaryNode':

Home

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

Class: UnaryNode


Inheritance:

   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

Description:


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


Class protocol:

instance creation
o  receiver: r selector: s
return a new UnaryNode for sending selector s to receiver r.
Fold constants.

o  receiver: r selector: selectorString fold: folding
return a new UnaryNode for sending selector selectorString to receiver r.
If folding is true, fold constant expressions.


Instance protocol:

accessing
o  selectorPartPositions

checks
o  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
o  codeOn: aStream inBlock: b for: aCompiler
append bytecode for the receiver to aStream.

evaluation
o  evaluateIn: anEnvironment
evaluate the expression represented by the receiver

printing & storing
o  printOn: aStream indent: i
prettyprint the expression represented by the receiver

queries
o  precedence

testing
o  isJavaPackageReference
Return true, given node is JAVA class reference in form:
JAVA package1 package2

o  isUnaryMessage
return true, if this node is one for a unary message

visiting
o  acceptVisitor: aVisitor
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 29 Mar 2024 07:12:03 GMT