Update printer.cc

pull/12870/head
lukeocamden 2 years ago committed by GitHub
parent 0051291992
commit 28bd987181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/google/protobuf/io/printer.cc

@ -277,6 +277,8 @@ Printer::Format Printer::TokenizeFormat(absl::string_view format_string,
constexpr absl::string_view Printer::kProtocCodegenTrace;
Printer::Printer(ZeroCopyOutputStream* output) : Printer(output, Options{}) {}
Printer::Printer(ZeroCopyOutputStream* output, Options options)
: sink_(output), options_(options) {
if (!options_.enable_codegen_trace.has_value()) {
@ -289,6 +291,10 @@ Printer::Printer(ZeroCopyOutputStream* output, Options options)
}
}
Printer::Printer(ZeroCopyOutputStream* output, char variable_delimiter,
AnnotationCollector* annotation_collector)
: Printer(output, Options{variable_delimiter, annotation_collector}) {}
absl::string_view Printer::LookupVar(absl::string_view var) {
auto result = LookupInFrameStack(var, absl::MakeSpan(var_lookups_));
ABSL_CHECK(result.has_value()) << "could not find " << var;

Loading…
Cancel
Save