aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/js/js_generator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/js/js_generator.h')
-rwxr-xr-xsrc/google/protobuf/compiler/js/js_generator.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/google/protobuf/compiler/js/js_generator.h b/src/google/protobuf/compiler/js/js_generator.h
index 6fd7ca50..d448d8ec 100755
--- a/src/google/protobuf/compiler/js/js_generator.h
+++ b/src/google/protobuf/compiler/js/js_generator.h
@@ -65,8 +65,8 @@ struct GeneratorOptions {
string library;
// Error if there are two types that would generate the same output file?
bool error_on_name_conflict;
- // Enable binary-format support?
- bool binary;
+ // Whether to use legacy behavior for bytes fields.
+ bool legacy_bytes_fields;
// What style of imports should be used.
enum ImportStyle {
IMPORT_CLOSURE, // goog.require()
@@ -82,7 +82,7 @@ struct GeneratorOptions {
namespace_prefix(""),
library(""),
error_on_name_conflict(false),
- binary(false),
+ legacy_bytes_fields(false),
import_style(IMPORT_CLOSURE) {}
bool ParseFromOptions(
@@ -92,7 +92,7 @@ struct GeneratorOptions {
class LIBPROTOC_EXPORT Generator : public CodeGenerator {
public:
- Generator() {}
+ Generator(bool binary) : binary_(binary) {}
virtual ~Generator() {}
virtual bool Generate(const FileDescriptor* file,
@@ -111,6 +111,8 @@ class LIBPROTOC_EXPORT Generator : public CodeGenerator {
string* error) const;
private:
+ bool binary_;
+
void GenerateHeader(const GeneratorOptions& options,
io::Printer* printer) const;