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.69 date: 2021/11/27 02:26:29
user: cg
file: UnaryNode.st directory: libcomp
module: stx stc-classLibrary: libcomp

Description:


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

copyright

COPYRIGHT (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.

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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 22 Dec 2024 06:55:54 GMT