From 892db94d0036e0e89f0cf9b4af21f6c349aadd00 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 14 Mar 2019 11:34:11 -0700 Subject: [PATCH] allow file-level options everywhere in the file --- src/parse.js | 4 ---- tests/data/test.proto | 5 +++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/parse.js b/src/parse.js index c0059ef24..17ce6f307 100644 --- a/src/parse.js +++ b/src/parse.js @@ -714,10 +714,6 @@ function parse(source, root, options) { case "option": - /* istanbul ignore if */ - if (!head) - throw illegal(token); - parseOption(ptr, token); skip(";"); break; diff --git a/tests/data/test.proto b/tests/data/test.proto index 79f75c5ce..0d73a7a49 100644 --- a/tests/data/test.proto +++ b/tests/data/test.proto @@ -33,7 +33,6 @@ syntax = "proto2"; option java_package = "com.google.apps.jspb.proto"; -option java_multiple_files = true; import "google/protobuf/descriptor.proto"; @@ -267,4 +266,6 @@ message Deeply { optional int32 count = 1; } } -} \ No newline at end of file +} + +option java_multiple_files = true;