Esempio n. 1
0
 private void InitScopesByTree(ScopeTreeNode node, RuntimeScope parent)
 {
     foreach (var n in node.Children)
     {
         if (n.Scope == null)
         {
             continue;
         }
         InitScopesByTree(n, new RuntimeScope(parent, n.Scope));
     }
 }
Esempio n. 2
0
        public RuntimeScope(RuntimeScope parent, Scope scope, bool lateInit)
        {
            Parent = parent;
            Scope  = scope;

            if (scope != null && !RuntimeScopeForScope.ContainsKey(scope))
            {
                RuntimeScopeForScope.Add(scope, this);
            }

            if (lateInit)
            {
                return;
            }
            Init(scope);
        }
Esempio n. 3
0
 public Interpreter(Namespace global)
 {
     Global       = global;
     RuntimeScope = new RuntimeScope(null, Global.Scope, true);
 }
Esempio n. 4
0
 public RuntimeScope(RuntimeScope parent, Scope scope) : this(parent, scope, false)
 {
 }