17 private readonly Func<BadExecutionContext, BadObject[], BadObject>
m_Func;
37 params
BadFunctionParameter[] parameters) : base(name, false, isStatic, returnType, false,parameters)
39 m_Func = (_, args) => func(args);
56 params
BadFunctionParameter[] parameters) : base(name, false, isStatic, returnType,false, parameters)
88 params
string[] names)
107 yield
return m_Func.Invoke(caller, args);
The Execution Context. Every execution of a script needs a context the script is running in....
Interop Function taking an array of arguments.
BadInteropFunction(BadWordToken? name, Func< BadObject[], BadObject > func, bool isStatic, BadClassPrototype returnType, params BadFunctionParameter[] parameters)
Creates a new BadInteropFunction.
BadMetaData? _metaData
Contains meta data for this function.
static BadInteropFunction Create(Func< BadObject[], BadObject > func, bool isStatic, BadClassPrototype returnType, params string[] names)
Creates a new BadInteropFunction.
override BadMetaData MetaData
BadInteropFunction SetMetaData(BadMetaData metaData)
Sets the MetaData for this Function.
override IEnumerable< BadObject > InvokeBlock(BadObject[] args, BadExecutionContext caller)
BadInteropFunction(BadWordToken? name, Func< BadExecutionContext, BadObject[], BadObject > func, bool isStatic, BadClassPrototype returnType, params BadFunctionParameter[] parameters)
Creates a new BadInteropFunction.
readonly Func< BadExecutionContext, BadObject[], BadObject > m_Func
The Function Lambda.
The Base Class for all BadScript Objects.
Implements a function that can be called from the script.
void CheckParameters(BadObject[] args, BadExecutionContext caller, BadSourcePosition? position=null)
Checks Parameters for the given function call.
Provides function parameter info.
Implements a Class Prototype for the BadScript Language.
Contains the Parser for the BadScript2 Language.
Contains the Reader Tokens for the BadScript2 Language.
Contains the Interop Function Classes for the BadScript2 Language.
Contains Runtime Function Objects.
Contains Runtime Type Objects.
Contains the Runtime Objects.