|
Class: StatementNode
Object
|
+--ParseNode
|
+--StatementNode
|
+--JavaScriptParser::JavaScriptStatementNode
|
+--PrimitiveNode
|
+--ReturnNode
- Package:
- stx:libcomp
- Category:
- System-Compiler-Support
- Version:
- rev:
1.51
date: 2018/04/23 20:17:22
- user: cg
- file: StatementNode.st directory: libcomp
- module: stx stc-classLibrary: libcomp
- Author:
- Claus Gittinger
node for parse-trees, representing statements
This is a helper class for the compiler.
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
-
allNodesDo: aBlock
-
evaluate aBlock for each node in this node and subnodes
-
allSubNodesDo: aBlock
-
evaluate aBlock for each subnodes
-
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
-
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)
|