|
Class: StatementNode
Object
|
+--ParseNode
|
+--StatementNode
|
+--JavaScriptParser::JavaScriptStatementNode
|
+--PrimitiveNode
|
+--ReturnNode
- Package:
- stx:libcomp
- Category:
- System-Compiler-Support
- Version:
- rev:
1.54
date: 2021/01/20 10:29:10
- user: cg
- file: StatementNode.st directory: libcomp
- module: stx stc-classLibrary: libcomp
node for parse-trees, representing statements
This is a helper class for the compiler.
copyrightCOPYRIGHT (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.
instance creation
-
expression: e
-
accessing
-
expression
-
-
expression: something
-
-
isStatement
-
-
last
-
return the last statement in a list
-
lineNumber
-
return lineNr
-
lineNumber: something
-
set lineNr
-
lineNumberOfFirstMessage
-
-
nextStatement
-
-
nextStatement: s
-
-
parent: aParseNode
-
code generation
-
codeAllForSideEffectOn: aStream inBlock: b for: aCompiler
-
-
codeForSideEffectOn: aStream inBlock: b for: aCompiler
-
generate code for this statement - value not needed
-
codeOn: aStream inBlock: b for: aCompiler
-
generate code for this statement
converting
-
asCollectionOfStatements
-
returns a orderedCollection of statements,
representing the list of which the receiver is the head
enumerating
-
allMessageSelectorsDo: aBlock
-
evaluate aBlock for each message-selector sent by this statement and all followup statements
-
allMessagesDo: aBlock
-
evaluate aBlock for each message-node sent by this statement and all followup statements
-
allNodesDo: aBlock
-
evaluate aBlock for each node in this node and subnodes
-
allSubNodesDo: aBlock
-
evaluate aBlock for each subnodes
-
childrenDo: aBlock
-
-
do: aBlock
-
in st/x, statements is a linked list (not an ordered collection),
this provides some dialect compatibility (for st2js)
-
messageSelectorsDo: aBlock
-
evaluate aBlock for each message-selector sent by this node and subnodes
-
messagesDo: aBlock
-
evaluate aBlock for each message-node sent by this node and subnodes
-
nodeDo: anEnumerator
-
helper for parse tree walking
-
variableNodesDo: aBlock
-
evaluate aBlock for each variable-node in this node and subnodes
evaluation
-
evaluateAllIn: anEnvironment
-
this could be done more elegant - but with lots of recursion
-
evaluateExpressionIn: anEnvironment
-
-
evaluateIn: anEnvironment
-
printing & storing
-
printAllOn: aStream
-
-
printAllOn: aStream indent: i
-
-
printOn: aStream indent: i
-
(comment from inherited method)
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.
queries
-
collectBlocksInto: aCollection
-
-
containsReturn
-
-
containsReturnInAnyStatement
-
-
isSimpleConstant
-
-
isSimpleExpression
-
-
isSimpleVariable
-
-
listEndsWithReturn
-
testing
-
isStatementNode
-
(comment from inherited method)
return true, if this is a statement node
visiting
-
acceptVisitor: aVisitor
-
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)
|