eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'RBMethodNode':

Home

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

Class: RBMethodNode


Inheritance:

   Object
   |
   +--RBProgramNode
      |
      +--RBMethodNode
         |
         +--RBMetaMethodNode
         |
         +--RBPatternMethodNode

Package:
stx:goodies/refactoryBrowser/parser
Category:
Refactory-AST-Nodes
Version:
rev: 1.37 date: 2019/05/27 13:12:34
user: cg
file: RBMethodNode.st directory: goodies/refactoryBrowser/parser
module: stx stc-classLibrary: parser

Description:


BRMethodNode is the AST that represents a Smalltalk method.

Instance Variables:
	arguments	<SequenceableCollection of: BRVariableNode>	the arguments to the method
	body	<BRSequenceNode>	the body/statements of the method
	selector	<Symbol | nil>	the method name (cached)
	selectorParts	<SequenceableCollection of: BRValueToken>	the tokens for the selector keywords
	source	<String>	the source we compiled
	tag	<Interval | nil>	the source location of any resource/primitive tags


Class protocol:

instance creation
o  selector: aSymbol arguments: variableNodes body: aSequenceNode

o  selector: aSymbol body: aSequenceNode

o  selectorParts: tokenCollection arguments: variableNodes


Instance protocol:

accessing
o  addNode: aNode

o  addReturn

o  addSelfReturn

o  allArgumentVariablesInto: aCollection

o  allDefinedVariables

o  allVariablesOnScope
allArgumentVariables

o  argumentNames

o  arguments

o  arguments: variableNodes

o  blockScope

o  body

o  body: stmtsNode

o  children

o  methodScope

o  newSource
return a (horribly formatted) new source

o  pragmas

o  pragmas: aCollection

o  primitiveSources
returns a oollection of the resources/tags strings

o  renameSelector: newSelector andArguments: varNodeCollection

o  selector

o  selector: aSelector

o  source

o  source: anObject

o  start

o  stop

o  tags

o  tags: aCollectionOfIntervals

o  temporaries

comparing
o  = anObject

o  equalTo: anObject withMapping: aDictionary
return true, if I am equal to another node, with a given variable name mapping.
Side effect: update the mapping dictionary as required to reflect a matching mapping (if possible)

o  equalTo: anObject withSelectorMapping: aDictionary
return true, if I am equal to another node, with a given selector name mapping.
Side effect: update the mapping dictionary as required to reflect a matching mapping (if possible)

o  hash

o  semanticallyEqualTo: anObject withMapping: aDictionary
return true, if I am semantically equal to another node, with a given variable name mapping.
Side effect: update the mapping dictionary as required to reflect a matching mapping (if possible)

o  semanticallyEqualTo: anObject withMapping: aDictionary ignoringSelector: ignoringSelector
return true, if I am semantically equal to another node, with a given variable name mapping.
Side effect: update the mapping dictionary as required to reflect a matching mapping (if possible)

o  semanticallyEqualTo: anObject withMapping: aDictionary ignoringSelector: ignoringSelector ignoringAnnotations: ignoringAnnotations
return true, if I am semantically equal to another node, with a given variable name mapping.
Side effect: update the mapping dictionary as required to reflect a matching mapping (if possible)

copying-private
o  postCopy

enumeration
o  variableNodesDo: aBlock
evaluate a Block for all variable nodes

initialization & release
o  selectorParts: tokenCollection arguments: variableNodes

matching
o  copyInContext: aDictionary

o  match: aNode inContext: aDictionary

printing
o  printOn: aStream

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

o  changeSourceSelectors: oldSelectorParts arguments: oldArguments
If this is the same number of arguments, we try a one to one replacement of selector parts and arguments. If this is not the case try to rewrite the signature as a whole, what unfortunately drops the comments within the signature.

o  reformatSource

o  selectorParts

o  selectorParts: tokenCollection

replacing
o  replaceNode: aNode withNode: anotherNode

testing
o  defines: aName

o  isLast: aNode

o  isMethod

o  isPrimitive

o  lastIsLoop

o  lastIsReturn

o  references: aVariableName

o  uses: aNode

visitor
o  acceptCommentsAfterVisitor: aVisitor

o  acceptCommentsBeforeVisitor: aVisitor

o  acceptVisitor: aProgramNodeVisitor



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 28 Mar 2024 18:27:23 GMT