コード例 #1
0
ファイル: CScope.cs プロジェクト: nagyistoce/RoslynGenerator
 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");
 }
コード例 #2
0
ファイル: CScope.cs プロジェクト: testpulse/RoslynGenerator
 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");
     }
 }