Esempio n. 1
0
 protected override void setContext()
 {
     setLineIndex();
     Context.setStatus(Context.StatusEnum.if_execution);
     Context.setInfo(this);
     Global.newLocalContextScope();
     updateTestModeValues();
 }
Esempio n. 2
0
        /// <summary>
        /// Should be called BEFORE executing the <see cref="Function"/>.
        /// Initializes a new Main Context Stack, as well as a new Local Context Stack with the given variables
        /// </summary>
        /// <exception cref="Context.ContextException"> If not a recursive function, already executing this very function</exception>
        private void initialize(Dictionary <string, Variable> args)
        {
            _call_depth++;
            Debugging.print("calling function with depth: ", _call_depth);
            // Debugging.assert(Global.getSetting("flame mode") || Context.isFrozen());
            if (!_rec_function && _in_function_scope)
            {
                throw new Context.ContextException("Already in function scope. Missing \"recursive\" keyword ?");                                      // recursive ?
            }
            // new local context scope using custom function args
            Global.newLocalContextScope(args);

            _in_function_scope = true;
        }