Example #1
0
        /// <summary>
        /// Creates new instance with default Functions/Types/Scope.
        /// </summary>
        public Context()
        {
            this.Types = new RegisteredTypes();
            this.ExternalFunctions = new ExternalFunctions();
            this.Words = new RegisteredWords();
            this.Plugins = new RegisteredPlugins();
            this.PluginsMeta = new MetaPluginContainer();
            this.Symbols = new Symbols();
            this.Memory = new Memory();
            this.Limits = new Limits(this);
            this.TokenAliases = new Dictionary<string, Token>();
            var stack = new CallStack(Limits.CheckCallStack);
            this.Callbacks = new Callbacks();
            this.State = new LangState(stack);
            this.Units = new Units();
            this.Methods = new RegisteredMethods();
            this.Directives = new RegisteredDirectives();

            //this.Bindings = new Bindings();
            this.Plugins.Init();            
        }
Example #2
0
 /// <summary>
 /// Intiailize
 /// </summary>
 /// <param name="stack"></param>
 public LangState(CallStack stack)
 {
     _callStack = stack;
 }