eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'JavaScriptFunctionNode':

Home

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

Class: JavaScriptFunctionNode


Inheritance:

   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

Description:


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.


Instance protocol:

accessing
o  _argVariables

o  _argVariables: aDictionary

o  _localVariables

o  _localVariables: aDictionary

o  _outerEnvironment

o  _outerEnvironment: anEnvironment

o  _topEnvironment

o  addLocalVariable: aVariable

o  allVisibleVariables
return the variable-nodes for visible arguments and locals;
this includes outer-scope variables

o  argumentCount
argumentCount

o  arguments
return the value of the instance variable 'arguments' (automatically generated)

o  arguments: something
set the value of the instance variable 'arguments' (automatically generated)

o  functionName
return the value of the instance variable 'functionName' (automatically generated)

o  functionName: something
set the value of the instance variable 'functionName' (automatically generated)

o  isReturnedFrom

o  isReturnedFrom: something

o  lineNumber

o  lineNumber: anInteger
(comment from inherited method)
set linenumber - ignored here

o  localVariableNames
Modified (format): / 14-02-2019 / 11:12:33 / Claus Gittinger

o  localVariables

o  numArgs

o  numVars
return the number of local variables.

o  statements
return the value of the instance variable 'statements' (automatically generated)

o  statements: aStatementNode
set the value of the instance variable 'statements' (automatically generated)

o  variableValue
that is a bad kludge to fix the interpreter, which gets functionNodes as value

o  xxxx_variables

code generation
o  codeVariableSetupOn: codeStream for: aCompiler
generate code to set it up.

enumeration
o  allSubNodesDo: aBlock
evaluate aBlock for each subnode

o  messageSelectorsDo: aBlock
evaluate aBlock for each message-selector sent by this node and subnodes

o  messagesDo: aBlock
evaluate aBlock for each message-node sent by this node and subnodes

o  variableNodesDo: aBlock
evaluate aBlock for each variable-node in this node and subnodes;
that is: all references to any variable inside the code

evaluation
o  value

o  value: arg

o  value: arg1 value: arg2
nil

o  value: arg1 value: arg2 value: arg3

o  value: arg1 value: arg2 value: arg3 value: arg4

o  value: arg1 value: arg2 value: arg3 value: arg4 value: arg5

o  value: arg1 value: arg2 value: arg3 value: arg4 value: arg5 value: arg6

o  value: arg1 value: arg2 value: arg3 value: arg4 value: arg5 value: arg6 value: arg7

o  value: arg1 value: arg2 value: arg3 value: arg4 value: arg5 value: arg6 value: arg7 value: arg8

o  valueWithArguments: args

o  valueWithReceiver: rec arguments: args
exitBlock := [:v |

o  wrongNumberOfArguments: numArgsGiven
report that the number of arguments given does not match the number expected

printing
o  printOn: aStream indent: i
aStream cr.

queries
o  _isFunctionEnvironment

o  _isHTMLEnvironment

o  home

o  isFunctionNode

testing
o  isInlineBlock

visiting
o  acceptVisitor: visitor
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)



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