summaryrefslogtreecommitdiffstats
path: root/aidl_language.h
diff options
context:
space:
mode:
authorCasey Dahlin <sadmac@google.com>2015-10-12 19:23:40 -0700
committerCasey Dahlin <sadmac@google.com>2015-10-13 11:07:16 -0700
commit42727f851672ff8f3099db81fa21c969e553e150 (patch)
treeee3e7bf2002d68fc376bb8ecac9f6cdfd6b55814 /aidl_language.h
parentba52a2b86eb0639d18369c02edb7209ad05973a4 (diff)
downloadandroid_system_tools_aidl-42727f851672ff8f3099db81fa21c969e553e150.tar.gz
android_system_tools_aidl-42727f851672ff8f3099db81fa21c969e553e150.tar.bz2
android_system_tools_aidl-42727f851672ff8f3099db81fa21c969e553e150.zip
Parse only one interface, only Parcelables are lists
This is a fixup of the change that was reverted in: 2d0179a123a3d212fdd9d1baa02ce473b688b360 We're encoding the restriction of only one interface per file directly in to the grammar/type system now. This simplifies much. Change-Id: Icaac11cb6121327066acd01952b8dec0cfbe9376 Test: Full android build Bug: 24874768 Signed-off-by: Casey Dahlin <sadmac@google.com>
Diffstat (limited to 'aidl_language.h')
-rw-r--r--aidl_language.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/aidl_language.h b/aidl_language.h
index 5037c86..c910a37 100644
--- a/aidl_language.h
+++ b/aidl_language.h
@@ -29,7 +29,7 @@ struct extra_text_type {
struct buffer_type {
unsigned token;
- char *data;
+ char* data;
extra_text_type* extra;
std::string Literal() const {
@@ -74,7 +74,7 @@ class AidlArgument : public AidlNode {
AidlArgument(AidlArgument::Direction direction, AidlType* type,
std::string name, unsigned line);
- AidlArgument(AidlType *type, std::string name, unsigned line);
+ AidlArgument(AidlType* type, std::string name, unsigned line);
virtual ~AidlArgument() = default;
Direction GetDirection() const { return direction_; }
@@ -155,7 +155,6 @@ class AidlDocumentItem : public AidlNode {
AidlDocumentItem() = default;
virtual ~AidlDocumentItem() = default;
- AidlDocumentItem* next = nullptr;
unsigned item_type;
private:
@@ -172,6 +171,7 @@ class AidlParcelable : public AidlDocumentItem {
unsigned GetLine() const { return line_; }
const std::string& GetPackage() const { return package_; }
+ AidlParcelable* next = nullptr;
private:
std::string name_;
unsigned line_;
@@ -251,14 +251,14 @@ class Parser {
bool FoundNoErrors() const { return error_ == 0; }
const std::string& FileName() const { return filename_; }
const std::string& Package() const { return package_; }
- void *Scanner() const { return scanner_; }
+ void* Scanner() const { return scanner_; }
- void SetDocument(AidlDocumentItem *items) { document_ = items; };
+ void SetDocument(AidlDocumentItem* items) { document_ = items; };
void AddImport(std::vector<std::string>* terms, unsigned line);
void SetPackage(std::vector<std::string>* terms);
- AidlDocumentItem *GetDocument() const { return document_; }
+ AidlDocumentItem* GetDocument() const { return document_; }
const std::vector<std::unique_ptr<AidlImport>>& GetImports() { return imports_; }
void ReleaseImports(std::vector<std::unique_ptr<AidlImport>>* ret) {
@@ -271,7 +271,7 @@ class Parser {
int error_ = 0;
std::string filename_;
std::string package_;
- void *scanner_ = nullptr;
+ void* scanner_ = nullptr;
AidlDocumentItem* document_ = nullptr;
std::vector<std::unique_ptr<AidlImport>> imports_;
std::unique_ptr<std::string> raw_buffer_;