aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler
diff options
context:
space:
mode:
authorGravatar David G. Quintas <dgq@google.com>2017-11-27 12:27:49 -0800
committerGravatar GitHub <noreply@github.com>2017-11-27 12:27:49 -0800
commit333dd3e1ad9acdccb10a7536590317bf58102ad9 (patch)
treedd54a40337438cf7537903b8921116f288ef125d /src/compiler
parent62a53ee55a23132526ff780fcb8aae7d155db135 (diff)
Revert "Do not interpolate variables in leading comments."
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/cpp_generator.cc2
-rw-r--r--src/compiler/csharp_generator.cc2
-rw-r--r--src/compiler/node_generator.cc2
-rw-r--r--src/compiler/objective_c_generator.cc2
-rw-r--r--src/compiler/php_generator.cc2
-rw-r--r--src/compiler/protobuf_plugin.h1
-rw-r--r--src/compiler/python_generator.cc2
-rw-r--r--src/compiler/ruby_generator.cc2
-rw-r--r--src/compiler/schema_interface.h1
9 files changed, 7 insertions, 9 deletions
diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc
index dec8cd0f25..3adf0fa451 100644
--- a/src/compiler/cpp_generator.cc
+++ b/src/compiler/cpp_generator.cc
@@ -104,7 +104,7 @@ grpc::string GetHeaderPrologue(grpc_generator::File* file,
grpc::string leading_comments = file->GetLeadingComments("//");
if (!leading_comments.empty()) {
printer->Print(vars, "// Original file comments:\n");
- printer->PrintRaw(leading_comments.c_str());
+ printer->Print(leading_comments.c_str());
}
printer->Print(vars, "#ifndef GRPC_$filename_identifier$__INCLUDED\n");
printer->Print(vars, "#define GRPC_$filename_identifier$__INCLUDED\n");
diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc
index 40fe0b054a..e0957bf9bb 100644
--- a/src/compiler/csharp_generator.cc
+++ b/src/compiler/csharp_generator.cc
@@ -666,7 +666,7 @@ grpc::string GetServices(const FileDescriptor* file, bool generate_client,
grpc::string leading_comments = GetCsharpComments(file, true);
if (!leading_comments.empty()) {
out.Print("// Original file comments:\n");
- out.PrintRaw(leading_comments.c_str());
+ out.Print(leading_comments.c_str());
}
out.Print("#pragma warning disable 1591\n");
diff --git a/src/compiler/node_generator.cc b/src/compiler/node_generator.cc
index 661587cbd6..ed835b4445 100644
--- a/src/compiler/node_generator.cc
+++ b/src/compiler/node_generator.cc
@@ -250,7 +250,7 @@ grpc::string GenerateFile(const FileDescriptor* file) {
grpc::string leading_comments = GetNodeComments(file, true);
if (!leading_comments.empty()) {
out.Print("// Original file comments:\n");
- out.PrintRaw(leading_comments.c_str());
+ out.Print(leading_comments.c_str());
}
out.Print("'use strict';\n");
diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc
index 8fe30e97e9..349f1dc281 100644
--- a/src/compiler/objective_c_generator.cc
+++ b/src/compiler/objective_c_generator.cc
@@ -65,7 +65,7 @@ static void PrintAllComments(const DescriptorType* desc, Printer* printer) {
printer->Print(" * ");
size_t start_pos = it->find_first_not_of(' ');
if (start_pos != grpc::string::npos) {
- printer->PrintRaw(it->c_str() + start_pos);
+ printer->Print(it->c_str() + start_pos);
}
printer->Print("\n");
}
diff --git a/src/compiler/php_generator.cc b/src/compiler/php_generator.cc
index d9705e8077..1ff9520d7f 100644
--- a/src/compiler/php_generator.cc
+++ b/src/compiler/php_generator.cc
@@ -164,7 +164,7 @@ grpc::string GenerateFile(const FileDescriptor* file,
grpc::string leading_comments = GetPHPComments(file, "//");
if (!leading_comments.empty()) {
out.Print("// Original file comments:\n");
- out.PrintRaw(leading_comments.c_str());
+ out.Print(leading_comments.c_str());
}
map<grpc::string, grpc::string> vars;
diff --git a/src/compiler/protobuf_plugin.h b/src/compiler/protobuf_plugin.h
index b971af1310..1551908156 100644
--- a/src/compiler/protobuf_plugin.h
+++ b/src/compiler/protobuf_plugin.h
@@ -141,7 +141,6 @@ class ProtoBufPrinter : public grpc_generator::Printer {
}
void Print(const char* string) { printer_.Print(string); }
- void PrintRaw(const char* string) { printer_.PrintRaw(string); }
void Indent() { printer_.Indent(); }
void Outdent() { printer_.Outdent(); }
diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc
index 8a0b889454..c1ae7d31ad 100644
--- a/src/compiler/python_generator.cc
+++ b/src/compiler/python_generator.cc
@@ -101,7 +101,7 @@ void PrivateGenerator::PrintAllComments(StringVector comments,
++it) {
size_t start_pos = it->find_first_not_of(' ');
if (start_pos != grpc::string::npos) {
- out->PrintRaw(it->c_str() + start_pos);
+ out->Print(it->c_str() + start_pos);
}
out->Print("\n");
}
diff --git a/src/compiler/ruby_generator.cc b/src/compiler/ruby_generator.cc
index e81dea603b..ed7e074b47 100644
--- a/src/compiler/ruby_generator.cc
+++ b/src/compiler/ruby_generator.cc
@@ -174,7 +174,7 @@ grpc::string GetServices(const FileDescriptor* file) {
grpc::string leading_comments = GetRubyComments(file, true);
if (!leading_comments.empty()) {
out.Print("# Original file comments:\n");
- out.PrintRaw(leading_comments.c_str());
+ out.Print(leading_comments.c_str());
}
out.Print("\n");
diff --git a/src/compiler/schema_interface.h b/src/compiler/schema_interface.h
index c000478e68..b2021f2926 100644
--- a/src/compiler/schema_interface.h
+++ b/src/compiler/schema_interface.h
@@ -86,7 +86,6 @@ struct Printer {
virtual void Print(const std::map<grpc::string, grpc::string>& vars,
const char* template_string) = 0;
virtual void Print(const char* string) = 0;
- virtual void PrintRaw(const char* string) = 0;
virtual void Indent() = 0;
virtual void Outdent() = 0;
};