Example #1
0
 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");
 }
Example #2
0
 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");
     }
 }