@optique/core 1.0.0-dev.1726 → 1.0.0-dev.1728
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/constructs.cjs +4 -0
- package/dist/constructs.d.cts +1 -1
- package/dist/constructs.d.ts +1 -1
- package/dist/constructs.js +4 -0
- package/package.json +1 -1
package/dist/constructs.cjs
CHANGED
|
@@ -4450,6 +4450,10 @@ function conditional(discriminator, branches, defaultBranch, options) {
|
|
|
4450
4450
|
};
|
|
4451
4451
|
} else if (defaultBranch === void 0) return deferredDiscriminatorResult;
|
|
4452
4452
|
}
|
|
4453
|
+
if (defaultBranch !== void 0 && (exec?.phase === "parse" || exec?.phase === "suggest")) return {
|
|
4454
|
+
success: true,
|
|
4455
|
+
value: [void 0, void 0]
|
|
4456
|
+
};
|
|
4453
4457
|
if (defaultBranch !== void 0) {
|
|
4454
4458
|
const branchState = getAnnotatedChildState(state, state.branchState ?? defaultBranch.initialState, defaultBranch);
|
|
4455
4459
|
const defaultResult = unwrapCompleteResult(await defaultBranch.complete(branchState, withChildExecPath(exec, "_branch")));
|
package/dist/constructs.d.cts
CHANGED
|
@@ -1343,7 +1343,7 @@ interface ConditionalErrorOptions {
|
|
|
1343
1343
|
* Receives both the discriminator value the parser actually
|
|
1344
1344
|
* resolved to (`discriminatorValue`) and the speculative key the
|
|
1345
1345
|
* branch tokens were committed to (`speculativeKey`).
|
|
1346
|
-
* @since 0.
|
|
1346
|
+
* @since 1.0.1
|
|
1347
1347
|
*/
|
|
1348
1348
|
readonly branchMismatch?: (discriminatorValue: string, speculativeKey: string) => Message;
|
|
1349
1349
|
}
|
package/dist/constructs.d.ts
CHANGED
|
@@ -1343,7 +1343,7 @@ interface ConditionalErrorOptions {
|
|
|
1343
1343
|
* Receives both the discriminator value the parser actually
|
|
1344
1344
|
* resolved to (`discriminatorValue`) and the speculative key the
|
|
1345
1345
|
* branch tokens were committed to (`speculativeKey`).
|
|
1346
|
-
* @since 0.
|
|
1346
|
+
* @since 1.0.1
|
|
1347
1347
|
*/
|
|
1348
1348
|
readonly branchMismatch?: (discriminatorValue: string, speculativeKey: string) => Message;
|
|
1349
1349
|
}
|
package/dist/constructs.js
CHANGED
|
@@ -4450,6 +4450,10 @@ function conditional(discriminator, branches, defaultBranch, options) {
|
|
|
4450
4450
|
};
|
|
4451
4451
|
} else if (defaultBranch === void 0) return deferredDiscriminatorResult;
|
|
4452
4452
|
}
|
|
4453
|
+
if (defaultBranch !== void 0 && (exec?.phase === "parse" || exec?.phase === "suggest")) return {
|
|
4454
|
+
success: true,
|
|
4455
|
+
value: [void 0, void 0]
|
|
4456
|
+
};
|
|
4453
4457
|
if (defaultBranch !== void 0) {
|
|
4454
4458
|
const branchState = getAnnotatedChildState(state, state.branchState ?? defaultBranch.initialState, defaultBranch);
|
|
4455
4459
|
const defaultResult = unwrapCompleteResult(await defaultBranch.complete(branchState, withChildExecPath(exec, "_branch")));
|