Skip to content

Commit b70eebd

Browse files
fix: allow file-level options everywhere in the file
allow file-level options everywhere in the file
2 parents 6fa4c34 + 892db94 commit b70eebd

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/parse.js

-4
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,6 @@ function parse(source, root, options) {
714714

715715
case "option":
716716

717-
/* istanbul ignore if */
718-
if (!head)
719-
throw illegal(token);
720-
721717
parseOption(ptr, token);
722718
skip(";");
723719
break;

tests/data/test.proto

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
syntax = "proto2";
3434

3535
option java_package = "com.google.apps.jspb.proto";
36-
option java_multiple_files = true;
3736

3837
import "google/protobuf/descriptor.proto";
3938

@@ -267,4 +266,6 @@ message Deeply {
267266
optional int32 count = 1;
268267
}
269268
}
270-
}
269+
}
270+
271+
option java_multiple_files = true;

0 commit comments

Comments
 (0)