diff options
Diffstat (limited to 'src/compiler/node_generator_helpers.h')
-rw-r--r-- | src/compiler/node_generator_helpers.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/node_generator_helpers.h b/src/compiler/node_generator_helpers.h index f41a2bcf59..5862772841 100644 --- a/src/compiler/node_generator_helpers.h +++ b/src/compiler/node_generator_helpers.h @@ -45,6 +45,13 @@ inline grpc::string GetJSServiceFilename(const grpc::string& filename) { return grpc_generator::StripProto(filename) + "_grpc_pb.js"; } +// 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 GetNodeComments(const DescriptorType *desc, bool leading) { + return grpc_generator::GetPrefixedComments(desc, leading, "//"); +} + } // namespace grpc_node_generator #endif // GRPC_INTERNAL_COMPILER_NODE_GENERATOR_HELPERS_H |