private void AddElementToMember(SyntaxTree sourceAST, ref IMember parentMember, IMember newElement) { if (parentMember == null) { sourceAST.AddMember(newElement); } else { parentMember.AddScope(newElement); } parentMember = newElement; }