Refactor top-level AST nodes v2
The previous version of this patch was tainted by parts of another
change to remove a memory leak, and ended up trying to treat a bare
pointer like a unique_ptr in a few places. This combines both changes in
to one.
Previous patch was b696437d842d59c0cc26411fa3d71cb91897c572:
We now return an AidlDocument from parsing. This type is non-polymorphic
and contains either a vector of parcelables or an interface. This gets
rid of all of our reinterpret_cast calls and the public item_type field.
Change-Id: I77fbb1d8448343bd02484d896289a514d636df25
Test: Unit tests pass
Bug: none
Signed-off-by: Casey Dahlin <sadmac@google.com>
diff --git a/aidl.h b/aidl.h
index e5fd4ac..29f0569 100644
--- a/aidl.h
+++ b/aidl.h
@@ -48,8 +48,8 @@
const IoDelegate& io_delegate);
int compile_aidl_to_java(const JavaOptions& options,
const IoDelegate& io_delegate);
-int preprocess_aidl(const JavaOptions& options,
- const IoDelegate& io_delegate);
+bool preprocess_aidl(const JavaOptions& options,
+ const IoDelegate& io_delegate);
namespace internals {