eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'RBMetaVariableNode':

Home

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

Class: RBMetaVariableNode


Inheritance:

   Object
   |
   +--RBProgramNode
      |
      +--RBStatementNode
         |
         +--RBValueNode
            |
            +--RBVariableNode
               |
               +--RBMetaVariableNode

Package:
stx:goodies/refactoryBrowser/parser
Category:
Refactory-Parser-Obsolete
Version:
rev: 1.7 date: 2006/02/13 14:55:17
user: cg
file: RBMetaVariableNode.st directory: goodies/refactoryBrowser/parser
module: stx stc-classLibrary: parser

Description:


BRMetaVariableNode is an AST node that is used to match several other types of nodes (literals, variables, value nodes, statement nodes, and sequences of statement nodes).

The different types of matches are determined by the name of the node. If the name contains a # character, then it will match a literal. If it contains, a . then it matches statements. If it contains no extra characters, then it matches only variables. These options are mutually exclusive.

The @ character can be combined with the name to match lists of items. If combined with the . character, then it will match a list of statement nodes (0 or more). If used without the . or # character, then it matches anything except for list of statements. Combining the @ with the # is not supported.

Adding another ` in the name will cause the search/replace to look for more matches inside the node that this node matched. This option should not be used for top level expressions since that would cause infinite recursion (e.g., searching only for "``@anything").

Instance Variables:
	isList	<Boolean>	can we match a list of items (@)
	isLiteral	<Boolean>	only match a literal node (#)
	isStatement	<Boolean>	only match statements (.)
	recurseInto	<Boolean>	search for more matches in the node we match (`)


Class protocol:

instance creation
o  new


Instance protocol:

accessing
o  parent: aBRProgramNode
Fix the case where '``@node' should match a single node, not a sequence node.

initialize-release
o  identifierToken: anIdentifierToken

o  initializeMetaVariables

matching
o  copyInContext: aDictionary

o  match: aNode inContext: aDictionary

o  matchLiteral: aNode inContext: aDictionary

o  matchStatement: aNode inContext: aDictionary

private
o  matchingClass

testing-matching
o  isAnything

o  isList

o  isLiteral

o  isStatement

o  recurseInto



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 19 Apr 2024 23:11:33 GMT