protobufjs 7.2.6 → 7.3.0
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 +2 -2
- package/dist/light/protobuf.min.js +2 -2
- package/dist/minimal/protobuf.js +2 -2
- package/dist/minimal/protobuf.min.js +2 -2
- package/dist/protobuf.js +20 -3
- 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 +18 -1
package/package.json
CHANGED
package/src/parse.js
CHANGED
|
@@ -144,7 +144,24 @@ function parse(source, root, options) {
|
|
|
144
144
|
else
|
|
145
145
|
target.push([ start = parseId(next()), skip("to", true) ? parseId(next()) : start ]);
|
|
146
146
|
} while (skip(",", true));
|
|
147
|
-
|
|
147
|
+
var dummy = {options: undefined};
|
|
148
|
+
dummy.setOption = function(name, value) {
|
|
149
|
+
if (this.options === undefined) this.options = {};
|
|
150
|
+
this.options[name] = value;
|
|
151
|
+
};
|
|
152
|
+
ifBlock(
|
|
153
|
+
dummy,
|
|
154
|
+
function parseRange_block(token) {
|
|
155
|
+
/* istanbul ignore else */
|
|
156
|
+
if (token === "option") {
|
|
157
|
+
parseOption(dummy, token); // skip
|
|
158
|
+
skip(";");
|
|
159
|
+
} else
|
|
160
|
+
throw illegal(token);
|
|
161
|
+
},
|
|
162
|
+
function parseRange_line() {
|
|
163
|
+
parseInlineOptions(dummy); // skip
|
|
164
|
+
});
|
|
148
165
|
}
|
|
149
166
|
|
|
150
167
|
function parseNumber(token, insideTryCatch) {
|