Nested types know its parent/root/document.

AidlDefinedType::GetRootType() returns its parent type defined in a
document's root. AidlDefinedType::GetDocument() returns the document
where the type is defined.

Bug: 182508839
Test: aidl_unittest
Change-Id: I0e5e5ea304df814ca527dc3d4cdac77414c98b1b
diff --git a/aidl_language.h b/aidl_language.h
index f7c6d4b..5a09db6 100644
--- a/aidl_language.h
+++ b/aidl_language.h
@@ -964,6 +964,7 @@
         const_cast<const AidlDefinedType*>(this)->AsUnstructuredParcelable());
   }
   const AidlDefinedType* GetParentType() const;
+  const AidlDefinedType* GetRootType() const;
   const std::vector<std::unique_ptr<AidlDefinedType>>& GetNestedTypes() const { return types_; }
   const std::vector<std::unique_ptr<AidlVariableDeclaration>>& GetFields() const {
     return variables_;