question: public void replaceWith ( Scope newScope ) { if ( childScopes != null ) { for ( Scope kid : childScopes ) { newScope . addChildScope ( kid ) ; } childScopes . clear ( ) ; childScopes = null ; } if ( symbolTable != null && ! symbolTable . isEmpty ( ) ) { joinScopes ( this , newScope ) ; } }
target:  Used by the parser; not intended for typical use. Changes the parent-scope links for this scope's child scopes to the specified new scope.  Copies symbols from this scope into new scope.