aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/generator_helpers.h
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2016-05-20 13:24:59 -0700
committerGravatar murgatroid99 <mlumish@google.com>2016-05-20 13:24:59 -0700
commit210f3c4b8e3088fc26e674841c7c992ef1c7d609 (patch)
tree23a3744021eb06dc270e507faf657de950113ddc /src/compiler/generator_helpers.h
parent3c62c555a4d1b4385d4f8c6c9f533c34c82cec5a (diff)
Added comments to node generation, also refactored some plugin code
Diffstat (limited to 'src/compiler/generator_helpers.h')
-rw-r--r--src/compiler/generator_helpers.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/generator_helpers.h b/src/compiler/generator_helpers.h
index bd077cf798..53391bc41a 100644
--- a/src/compiler/generator_helpers.h
+++ b/src/compiler/generator_helpers.h
@@ -265,10 +265,10 @@ inline grpc::string GenerateCommentsWithPrefix(
return oss.str();
}
-// Get leading or trailing comments in a string. Comment lines start with "// ".
-// Leading detached comments are put in in front of leading comments.
template <typename DescriptorType>
-inline grpc::string GetCppComments(const DescriptorType *desc, bool leading) {
+inline grpc::string GetPrefixedComments(const DescriptorType *desc,
+ bool leading,
+ const grpc::string &prefix) {
std::vector<grpc::string> out;
if (leading) {
grpc_generator::GetComment(
@@ -281,7 +281,7 @@ inline grpc::string GetCppComments(const DescriptorType *desc, bool leading) {
grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_TRAILING,
&out);
}
- return GenerateCommentsWithPrefix(out, "//");
+ return GenerateCommentsWithPrefix(out, prefix);
}
} // namespace grpc_generator