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)); } }
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); }
public Interpreter(Namespace global) { Global = global; RuntimeScope = new RuntimeScope(null, Global.Scope, true); }
public RuntimeScope(RuntimeScope parent, Scope scope) : this(parent, scope, false) { }