eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'RBPragmaNode':

Home

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

Class: RBPragmaNode


Inheritance:

   Object
   |
   +--RBProgramNode
      |
      +--RBPragmaNode

Package:
stx:goodies/refactoryBrowser/parser
Category:
Refactory-AST-Nodes
Version:
rev: 1.12 date: 2024/02/09 11:35:46
user: stefan
file: RBPragmaNode.st directory: goodies/refactoryBrowser/parser
module: stx stc-classLibrary: parser

Class protocol:

instance creation
o  selectorParts: keywordTokens arguments: valueNodes


Instance protocol:

accessing
o  argumentAt: keywordSelector

o  argumentAt: keywordSelector ifAbsent: absentBlock

o  argumentCount

o  arguments

o  arguments: aLiteralCollection

o  children

o  numArgs
marked as obsolete by Stefan Vogel at 9-Feb-2024

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  selector

o  selector: aSelector

o  sentMessages
warning: returns a string collection because we avoid creating symbols when parsing

o  start

o  stop

accessing-token
o  left

o  left: anInteger

o  right

o  right: anInteger

comparing
o  = anObject
(comment from inherited method)
return true if the receiver and the arg have the same structure.
Notice:
This method is partially open coded (inlined) by the compiler(s)
identical objects are always considered equal.
redefining it may not work as expected.

o  equalTo: anObject withMapping: aDictionary
(comment from inherited method)
return true, if I am equal to another node, with a given variable name mapping.

o  hash
(comment from inherited method)
return an Integer useful as a hash key for the receiver.
This hash should return same values for objects with same
contents (i.e. use this to hash on structure)

o  semanticallyEqualTo: anObject withMapping: aDictionary
(comment from inherited method)
return true, if I am semantically equal to another node, with a given variable name mapping.
Semantical equalTo: is defined slightly less strict, than equalTo:.
Both check the parsetree, ignoring formatting and comments.
However, in some situations, semanticallyEqualTo: detects the same intention,
(which is mostly heuristic and builtin knowledge).
For example:
foo isNil ifTrue:e1 ifFalse:e2
is semantcallyEqualTo:
foo notNil ifTrue:e2 ifFalse:e1
and also to:
foo isNil ifFalse:e2 ifTrue:e1
The fallback implemented here is to ask for the regular equality.
Side effect: update the mapping dictionary as required to reflect a matching mapping (if possible)

copying-private
o  postCopy

initialization
o  selectorParts: keywordTokens arguments: valueNodes

matching
o  copyInContext: aDictionary

o  match: aNode inContext: aDictionary

private
o  buildSelector
to be checked: this creates symbols, although it probably shouldn't

o  selectorParts

o  selectorParts: tokenCollection

replacing
o  replaceNode: aNode withNode: anotherNode

testing
o  isBinary

o  isFaulty

o  isKeyword

o  isPragma

o  isPrimitive

o  isUnary

visiting
o  acceptVisitor: aProgramNodeVisitor



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 06:51:30 GMT