Kill comments token in AidlMethod
Change-Id: I3df6629eaa5b56093d2453269d4b138987bee7ce
Test: unit tests
Bug: 24410295
Signed-off-by: Casey Dahlin <sadmac@google.com>
diff --git a/parse_helpers.cpp b/parse_helpers.cpp
index cca2021..c2f63e4 100644
--- a/parse_helpers.cpp
+++ b/parse_helpers.cpp
@@ -79,5 +79,20 @@
return out;
}
+std::string gather_comments(extra_text_type* extra) {
+ std::string s;
+ for (; extra; extra = extra->next) {
+ if (extra->which == SHORT_COMMENT) {
+ s += extra->data;
+ }
+ else if (extra->which == LONG_COMMENT) {
+ s += "/*";
+ s += extra->data;
+ s += "*/";
+ }
+ }
+ return s;
+}
+
} // namespace android
} // namespace aidl