diff options
author | Adam Lesinski <adamlesinski@google.com> | 2015-04-10 19:43:55 -0700 |
---|---|---|
committer | Adam Lesinski <adamlesinski@google.com> | 2015-04-15 19:56:59 -0700 |
commit | 769de98f2dd41bfe39a1c9f76aefd1ad58942733 (patch) | |
tree | 3d79143b08f02dfb61158689f51e01eeb1bb371e /tools/aapt2/ResourceParser.h | |
parent | 9310e4285b3fc951c3524d040726d1161015562c (diff) |
AAPT2: Add library support
Change-Id: I307f56d9631784ab29ee4156d94886f9b2f25b30
Diffstat (limited to 'tools/aapt2/ResourceParser.h')
-rw-r--r-- | tools/aapt2/ResourceParser.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/aapt2/ResourceParser.h b/tools/aapt2/ResourceParser.h index 96bba4febf99..52194bd02f99 100644 --- a/tools/aapt2/ResourceParser.h +++ b/tools/aapt2/ResourceParser.h @@ -64,6 +64,17 @@ public: ResourceNameRef* outReference); /* + * Returns true if the string `str` was parsed as a valid reference to a style. + * The format for a style parent is slightly more flexible than a normal reference: + * + * @[package:]style/<entry> or + * ?[package:]style/<entry> or + * <package>:[style/]<entry> + */ + static bool parseStyleParentReference(const StringPiece16& str, Reference* outReference, + std::string* outError); + + /* * Returns a Reference object if the string was parsed as a resource or attribute reference, * ( @[+][package:]type/name | ?[package:]type/name ) * assigning defaultPackage if the package was not present in the string, and setting @@ -166,7 +177,7 @@ private: bool parsePublic(XmlPullParser* parser, const StringPiece16& name); bool parseAttr(XmlPullParser* parser, const ResourceNameRef& resourceName); std::unique_ptr<Attribute> parseAttrImpl(XmlPullParser* parser, - const ResourceNameRef& resourceName, + ResourceName* resourceName, bool weak); bool parseEnumOrFlagItem(XmlPullParser* parser, const StringPiece16& tag, Attribute::Symbol* outSymbol); |