|
Class: JavaScriptFunctionNode
Object
|
+--ParseNode
|
+--JavaScriptFunctionNode
|
+--JavaScriptInnerFunctionNode
- Package:
- stx:libjavascript
- Category:
- Languages-JavaScript-Compiling & Parsing
- Version:
- rev:
1.44
date: 2019/07/10 00:40:21
- user: cg
- file: JavaScriptFunctionNode.st directory: libjavascript
- module: stx stc-classLibrary: libjavascript
ATTENTION: for protocol compatibility with JavaScriptEnvironment.
many messages are implemented with an initial underscore.
These are required as JavaScriptEnvironment catches doesNotUnderstand and
does some kludgy fiddling there.
accessing
-
_argVariables
-
-
_argVariables: aDictionary
-
-
_localVariables
-
-
_localVariables: aDictionary
-
-
_outerEnvironment
-
-
_outerEnvironment: anEnvironment
-
-
_topEnvironment
-
-
addLocalVariable: aVariable
-
-
allVisibleVariables
-
return the variable-nodes for visible arguments and locals;
this includes outer-scope variables
-
argumentCount
-
argumentCount
-
arguments
-
return the value of the instance variable 'arguments' (automatically generated)
-
arguments: something
-
set the value of the instance variable 'arguments' (automatically generated)
-
functionName
-
return the value of the instance variable 'functionName' (automatically generated)
-
functionName: something
-
set the value of the instance variable 'functionName' (automatically generated)
-
isReturnedFrom
-
-
isReturnedFrom: something
-
-
lineNumber
-
-
lineNumber: anInteger
-
(comment from inherited method)
set linenumber - ignored here
-
localVariableNames
-
Modified (format): / 14-02-2019 / 11:12:33 / Claus Gittinger
-
localVariables
-
-
numArgs
-
-
numVars
-
return the number of local variables.
-
statements
-
return the value of the instance variable 'statements' (automatically generated)
-
statements: aStatementNode
-
set the value of the instance variable 'statements' (automatically generated)
-
variableValue
-
that is a bad kludge to fix the interpreter, which gets functionNodes as value
-
xxxx_variables
-
code generation
-
codeVariableSetupOn: codeStream for: aCompiler
-
generate code to set it up.
enumeration
-
allSubNodesDo: aBlock
-
evaluate aBlock for each subnode
-
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
-
variableNodesDo: aBlock
-
evaluate aBlock for each variable-node in this node and subnodes;
that is: all references to any variable inside the code
evaluation
-
value
-
-
value: arg
-
-
value: arg1 value: arg2
-
nil
-
value: arg1 value: arg2 value: arg3
-
-
value: arg1 value: arg2 value: arg3 value: arg4
-
-
value: arg1 value: arg2 value: arg3 value: arg4 value: arg5
-
-
value: arg1 value: arg2 value: arg3 value: arg4 value: arg5 value: arg6
-
-
value: arg1 value: arg2 value: arg3 value: arg4 value: arg5 value: arg6 value: arg7
-
-
value: arg1 value: arg2 value: arg3 value: arg4 value: arg5 value: arg6 value: arg7 value: arg8
-
-
valueWithArguments: args
-
-
valueWithReceiver: rec arguments: args
-
exitBlock := [:v |
-
wrongNumberOfArguments: numArgsGiven
-
report that the number of arguments given does not match the number expected
printing
-
printOn: aStream indent: i
-
aStream cr.
queries
-
_isFunctionEnvironment
-
-
_isHTMLEnvironment
-
-
home
-
-
isFunctionNode
-
testing
-
isInlineBlock
-
visiting
-
acceptVisitor: visitor
-
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)
|