@hyperscale0/hsx 1.0.125 → 1.0.130
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/README.md +2 -2
- package/dist/src/cli.js +1 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/compile.d.ts.map +1 -1
- package/dist/src/compile.js +155 -21
- package/dist/src/compile.js.map +1 -1
- package/dist/src/examples-bundle.js +9 -9
- package/dist/src/examples-bundle.js.map +1 -1
- package/dist/src/headers.d.ts +1 -1
- package/dist/src/headers.d.ts.map +1 -1
- package/dist/src/headers.js +1 -0
- package/dist/src/headers.js.map +1 -1
- package/dist/src/parse.js +4 -1
- package/dist/src/parse.js.map +1 -1
- package/dist/src/std-bundle.d.ts.map +1 -1
- package/dist/src/std-bundle.js +8 -7
- package/dist/src/std-bundle.js.map +1 -1
- package/docs/README.md +102 -50
- package/examples/cards.hsx +4 -0
- package/examples/collections.hsx +5 -1
- package/examples/cost-table.json +80 -56
- package/examples/financing.hsx +1 -1
- package/examples/insurance.hsx +5 -4
- package/examples/lending.hsx +1 -1
- package/examples/library.hsx +1 -1
- package/examples/rental-deposit.hsx +1 -1
- package/examples/reporting.hsx +1 -1
- package/examples/serviced.hsx +1 -1
- package/package.json +4 -4
- package/src/cli.ts +1 -1
- package/src/compile.ts +223 -27
- package/src/examples-bundle.ts +9 -9
- package/src/headers.ts +1 -0
- package/src/parse.ts +4 -1
- package/src/std-bundle.ts +8 -7
- package/std/booking.hsx +75 -0
- package/std/cards.hsx +5 -3
- package/std/escrow.hsx +35 -9
- package/std/financing.hsx +158 -36
- package/std/insurance.hsx +9 -5
- package/std/marketplace.hsx +3 -3
- package/std/money.hsx +3 -3
- package/std/wallet.hsx +20 -9
package/src/parse.ts
CHANGED
|
@@ -471,13 +471,16 @@ class Parser {
|
|
|
471
471
|
this.fail("expression nesting exceeds 32", "reduce nested values");
|
|
472
472
|
const start = this.peek().span.start;
|
|
473
473
|
let value = this.atom();
|
|
474
|
-
|
|
474
|
+
// `cap:` starts the next entry, so a field may still be named cap.
|
|
475
|
+
if (this.at("cap") && this.tokens[this.index + 1]?.text !== ":") {
|
|
476
|
+
this.take();
|
|
475
477
|
value = {
|
|
476
478
|
kind: "capped",
|
|
477
479
|
rate: value,
|
|
478
480
|
cap: this.atom(),
|
|
479
481
|
span: this.span(start),
|
|
480
482
|
};
|
|
483
|
+
}
|
|
481
484
|
if (this.eat("="))
|
|
482
485
|
value = {
|
|
483
486
|
kind: "default",
|