protobufjs 7.2.2 → 7.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/light/protobuf.js +13 -7
- package/dist/light/protobuf.js.map +1 -1
- package/dist/light/protobuf.min.js +3 -3
- package/dist/light/protobuf.min.js.map +1 -1
- package/dist/minimal/protobuf.js +4 -4
- package/dist/minimal/protobuf.js.map +1 -1
- package/dist/minimal/protobuf.min.js +3 -3
- package/dist/minimal/protobuf.min.js.map +1 -1
- package/dist/protobuf.js +23 -7
- package/dist/protobuf.js.map +1 -1
- package/dist/protobuf.min.js +3 -3
- package/dist/protobuf.min.js.map +1 -1
- package/package.json +1 -1
- package/src/parse.js +10 -0
package/package.json
CHANGED
package/src/parse.js
CHANGED
|
@@ -360,6 +360,16 @@ function parse(source, root, options) {
|
|
|
360
360
|
parseGroup(parent, rule);
|
|
361
361
|
return;
|
|
362
362
|
}
|
|
363
|
+
// Type names can consume multiple tokens, in multiple variants:
|
|
364
|
+
// package.subpackage field tokens: "package.subpackage" [TYPE NAME ENDS HERE] "field"
|
|
365
|
+
// package . subpackage field tokens: "package" "." "subpackage" [TYPE NAME ENDS HERE] "field"
|
|
366
|
+
// package. subpackage field tokens: "package." "subpackage" [TYPE NAME ENDS HERE] "field"
|
|
367
|
+
// package .subpackage field tokens: "package" ".subpackage" [TYPE NAME ENDS HERE] "field"
|
|
368
|
+
// Keep reading tokens until we get a type name with no period at the end,
|
|
369
|
+
// and the next token does not start with a period.
|
|
370
|
+
while (type.endsWith(".") || peek().startsWith(".")) {
|
|
371
|
+
type += next();
|
|
372
|
+
}
|
|
363
373
|
|
|
364
374
|
/* istanbul ignore if */
|
|
365
375
|
if (!typeRefRe.test(type))
|