Rhino.Ast.Scope.JoinScopes C# (CSharp) Method

JoinScopes() public static method

Copies all symbols from source scope to dest scope.
Copies all symbols from source scope to dest scope.
public static JoinScopes ( Rhino source, Rhino dest ) : void
source Rhino
dest Rhino
return void
		public static void JoinScopes(Rhino.Ast.Scope source, Rhino.Ast.Scope dest)
		{
			IDictionary<string, Symbol> src = source.EnsureSymbolTable();
			IDictionary<string, Symbol> dst = dest.EnsureSymbolTable();
			if (!Sharpen.Collections.Disjoint(src.Keys, dst.Keys))
			{
				CodeBug();
			}
			foreach (KeyValuePair<string, Symbol> entry in src.EntrySet())
			{
				Symbol sym = entry.Value;
				sym.SetContainingTable(dest);
				dst.Put(entry.Key, sym);
			}
		}