Beispiel #1
0
 public FunctionScope(Scope parentscope, IFunction function, EvaluatedSignature signature)
 {
     _parentscope = parentscope;
     _function    = function;
     _signature   = signature;
     _variables   = new MergedVariableCollection(
         collection_parent: _parentscope.Variables,
         collection_own: new VariableCollection()
         );
 }
Beispiel #2
0
        Result IFunction.Execute(EvaluatedSignature evaluated_signature, Scope scope)
        {
            FunctionScope function_scope = new FunctionScope(scope, this, evaluated_signature);

            try
            {
                return(_execute(evaluated_signature.Parameters, function_scope));
            }
            catch (StandardLibraryUsageException ex)
            {
                Log.Error(ex.Message);
                return(Result.NULL);
            }
        }
Beispiel #3
0
 public MethodScope(Scope parentscope, IMethod method, EvaluatedSignature signature, IObject obj, IReadOnlyList <IClass> classes)
 {
     _parentscope = parentscope;
     _method      = method;
     _signature   = signature;
     _object      = obj;
     _classes     = classes;
     _variables   = new MergedVariableCollection(
         collection_parent: new MergedVariableCollection(
             collection_parent: _parentscope.Root.Variables,
             collection_own: _object?.Variables
             ),
         collection_own: new VariableCollection()
         );
 }