public CScope(CScope scope) { foreach (KeyValuePair<string, CNode> pair in scope.funcs) { funcs[pair.Key] = pair.Value; } foreach (KeyValuePair<string, CNode> pair in scope.nodes) { nodes[pair.Key] = pair.Value; } if (scope.parent != null) throw new InvalidOperationException("Cannot clone a parented scope"); }
public CScope(CScope scope) { foreach (KeyValuePair <string, CNode> pair in scope.funcs) { funcs[pair.Key] = pair.Value; } foreach (KeyValuePair <string, CNode> pair in scope.nodes) { nodes[pair.Key] = pair.Value; } if (scope.parent != null) { throw new InvalidOperationException("Cannot clone a parented scope"); } }