cddl 0.11.0 → 0.12.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/build/parser.d.ts.map +1 -1
- package/build/parser.js +8 -3
- package/package.json +1 -1
package/build/parser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,YAAY,CAAA;AAE9B,OAAO,EAAE,KAAK,EAAU,MAAM,aAAa,CAAC;AAG5C,OAAO,EAE2C,UAAU,EAE3D,MAAM,UAAU,CAAA;AAoBjB,MAAM,CAAC,OAAO,OAAO,MAAM;;IAEvB,CAAC,EAAE,KAAK,CAAC;IAET,QAAQ,EAAE,KAAK,CAAa;IAC5B,SAAS,EAAE,KAAK,CAAa;gBAEhB,QAAQ,EAAE,MAAM;IAQ7B,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,gBAAgB;IA2CxB,OAAO,CAAC,oBAAoB;
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../src/parser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,YAAY,CAAA;AAE9B,OAAO,EAAE,KAAK,EAAU,MAAM,aAAa,CAAC;AAG5C,OAAO,EAE2C,UAAU,EAE3D,MAAM,UAAU,CAAA;AAoBjB,MAAM,CAAC,OAAO,OAAO,MAAM;;IAEvB,CAAC,EAAE,KAAK,CAAC;IAET,QAAQ,EAAE,KAAK,CAAa;IAC5B,SAAS,EAAE,KAAK,CAAa;gBAEhB,QAAQ,EAAE,MAAM;IAQ7B,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,gBAAgB;IA2CxB,OAAO,CAAC,oBAAoB;IA0b5B,OAAO,CAAC,wBAAwB;IAahC;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,iBAAiB;IAqJzB,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,kBAAkB;IAuD1B,OAAO,CAAC,gBAAgB;IA4DxB;;OAEG;IACH,OAAO,CAAC,YAAY;IAcpB,KAAK;IAaL,OAAO,CAAC,WAAW;CAKtB"}
|
package/build/parser.js
CHANGED
|
@@ -316,7 +316,7 @@ export default class Parser {
|
|
|
316
316
|
* parse property value
|
|
317
317
|
*/
|
|
318
318
|
const props = this.parseAssignmentValue();
|
|
319
|
-
|
|
319
|
+
let operator = this.isOperator() ? this.parseOperator() : undefined;
|
|
320
320
|
if (!isChoice && this.curToken.Type === Tokens.SLASH) {
|
|
321
321
|
this.nextToken();
|
|
322
322
|
const nextType = this.parsePropertyType();
|
|
@@ -326,9 +326,14 @@ export default class Parser {
|
|
|
326
326
|
* of one, e.g. `(float .ge 1.0) / null`
|
|
327
327
|
*/
|
|
328
328
|
props.push(nextType);
|
|
329
|
-
this.
|
|
329
|
+
if (!this.isOperator()) {
|
|
330
|
+
this.nextToken();
|
|
331
|
+
}
|
|
330
332
|
}
|
|
331
333
|
}
|
|
334
|
+
if (this.isOperator()) {
|
|
335
|
+
operator = this.parseOperator();
|
|
336
|
+
}
|
|
332
337
|
if (Array.isArray(props)) {
|
|
333
338
|
/**
|
|
334
339
|
* property has multiple types (e.g. `float / tstr / int`)
|
|
@@ -641,7 +646,7 @@ export default class Parser {
|
|
|
641
646
|
* as a grouped range.
|
|
642
647
|
*/
|
|
643
648
|
this.nextToken();
|
|
644
|
-
if (this.
|
|
649
|
+
if (this.isOperator()) {
|
|
645
650
|
isGroupedRange = true;
|
|
646
651
|
}
|
|
647
652
|
}
|
package/package.json
CHANGED