/// <summary> /// Removes scopes until <c>CurrentScope == CurrentParentScope</c>. As each scope is /// removed, it is added as a child to its predecessor. /// </summary> public void RevertToNextParent() { while (CurrentScope != CurrentParentScope) { var scope = ScopeStack.Pop(); CurrentScope.AddChildScope(scope); } }