@optique/core 1.1.0-dev.2096 → 1.1.0-dev.2146
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/annotation-state.cjs +26 -26
- package/dist/annotation-state.d.cts +133 -1
- package/dist/annotation-state.d.ts +133 -1
- package/dist/annotations.cjs +2 -2
- package/dist/constructs.cjs +141 -73
- package/dist/constructs.js +70 -2
- package/dist/dependency-metadata.cjs +12 -12
- package/dist/dependency-metadata.d.cts +34 -3
- package/dist/dependency-metadata.d.ts +34 -3
- package/dist/dependency-runtime.cjs +37 -13
- package/dist/dependency-runtime.d.cts +197 -2
- package/dist/dependency-runtime.d.ts +197 -2
- package/dist/dependency-runtime.js +22 -1
- package/dist/dependency.cjs +7 -7
- package/dist/displaywidth.d.cts +12 -0
- package/dist/displaywidth.d.ts +12 -0
- package/dist/execution-context.d.cts +23 -0
- package/dist/execution-context.d.ts +23 -0
- package/dist/extension.cjs +14 -14
- package/dist/facade.cjs +46 -36
- package/dist/facade.js +31 -21
- package/dist/index.cjs +22 -21
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/input-trace.d.cts +2 -1
- package/dist/input-trace.d.ts +2 -1
- package/dist/internal/annotations.cjs +3 -0
- package/dist/internal/annotations.d.cts +47 -5
- package/dist/internal/annotations.d.ts +47 -5
- package/dist/internal/annotations.js +1 -1
- package/dist/internal/command-alias.cjs +16 -0
- package/dist/internal/command-alias.js +14 -0
- package/dist/internal/dependency.cjs +131 -0
- package/dist/internal/dependency.d.cts +311 -2
- package/dist/internal/dependency.d.ts +311 -2
- package/dist/internal/dependency.js +119 -1
- package/dist/internal/parser.cjs +35 -13
- package/dist/internal/parser.d.cts +44 -3
- package/dist/internal/parser.d.ts +44 -3
- package/dist/internal/parser.js +28 -6
- package/dist/modifiers.cjs +41 -41
- package/dist/parser.cjs +11 -11
- package/dist/phase2-seed.cjs +2 -2
- package/dist/phase2-seed.d.cts +50 -0
- package/dist/phase2-seed.d.ts +50 -0
- package/dist/primitives.cjs +74 -33
- package/dist/primitives.d.cts +10 -0
- package/dist/primitives.d.ts +10 -0
- package/dist/primitives.js +54 -13
- package/dist/suggestion.cjs +72 -2
- package/dist/suggestion.d.cts +188 -0
- package/dist/suggestion.d.ts +188 -0
- package/dist/suggestion.js +71 -3
- package/dist/usage-internals.cjs +5 -1
- package/dist/usage-internals.js +5 -1
- package/dist/usage.cjs +9 -1
- package/dist/usage.d.cts +14 -0
- package/dist/usage.d.ts +14 -0
- package/dist/usage.js +9 -1
- package/dist/validate.cjs +1 -0
- package/dist/validate.d.cts +99 -0
- package/dist/validate.d.ts +99 -0
- package/dist/validate.js +1 -1
- package/dist/valueparser.cjs +333 -79
- package/dist/valueparser.d.cts +197 -1
- package/dist/valueparser.d.ts +197 -1
- package/dist/valueparser.js +334 -81
- package/package.json +19 -4
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { NonEmptyString } from "../nonempty.js";
|
|
2
|
+
import { Message } from "../message.js";
|
|
3
|
+
import { DependencyRegistryLike } from "../registry-types.js";
|
|
2
4
|
import { ValueParser, ValueParserResult } from "../valueparser.js";
|
|
3
5
|
import { Mode, Suggestion } from "./parser.js";
|
|
4
6
|
|
|
@@ -51,7 +53,7 @@ declare const singleDefaultValue: unique symbol;
|
|
|
51
53
|
*
|
|
52
54
|
* @internal
|
|
53
55
|
*/
|
|
54
|
-
|
|
56
|
+
declare const defaultDependencyValueSnapshot: unique symbol;
|
|
55
57
|
/**
|
|
56
58
|
* A unique symbol used to access the parseWithDependency method on derived parsers.
|
|
57
59
|
* @since 0.10.0
|
|
@@ -535,5 +537,312 @@ declare function deriveFromAsync<Deps extends readonly AnyDependencySource[], T>
|
|
|
535
537
|
* @returns A cloned parse result with an internal snapshot attached.
|
|
536
538
|
* @internal
|
|
537
539
|
*/
|
|
540
|
+
declare function snapshotDefaultDependencyValues<T>(result: ValueParserResult<T>, values: readonly unknown[]): ValueParserResult<T>;
|
|
541
|
+
/**
|
|
542
|
+
* Reads the snapshotted default dependency values from a parse result.
|
|
543
|
+
*
|
|
544
|
+
* @param result The parse result to inspect.
|
|
545
|
+
* @returns The snapshotted dependency values, if present.
|
|
546
|
+
* @internal
|
|
547
|
+
*/
|
|
548
|
+
declare function getSnapshottedDefaultDependencyValues<T>(result: ValueParserResult<T>): readonly unknown[] | undefined;
|
|
549
|
+
/**
|
|
550
|
+
* A unique symbol used to identify deferred parse states.
|
|
551
|
+
* @since 0.10.0
|
|
552
|
+
*/
|
|
553
|
+
declare const deferredParseMarker: unique symbol;
|
|
554
|
+
/**
|
|
555
|
+
* Represents a deferred parse state for a DerivedValueParser.
|
|
556
|
+
*
|
|
557
|
+
* When a DerivedValueParser is used in an option or argument, the raw
|
|
558
|
+
* input string is stored along with the parser reference. The actual
|
|
559
|
+
* parsing is deferred until `complete()` time when all dependencies
|
|
560
|
+
* have been resolved.
|
|
561
|
+
*
|
|
562
|
+
* @template T The type of value this parser will produce after resolution.
|
|
563
|
+
* @since 0.10.0
|
|
564
|
+
*/
|
|
565
|
+
interface DeferredParseState<T = unknown> {
|
|
566
|
+
/**
|
|
567
|
+
* Marker to identify this as a deferred parse state.
|
|
568
|
+
*/
|
|
569
|
+
readonly [deferredParseMarker]: true;
|
|
570
|
+
/**
|
|
571
|
+
* The raw input string to be parsed.
|
|
572
|
+
*/
|
|
573
|
+
readonly rawInput: string;
|
|
574
|
+
/**
|
|
575
|
+
* The DerivedValueParser that will parse the input.
|
|
576
|
+
*/
|
|
577
|
+
readonly parser: DerivedValueParser<Mode, T, unknown>;
|
|
578
|
+
/**
|
|
579
|
+
* The dependency ID that this parser depends on (for single-dependency parsers).
|
|
580
|
+
*/
|
|
581
|
+
readonly dependencyId: symbol;
|
|
582
|
+
/**
|
|
583
|
+
* The dependency IDs that this parser depends on (for multi-dependency parsers).
|
|
584
|
+
* If present, this is used instead of `dependencyId`.
|
|
585
|
+
*/
|
|
586
|
+
readonly dependencyIds?: readonly symbol[];
|
|
587
|
+
/**
|
|
588
|
+
* The default values to use for dependencies that are not provided.
|
|
589
|
+
* For multi-dependency parsers, this is a tuple of default values in order.
|
|
590
|
+
* For single-dependency parsers, this is the single default value.
|
|
591
|
+
*/
|
|
592
|
+
readonly defaultValues?: readonly unknown[];
|
|
593
|
+
/**
|
|
594
|
+
* The preliminary parse result using the default dependency value.
|
|
595
|
+
* This is used as a fallback if dependency resolution is not needed
|
|
596
|
+
* or if the dependency was not provided.
|
|
597
|
+
*/
|
|
598
|
+
readonly preliminaryResult: ValueParserResult<T>;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Checks if a value is a {@link DeferredParseState}.
|
|
602
|
+
*
|
|
603
|
+
* @param value The value to check.
|
|
604
|
+
* @returns `true` if the value is a deferred parse state, `false` otherwise.
|
|
605
|
+
* @since 0.10.0
|
|
606
|
+
*/
|
|
607
|
+
declare function isDeferredParseState<T>(value: unknown): value is DeferredParseState<T>;
|
|
608
|
+
/**
|
|
609
|
+
* Gets all dependency IDs from a derived parser.
|
|
610
|
+
* If the parser was created with `deriveFrom` (multiple dependencies),
|
|
611
|
+
* returns the array of dependency IDs. Otherwise, returns an array
|
|
612
|
+
* containing the single dependency ID.
|
|
613
|
+
*
|
|
614
|
+
* @param parser The derived value parser to get dependency IDs from.
|
|
615
|
+
* @returns An array of dependency ID symbols.
|
|
616
|
+
* @internal
|
|
617
|
+
* @since 0.10.0
|
|
618
|
+
*/
|
|
619
|
+
declare function getDependencyIds<M extends Mode, T, S>(parser: DerivedValueParser<M, T, S>): readonly symbol[];
|
|
620
|
+
/**
|
|
621
|
+
* Gets the default values function from a multi-source derived parser, if
|
|
622
|
+
* present.
|
|
623
|
+
*
|
|
624
|
+
* Single-source `derive()` defaults must stay lazy during suggestion-time
|
|
625
|
+
* replay so missing dependencies do not eagerly evaluate side-effectful
|
|
626
|
+
* `defaultValue()` thunks.
|
|
627
|
+
*
|
|
628
|
+
* @param parser The derived value parser to get the default values function from.
|
|
629
|
+
* @returns The default values function, or undefined if not available.
|
|
630
|
+
* @internal
|
|
631
|
+
* @since 0.10.0
|
|
632
|
+
*/
|
|
633
|
+
declare function getDefaultValuesFunction<M extends Mode, T, S>(parser: DerivedValueParser<M, T, S>): (() => readonly unknown[]) | undefined;
|
|
634
|
+
/**
|
|
635
|
+
* Creates a deferred parse state for a DerivedValueParser.
|
|
636
|
+
*
|
|
637
|
+
* @template T The type of value the parser will produce.
|
|
638
|
+
* @template S The type of the source dependency value.
|
|
639
|
+
* @param rawInput The raw input string to be parsed.
|
|
640
|
+
* @param parser The DerivedValueParser that will parse the input.
|
|
641
|
+
* @param preliminaryResult The parse result using default dependency value.
|
|
642
|
+
* @returns A DeferredParseState object.
|
|
643
|
+
* @since 0.10.0
|
|
644
|
+
*/
|
|
645
|
+
declare function createDeferredParseState<T, S>(rawInput: string, parser: DerivedValueParser<Mode, T, S>, preliminaryResult: ValueParserResult<T>): DeferredParseState<T>;
|
|
646
|
+
/**
|
|
647
|
+
* A unique symbol used to identify dependency source parse states.
|
|
648
|
+
* @since 0.10.0
|
|
649
|
+
*/
|
|
650
|
+
declare const dependencySourceStateMarker: unique symbol;
|
|
651
|
+
/**
|
|
652
|
+
* Represents a parse state from a DependencySource.
|
|
653
|
+
* This wraps the normal ValueParserResult with the dependency ID so that
|
|
654
|
+
* it can be matched with DeferredParseState during resolution.
|
|
655
|
+
*
|
|
656
|
+
* @template T The type of value this state contains.
|
|
657
|
+
* @since 0.10.0
|
|
658
|
+
*/
|
|
659
|
+
interface DependencySourceState<T = unknown> {
|
|
660
|
+
/**
|
|
661
|
+
* Marker to identify this as a dependency source state.
|
|
662
|
+
*/
|
|
663
|
+
readonly [dependencySourceStateMarker]: true;
|
|
664
|
+
/**
|
|
665
|
+
* The dependency ID of the source.
|
|
666
|
+
*/
|
|
667
|
+
readonly [dependencyId]: symbol;
|
|
668
|
+
/**
|
|
669
|
+
* The underlying parse result.
|
|
670
|
+
*/
|
|
671
|
+
readonly result: ValueParserResult<T>;
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Checks if a value is a {@link DependencySourceState}.
|
|
675
|
+
*
|
|
676
|
+
* @param value The value to check.
|
|
677
|
+
* @returns `true` if the value is a dependency source state, `false` otherwise.
|
|
678
|
+
* @since 0.10.0
|
|
679
|
+
*/
|
|
680
|
+
declare function isDependencySourceState<T>(value: unknown): value is DependencySourceState<T>;
|
|
681
|
+
/**
|
|
682
|
+
* Creates a dependency source state from a parse result.
|
|
683
|
+
*
|
|
684
|
+
* @template T The type of value the state contains.
|
|
685
|
+
* @param result The parse result.
|
|
686
|
+
* @param depId The dependency ID.
|
|
687
|
+
* @returns A DependencySourceState object.
|
|
688
|
+
* @since 0.10.0
|
|
689
|
+
*/
|
|
690
|
+
declare function createDependencySourceState<T>(result: ValueParserResult<T>, depId: symbol): DependencySourceState<T>;
|
|
691
|
+
/**
|
|
692
|
+
* A unique symbol used to identify pending dependency source states.
|
|
693
|
+
* @since 0.10.0
|
|
694
|
+
*/
|
|
695
|
+
declare const pendingDependencySourceStateMarker: unique symbol;
|
|
696
|
+
/**
|
|
697
|
+
* Represents a pending dependency source state.
|
|
698
|
+
* This is used when a dependency source option was not provided, but its
|
|
699
|
+
* dependency ID still needs to be tracked for later resolution with a
|
|
700
|
+
* default value.
|
|
701
|
+
*
|
|
702
|
+
* @since 0.10.0
|
|
703
|
+
*/
|
|
704
|
+
interface PendingDependencySourceState {
|
|
705
|
+
/**
|
|
706
|
+
* Marker to identify this as a pending dependency source state.
|
|
707
|
+
*/
|
|
708
|
+
readonly [pendingDependencySourceStateMarker]: true;
|
|
709
|
+
/**
|
|
710
|
+
* The dependency ID of the source.
|
|
711
|
+
*/
|
|
712
|
+
readonly [dependencyId]: symbol;
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Checks if a value is a {@link PendingDependencySourceState}.
|
|
716
|
+
*
|
|
717
|
+
* @param value The value to check.
|
|
718
|
+
* @returns `true` if the value is a pending dependency source state.
|
|
719
|
+
* @since 0.10.0
|
|
720
|
+
*/
|
|
721
|
+
declare function isPendingDependencySourceState(value: unknown): value is PendingDependencySourceState;
|
|
722
|
+
/**
|
|
723
|
+
* Creates a pending dependency source state.
|
|
724
|
+
*
|
|
725
|
+
* @param depId The dependency ID.
|
|
726
|
+
* @returns A PendingDependencySourceState object.
|
|
727
|
+
* @since 0.10.0
|
|
728
|
+
*/
|
|
729
|
+
declare function createPendingDependencySourceState(depId: symbol): PendingDependencySourceState;
|
|
730
|
+
/**
|
|
731
|
+
* A unique symbol used to identify parsers that wrap a dependency source.
|
|
732
|
+
* This is used by withDefault to indicate it contains an inner parser
|
|
733
|
+
* with a PendingDependencySourceState initialState.
|
|
734
|
+
* @since 0.10.0
|
|
735
|
+
*/
|
|
736
|
+
declare const wrappedDependencySourceMarker: unique symbol;
|
|
737
|
+
/**
|
|
738
|
+
* A unique symbol used to indicate that a wrapper transforms the dependency
|
|
739
|
+
* source value. This is used by withDefault to determine whether its default
|
|
740
|
+
* value should be registered as the dependency value.
|
|
741
|
+
*
|
|
742
|
+
* When a wrapper has this marker set to `true`, it means the wrapper transforms
|
|
743
|
+
* the dependency source value (e.g., via map()), so the wrapper's output is NOT
|
|
744
|
+
* a valid dependency source value.
|
|
745
|
+
*
|
|
746
|
+
* @since 0.10.0
|
|
747
|
+
*/
|
|
748
|
+
declare const transformsDependencyValueMarker: unique symbol;
|
|
749
|
+
/**
|
|
750
|
+
* Checks if a parser transforms the dependency value (has transformsDependencyValueMarker).
|
|
751
|
+
*
|
|
752
|
+
* @param parser The parser to check.
|
|
753
|
+
* @returns `true` if the parser transforms the dependency value.
|
|
754
|
+
* @since 0.10.0
|
|
755
|
+
*/
|
|
756
|
+
declare function transformsDependencyValue(parser: unknown): parser is {
|
|
757
|
+
[transformsDependencyValueMarker]: true;
|
|
758
|
+
};
|
|
759
|
+
/**
|
|
760
|
+
* Checks if a parser wraps a dependency source (has wrappedDependencySourceMarker).
|
|
761
|
+
*
|
|
762
|
+
* @param parser The parser to check.
|
|
763
|
+
* @returns `true` if the parser wraps a dependency source.
|
|
764
|
+
* @since 0.10.0
|
|
765
|
+
*/
|
|
766
|
+
declare function isWrappedDependencySource(parser: unknown): parser is {
|
|
767
|
+
[wrappedDependencySourceMarker]: PendingDependencySourceState;
|
|
768
|
+
};
|
|
769
|
+
/**
|
|
770
|
+
* Represents a resolved dependency value stored during parsing.
|
|
771
|
+
* @since 0.10.0
|
|
772
|
+
*/
|
|
773
|
+
interface ResolvedDependency<T = unknown> {
|
|
774
|
+
/**
|
|
775
|
+
* The dependency ID.
|
|
776
|
+
*/
|
|
777
|
+
readonly id: symbol;
|
|
778
|
+
/**
|
|
779
|
+
* The resolved value.
|
|
780
|
+
*/
|
|
781
|
+
readonly value: T;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* A registry for storing resolved dependency values during parsing.
|
|
785
|
+
* This is used to pass dependency values from DependencySource options
|
|
786
|
+
* to DerivedValueParser options.
|
|
787
|
+
* @since 0.10.0
|
|
788
|
+
*/
|
|
789
|
+
declare class DependencyRegistry implements DependencyRegistryLike {
|
|
790
|
+
private readonly values;
|
|
791
|
+
/**
|
|
792
|
+
* Registers a resolved dependency value.
|
|
793
|
+
* @param id The dependency ID.
|
|
794
|
+
* @param value The resolved value.
|
|
795
|
+
*/
|
|
796
|
+
set<T>(id: symbol, value: T): void;
|
|
797
|
+
/**
|
|
798
|
+
* Gets a resolved dependency value.
|
|
799
|
+
* @param id The dependency ID.
|
|
800
|
+
* @returns The resolved value, or undefined if not found.
|
|
801
|
+
*/
|
|
802
|
+
get<T>(id: symbol): T | undefined;
|
|
803
|
+
/**
|
|
804
|
+
* Checks if a dependency has been resolved.
|
|
805
|
+
* @param id The dependency ID.
|
|
806
|
+
* @returns `true` if the dependency has been resolved.
|
|
807
|
+
*/
|
|
808
|
+
has(id: symbol): boolean;
|
|
809
|
+
/**
|
|
810
|
+
* Creates a copy of the registry.
|
|
811
|
+
*/
|
|
812
|
+
clone(): DependencyRegistry;
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* Error types for dependency resolution failures.
|
|
816
|
+
* @since 0.10.0
|
|
817
|
+
*/
|
|
818
|
+
type DependencyError = {
|
|
819
|
+
/**
|
|
820
|
+
* The dependency was used in multiple locations.
|
|
821
|
+
*/
|
|
822
|
+
readonly kind: "duplicate";
|
|
823
|
+
readonly dependencyId: symbol;
|
|
824
|
+
readonly locations: readonly string[];
|
|
825
|
+
} | {
|
|
826
|
+
/**
|
|
827
|
+
* A derived parser references a dependency that was not provided.
|
|
828
|
+
*/
|
|
829
|
+
readonly kind: "unresolved";
|
|
830
|
+
readonly dependencyId: symbol;
|
|
831
|
+
readonly derivedParserMetavar: string;
|
|
832
|
+
} | {
|
|
833
|
+
/**
|
|
834
|
+
* Circular dependency detected.
|
|
835
|
+
*/
|
|
836
|
+
readonly kind: "circular";
|
|
837
|
+
readonly cycle: readonly symbol[];
|
|
838
|
+
};
|
|
839
|
+
/**
|
|
840
|
+
* Formats a {@link DependencyError} into a human-readable {@link Message}.
|
|
841
|
+
*
|
|
842
|
+
* @param error The dependency error to format.
|
|
843
|
+
* @returns A Message describing the error.
|
|
844
|
+
* @since 0.10.0
|
|
845
|
+
*/
|
|
846
|
+
declare function formatDependencyError(error: DependencyError): Message;
|
|
538
847
|
//#endregion
|
|
539
|
-
export { AnyDependencySource, CombineMode, CombinedDependencyMode, DependencyMode, DependencySource, DependencyValue, DependencyValues, DeriveAsyncOptions, DeriveFromAsyncOptions, DeriveFromOptions, DeriveFromSyncOptions, DeriveOptions, DeriveSyncOptions, DerivedValueParser, dependency, deriveFrom, deriveFromAsync, deriveFromSync, isDependencySource, isDerivedValueParser };
|
|
848
|
+
export { AnyDependencySource, CombineMode, CombinedDependencyMode, DeferredParseState, DependencyError, DependencyMode, DependencyRegistry, DependencySource, DependencySourceState, DependencyValue, DependencyValues, DeriveAsyncOptions, DeriveFromAsyncOptions, DeriveFromOptions, DeriveFromSyncOptions, DeriveOptions, DeriveSyncOptions, DerivedValueParser, PendingDependencySourceState, ResolvedDependency, createDeferredParseState, createDependencySourceState, createPendingDependencySourceState, defaultDependencyValueSnapshot, defaultValues, deferredParseMarker, dependency, dependencyId, dependencyIds, dependencySourceMarker, dependencySourceStateMarker, deriveFrom, deriveFromAsync, deriveFromSync, derivedValueParserMarker, formatDependencyError, getDefaultValuesFunction, getDependencyIds, getSnapshottedDefaultDependencyValues, isDeferredParseState, isDependencySource, isDependencySourceState, isDerivedValueParser, isPendingDependencySourceState, isWrappedDependencySource, parseWithDependency, pendingDependencySourceStateMarker, singleDefaultValue, snapshotDefaultDependencyValues, suggestWithDependency, transformsDependencyValue, transformsDependencyValueMarker, wrappedDependencySourceMarker };
|
|
@@ -885,6 +885,37 @@ function getDefaultValuesFunction(parser) {
|
|
|
885
885
|
return void 0;
|
|
886
886
|
}
|
|
887
887
|
/**
|
|
888
|
+
* Creates a deferred parse state for a DerivedValueParser.
|
|
889
|
+
*
|
|
890
|
+
* @template T The type of value the parser will produce.
|
|
891
|
+
* @template S The type of the source dependency value.
|
|
892
|
+
* @param rawInput The raw input string to be parsed.
|
|
893
|
+
* @param parser The DerivedValueParser that will parse the input.
|
|
894
|
+
* @param preliminaryResult The parse result using default dependency value.
|
|
895
|
+
* @returns A DeferredParseState object.
|
|
896
|
+
* @since 0.10.0
|
|
897
|
+
*/
|
|
898
|
+
function createDeferredParseState(rawInput, parser, preliminaryResult) {
|
|
899
|
+
const multipleIds = dependencyIds in parser ? parser[dependencyIds] : void 0;
|
|
900
|
+
const defaultValuesFn = getDefaultValuesFunction(parser);
|
|
901
|
+
let defaultVals = getSnapshottedDefaultDependencyValues(preliminaryResult);
|
|
902
|
+
if (defaultVals != null) defaultVals = [...defaultVals];
|
|
903
|
+
if (defaultVals == null && defaultValuesFn != null) try {
|
|
904
|
+
defaultVals = [...defaultValuesFn()];
|
|
905
|
+
} catch {
|
|
906
|
+
defaultVals = void 0;
|
|
907
|
+
}
|
|
908
|
+
return {
|
|
909
|
+
[deferredParseMarker]: true,
|
|
910
|
+
rawInput,
|
|
911
|
+
parser,
|
|
912
|
+
dependencyId: parser[dependencyId],
|
|
913
|
+
dependencyIds: multipleIds,
|
|
914
|
+
defaultValues: defaultVals,
|
|
915
|
+
preliminaryResult
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
888
919
|
* A unique symbol used to identify dependency source parse states.
|
|
889
920
|
* @since 0.10.0
|
|
890
921
|
*/
|
|
@@ -931,6 +962,19 @@ function isPendingDependencySourceState(value) {
|
|
|
931
962
|
return typeof value === "object" && value !== null && pendingDependencySourceStateMarker in value && value[pendingDependencySourceStateMarker] === true;
|
|
932
963
|
}
|
|
933
964
|
/**
|
|
965
|
+
* Creates a pending dependency source state.
|
|
966
|
+
*
|
|
967
|
+
* @param depId The dependency ID.
|
|
968
|
+
* @returns A PendingDependencySourceState object.
|
|
969
|
+
* @since 0.10.0
|
|
970
|
+
*/
|
|
971
|
+
function createPendingDependencySourceState(depId) {
|
|
972
|
+
return {
|
|
973
|
+
[pendingDependencySourceStateMarker]: true,
|
|
974
|
+
[dependencyId]: depId
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
934
978
|
* A unique symbol used to identify parsers that wrap a dependency source.
|
|
935
979
|
* This is used by withDefault to indicate it contains an inner parser
|
|
936
980
|
* with a PendingDependencySourceState initialState.
|
|
@@ -950,6 +994,16 @@ const wrappedDependencySourceMarker = Symbol.for("@optique/core/dependency/wrapp
|
|
|
950
994
|
*/
|
|
951
995
|
const transformsDependencyValueMarker = Symbol.for("@optique/core/dependency/transformsDependencyValueMarker");
|
|
952
996
|
/**
|
|
997
|
+
* Checks if a parser transforms the dependency value (has transformsDependencyValueMarker).
|
|
998
|
+
*
|
|
999
|
+
* @param parser The parser to check.
|
|
1000
|
+
* @returns `true` if the parser transforms the dependency value.
|
|
1001
|
+
* @since 0.10.0
|
|
1002
|
+
*/
|
|
1003
|
+
function transformsDependencyValue(parser) {
|
|
1004
|
+
return typeof parser === "object" && parser !== null && transformsDependencyValueMarker in parser && parser[transformsDependencyValueMarker] === true;
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
953
1007
|
* Checks if a parser wraps a dependency source (has wrappedDependencySourceMarker).
|
|
954
1008
|
*
|
|
955
1009
|
* @param parser The parser to check.
|
|
@@ -959,6 +1013,70 @@ const transformsDependencyValueMarker = Symbol.for("@optique/core/dependency/tra
|
|
|
959
1013
|
function isWrappedDependencySource(parser) {
|
|
960
1014
|
return typeof parser === "object" && parser !== null && wrappedDependencySourceMarker in parser;
|
|
961
1015
|
}
|
|
1016
|
+
/**
|
|
1017
|
+
* A registry for storing resolved dependency values during parsing.
|
|
1018
|
+
* This is used to pass dependency values from DependencySource options
|
|
1019
|
+
* to DerivedValueParser options.
|
|
1020
|
+
* @since 0.10.0
|
|
1021
|
+
*/
|
|
1022
|
+
var DependencyRegistry = class DependencyRegistry {
|
|
1023
|
+
values = /* @__PURE__ */ new Map();
|
|
1024
|
+
/**
|
|
1025
|
+
* Registers a resolved dependency value.
|
|
1026
|
+
* @param id The dependency ID.
|
|
1027
|
+
* @param value The resolved value.
|
|
1028
|
+
*/
|
|
1029
|
+
set(id, value) {
|
|
1030
|
+
this.values.set(id, value);
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Gets a resolved dependency value.
|
|
1034
|
+
* @param id The dependency ID.
|
|
1035
|
+
* @returns The resolved value, or undefined if not found.
|
|
1036
|
+
*/
|
|
1037
|
+
get(id) {
|
|
1038
|
+
return this.values.get(id);
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Checks if a dependency has been resolved.
|
|
1042
|
+
* @param id The dependency ID.
|
|
1043
|
+
* @returns `true` if the dependency has been resolved.
|
|
1044
|
+
*/
|
|
1045
|
+
has(id) {
|
|
1046
|
+
return this.values.has(id);
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
* Creates a copy of the registry.
|
|
1050
|
+
*/
|
|
1051
|
+
clone() {
|
|
1052
|
+
const copy = new DependencyRegistry();
|
|
1053
|
+
for (const [id, value] of this.values) copy.values.set(id, value);
|
|
1054
|
+
return copy;
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
1057
|
+
/**
|
|
1058
|
+
* Formats a {@link DependencyError} into a human-readable {@link Message}.
|
|
1059
|
+
*
|
|
1060
|
+
* @param error The dependency error to format.
|
|
1061
|
+
* @returns A Message describing the error.
|
|
1062
|
+
* @since 0.10.0
|
|
1063
|
+
*/
|
|
1064
|
+
function formatDependencyError(error) {
|
|
1065
|
+
switch (error.kind) {
|
|
1066
|
+
case "duplicate": return [{
|
|
1067
|
+
type: "text",
|
|
1068
|
+
text: `Dependency used in multiple locations: ${error.locations.join(", ")}.`
|
|
1069
|
+
}];
|
|
1070
|
+
case "unresolved": return [{
|
|
1071
|
+
type: "text",
|
|
1072
|
+
text: `Unresolved dependency for ${error.derivedParserMetavar}: the dependency was not provided.`
|
|
1073
|
+
}];
|
|
1074
|
+
case "circular": return [{
|
|
1075
|
+
type: "text",
|
|
1076
|
+
text: `Circular dependency detected.`
|
|
1077
|
+
}];
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
962
1080
|
|
|
963
1081
|
//#endregion
|
|
964
|
-
export { createDependencySourceState, defaultValues, dependency, dependencyId, dependencyIds, deriveFrom, deriveFromAsync, deriveFromSync, getDefaultValuesFunction, getDependencyIds, getSnapshottedDefaultDependencyValues, isDeferredParseState, isDependencySource, isDependencySourceState, isDerivedValueParser, isPendingDependencySourceState, isWrappedDependencySource, parseWithDependency, singleDefaultValue, suggestWithDependency, wrappedDependencySourceMarker };
|
|
1082
|
+
export { DependencyRegistry, createDeferredParseState, createDependencySourceState, createPendingDependencySourceState, defaultDependencyValueSnapshot, defaultValues, deferredParseMarker, dependency, dependencyId, dependencyIds, dependencySourceMarker, dependencySourceStateMarker, deriveFrom, deriveFromAsync, deriveFromSync, derivedValueParserMarker, formatDependencyError, getDefaultValuesFunction, getDependencyIds, getSnapshottedDefaultDependencyValues, isDeferredParseState, isDependencySource, isDependencySourceState, isDerivedValueParser, isPendingDependencySourceState, isWrappedDependencySource, parseWithDependency, pendingDependencySourceStateMarker, singleDefaultValue, snapshotDefaultDependencyValues, suggestWithDependency, transformsDependencyValue, transformsDependencyValueMarker, wrappedDependencySourceMarker };
|
package/dist/internal/parser.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_internal_annotations = require('./annotations.cjs');
|
|
2
2
|
const require_message = require('../message.cjs');
|
|
3
3
|
const require_usage = require('../usage.cjs');
|
|
4
4
|
const require_doc = require('../doc.cjs');
|
|
@@ -64,7 +64,7 @@ function createParserContext(frame, exec) {
|
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
function injectAnnotationsIntoState(state, options) {
|
|
67
|
-
return
|
|
67
|
+
return require_internal_annotations.injectAnnotations(state, options?.annotations);
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
70
|
* Parses an array of command-line arguments using the provided combined parser.
|
|
@@ -92,7 +92,7 @@ function injectAnnotationsIntoState(state, options) {
|
|
|
92
92
|
*/
|
|
93
93
|
function parseSync(parser, args, options) {
|
|
94
94
|
const initialState = injectAnnotationsIntoState(parser.initialState, options);
|
|
95
|
-
const shouldUnwrapAnnotatedValue =
|
|
95
|
+
const shouldUnwrapAnnotatedValue = require_internal_annotations.hasMeaningfulAnnotations(options?.annotations) || require_internal_annotations.isInjectedAnnotationWrapper(parser.initialState);
|
|
96
96
|
const exec = {
|
|
97
97
|
usage: parser.usage,
|
|
98
98
|
phase: "parse",
|
|
@@ -123,12 +123,13 @@ function parseSync(parser, args, options) {
|
|
|
123
123
|
phase: "complete",
|
|
124
124
|
dependencyRuntime: runtime,
|
|
125
125
|
dependencyRegistry: runtime.registry,
|
|
126
|
+
commandPath: context.exec?.commandPath ?? exec.commandPath,
|
|
126
127
|
trace: context.exec?.trace ?? context.trace ?? exec.trace
|
|
127
128
|
};
|
|
128
129
|
const endResult = parser.complete(context.state, completeExec);
|
|
129
130
|
return endResult.success ? {
|
|
130
131
|
success: true,
|
|
131
|
-
value: shouldUnwrapAnnotatedValue ?
|
|
132
|
+
value: shouldUnwrapAnnotatedValue ? require_internal_annotations.unwrapInjectedAnnotationWrapper(endResult.value) : endResult.value,
|
|
132
133
|
...endResult.deferred ? { deferred: true } : {},
|
|
133
134
|
...endResult.deferredKeys ? { deferredKeys: endResult.deferredKeys } : {}
|
|
134
135
|
} : {
|
|
@@ -164,7 +165,7 @@ function isBufferUnchanged(previous, current) {
|
|
|
164
165
|
*/
|
|
165
166
|
async function parseAsync(parser, args, options) {
|
|
166
167
|
const initialState = injectAnnotationsIntoState(parser.initialState, options);
|
|
167
|
-
const shouldUnwrapAnnotatedValue =
|
|
168
|
+
const shouldUnwrapAnnotatedValue = require_internal_annotations.hasMeaningfulAnnotations(options?.annotations) || require_internal_annotations.isInjectedAnnotationWrapper(parser.initialState);
|
|
168
169
|
const exec = {
|
|
169
170
|
usage: parser.usage,
|
|
170
171
|
phase: "parse",
|
|
@@ -195,12 +196,13 @@ async function parseAsync(parser, args, options) {
|
|
|
195
196
|
phase: "complete",
|
|
196
197
|
dependencyRuntime: runtime,
|
|
197
198
|
dependencyRegistry: runtime.registry,
|
|
199
|
+
commandPath: context.exec?.commandPath ?? exec.commandPath,
|
|
198
200
|
trace: context.exec?.trace ?? context.trace ?? exec.trace
|
|
199
201
|
};
|
|
200
202
|
const endResult = await parser.complete(context.state, completeExec);
|
|
201
203
|
return endResult.success ? {
|
|
202
204
|
success: true,
|
|
203
|
-
value: shouldUnwrapAnnotatedValue ?
|
|
205
|
+
value: shouldUnwrapAnnotatedValue ? require_internal_annotations.unwrapInjectedAnnotationWrapper(endResult.value) : endResult.value,
|
|
204
206
|
...endResult.deferred ? { deferred: true } : {},
|
|
205
207
|
...endResult.deferredKeys ? { deferredKeys: endResult.deferredKeys } : {}
|
|
206
208
|
} : {
|
|
@@ -534,7 +536,7 @@ function findCommandInUsageSequence(usage, commandName) {
|
|
|
534
536
|
* @returns The contextual usage terms if found, null otherwise.
|
|
535
537
|
*/
|
|
536
538
|
function findCommandInCurrentUsageTerm(term, commandName, trailingUsage) {
|
|
537
|
-
if (term.type === "command" && term
|
|
539
|
+
if (term.type === "command" && commandTermMatches(term, commandName)) return [term, ...trailingUsage];
|
|
538
540
|
if (term.type === "exclusive") {
|
|
539
541
|
const found = findCommandInExclusive(term, commandName);
|
|
540
542
|
if (found) return [...found, ...trailingUsage];
|
|
@@ -544,7 +546,27 @@ function findCommandInCurrentUsageTerm(term, commandName, trailingUsage) {
|
|
|
544
546
|
}
|
|
545
547
|
return null;
|
|
546
548
|
}
|
|
547
|
-
function
|
|
549
|
+
function commandTermMatches(term, commandName) {
|
|
550
|
+
return term?.type === "command" && (term.name === commandName || term.aliases?.includes(commandName) === true || term.hiddenAliases?.includes(commandName) === true);
|
|
551
|
+
}
|
|
552
|
+
function collectCommandInputNames(usage, commandName, names) {
|
|
553
|
+
for (const term of usage) if (term.type === "command") {
|
|
554
|
+
if (commandTermMatches(term, commandName)) {
|
|
555
|
+
names.add(term.name);
|
|
556
|
+
for (const alias of term.aliases ?? []) names.add(alias);
|
|
557
|
+
for (const alias of term.hiddenAliases ?? []) names.add(alias);
|
|
558
|
+
}
|
|
559
|
+
} else if (term.type === "exclusive") for (const branch of term.terms) collectCommandInputNames(branch, commandName, names);
|
|
560
|
+
else if (term.type === "sequence") collectCommandInputNames(term.terms, commandName, names);
|
|
561
|
+
else if (term.type === "optional" || term.type === "multiple") collectCommandInputNames(term.terms, commandName, names);
|
|
562
|
+
}
|
|
563
|
+
function findLastCommandInputIndex(consumed, commandName, usage, searchEnd) {
|
|
564
|
+
const names = new Set([commandName]);
|
|
565
|
+
collectCommandInputNames(usage, commandName, names);
|
|
566
|
+
for (let index = searchEnd - 1; index >= 0; index--) if (names.has(consumed[index])) return index;
|
|
567
|
+
return -1;
|
|
568
|
+
}
|
|
569
|
+
function recordMatchedCommandArgIndices(usage, consumed, previousCommandPath, nextCommandPath, consumedOffset, indices) {
|
|
548
570
|
const previousLength = previousCommandPath?.length ?? 0;
|
|
549
571
|
const next = nextCommandPath ?? [];
|
|
550
572
|
if (next.length <= previousLength || consumed.length < 1) return;
|
|
@@ -552,7 +574,7 @@ function recordMatchedCommandArgIndices(consumed, previousCommandPath, nextComma
|
|
|
552
574
|
for (let index = next.length - 1; index >= previousLength; index--) {
|
|
553
575
|
if (searchEnd <= 0) break;
|
|
554
576
|
const commandName = next[index];
|
|
555
|
-
const localIndex = consumed
|
|
577
|
+
const localIndex = findLastCommandInputIndex(consumed, commandName, usage, searchEnd);
|
|
556
578
|
if (localIndex < 0) continue;
|
|
557
579
|
indices.add(consumedOffset + localIndex);
|
|
558
580
|
searchEnd = localIndex;
|
|
@@ -636,7 +658,7 @@ function getDocPageSyncImpl(parser, args, options) {
|
|
|
636
658
|
const previousBuffer = context.buffer;
|
|
637
659
|
context = result.next;
|
|
638
660
|
const consumedCount = previousBuffer.length - context.buffer.length;
|
|
639
|
-
recordMatchedCommandArgIndices(previousBuffer.slice(0, consumedCount), previousCommandPath, context.exec?.commandPath, args.length - previousBuffer.length, matchedCommandArgIndices);
|
|
661
|
+
recordMatchedCommandArgIndices(parser.usage, previousBuffer.slice(0, consumedCount), previousCommandPath, context.exec?.commandPath, args.length - previousBuffer.length, matchedCommandArgIndices);
|
|
640
662
|
if (isBufferUnchanged(previousBuffer, context.buffer)) break;
|
|
641
663
|
}
|
|
642
664
|
return buildDocPage(parser, context, args, matchedCommandArgIndices);
|
|
@@ -665,7 +687,7 @@ async function getDocPageAsyncImpl(parser, args, options) {
|
|
|
665
687
|
const previousBuffer = context.buffer;
|
|
666
688
|
context = result.next;
|
|
667
689
|
const consumedCount = previousBuffer.length - context.buffer.length;
|
|
668
|
-
recordMatchedCommandArgIndices(previousBuffer.slice(0, consumedCount), previousCommandPath, context.exec?.commandPath, args.length - previousBuffer.length, matchedCommandArgIndices);
|
|
690
|
+
recordMatchedCommandArgIndices(parser.usage, previousBuffer.slice(0, consumedCount), previousCommandPath, context.exec?.commandPath, args.length - previousBuffer.length, matchedCommandArgIndices);
|
|
669
691
|
if (isBufferUnchanged(previousBuffer, context.buffer)) break;
|
|
670
692
|
}
|
|
671
693
|
return buildDocPage(parser, context, args, matchedCommandArgIndices);
|
|
@@ -682,7 +704,7 @@ function buildDocPage(parser, context, args, matchedCommandArgIndices) {
|
|
|
682
704
|
}, void 0);
|
|
683
705
|
if (args.length === 0 && Reflect.get(parser, Symbol.for("@optique/core/commandParser")) === true && fragments.length === 1 && fragments[0].type === "entry" && fragments[0].term.type === "command") {
|
|
684
706
|
const cmdName = fragments[0].term.name;
|
|
685
|
-
const matchedState =
|
|
707
|
+
const matchedState = require_internal_annotations.inheritAnnotations(context.state, ["matched", cmdName]);
|
|
686
708
|
const matched = parser.getDocFragments({
|
|
687
709
|
kind: "available",
|
|
688
710
|
state: matchedState
|
|
@@ -725,7 +747,7 @@ function buildDocPage(parser, context, args, matchedCommandArgIndices) {
|
|
|
725
747
|
const sections = buildingSections;
|
|
726
748
|
const usage = [...require_usage.normalizeUsage(parser.usage)];
|
|
727
749
|
const maybeApplyCommandUsageLine = (term, arg, isLastArg, usageIndex) => {
|
|
728
|
-
if (term?.type !== "command" || term
|
|
750
|
+
if (term?.type !== "command" || !commandTermMatches(term, arg) || !isLastArg || term.usageLine == null) return;
|
|
729
751
|
const defaultUsageLine = require_usage.cloneUsage(usage.slice(usageIndex + 1));
|
|
730
752
|
const customUsageLine = typeof term.usageLine === "function" ? term.usageLine(defaultUsageLine) : term.usageLine;
|
|
731
753
|
const normalizedCustomUsageLine = require_usage.normalizeUsage(customUsageLine);
|
|
@@ -475,7 +475,15 @@ declare const unmatchedNonCliDependencySourceStateMarker: unique symbol;
|
|
|
475
475
|
*
|
|
476
476
|
* @internal
|
|
477
477
|
*/
|
|
478
|
-
|
|
478
|
+
declare const inheritParentAnnotationsKey: unique symbol;
|
|
479
|
+
/**
|
|
480
|
+
* Internal marker for wrapper parsers that should only treat annotation-only
|
|
481
|
+
* primitive wrapper states as completable when a nested source-binding wrapper
|
|
482
|
+
* produced them.
|
|
483
|
+
*
|
|
484
|
+
* @internal
|
|
485
|
+
*/
|
|
486
|
+
declare const annotationWrapperRequiresSourceBindingKey: unique symbol;
|
|
479
487
|
/**
|
|
480
488
|
* The context of the parser, which includes the input buffer and the state.
|
|
481
489
|
*
|
|
@@ -823,7 +831,40 @@ declare function suggestSync<T>(parser: Parser<"sync", T, unknown>, args: readon
|
|
|
823
831
|
* @returns The runtime nodes used to seed suggest-time dependency resolution.
|
|
824
832
|
* @internal
|
|
825
833
|
*/
|
|
826
|
-
|
|
834
|
+
declare function getParserSuggestRuntimeNodes<TState>(parser: Parser<Mode, unknown, TState>, state: TState, path: readonly PropertyKey[]): readonly RuntimeNode[];
|
|
835
|
+
/**
|
|
836
|
+
* Returns wrapper-aware suggest-time runtime nodes for parsers that delegate
|
|
837
|
+
* to an inner parser while also exposing their own source metadata.
|
|
838
|
+
*
|
|
839
|
+
* The inner parser's nodes are always preserved so nested wrappers and
|
|
840
|
+
* constructs can continue to seed the dependency runtime recursively. When
|
|
841
|
+
* the outer parser itself owns source metadata, its `(path, parser, state)`
|
|
842
|
+
* node is appended so outer precedence rules still apply.
|
|
843
|
+
*
|
|
844
|
+
* @internal
|
|
845
|
+
*/
|
|
846
|
+
declare function getDelegatingSuggestRuntimeNodes<TInnerState>(innerParser: Parser<Mode, unknown, TInnerState>, outerParser: Parser<Mode, unknown, unknown>, state: unknown, path: readonly PropertyKey[], innerState: TInnerState, outerPosition?: "append" | "prepend"): readonly RuntimeNode[];
|
|
847
|
+
/**
|
|
848
|
+
* Composes source metadata for a wrapper parser while preserving any derived
|
|
849
|
+
* or transform capabilities from the inner parser unchanged.
|
|
850
|
+
*
|
|
851
|
+
* @internal
|
|
852
|
+
*/
|
|
853
|
+
declare function composeWrappedSourceMetadata(dependencyMetadata: ParserDependencyMetadata | undefined, wrapSource: (source: NonNullable<ParserDependencyMetadata["source"]>) => NonNullable<ParserDependencyMetadata["source"]>): ParserDependencyMetadata | undefined;
|
|
854
|
+
/**
|
|
855
|
+
* Marks a parser as inheriting parent-state annotations through wrapper-state
|
|
856
|
+
* reconstruction.
|
|
857
|
+
*
|
|
858
|
+
* @internal
|
|
859
|
+
*/
|
|
860
|
+
declare function defineInheritedAnnotationParser(parser: object): void;
|
|
861
|
+
/**
|
|
862
|
+
* Marks a wrapper parser as requiring a real source-binding state before
|
|
863
|
+
* annotation-only primitive wrappers should trigger completion.
|
|
864
|
+
*
|
|
865
|
+
* @internal
|
|
866
|
+
*/
|
|
867
|
+
declare function defineSourceBindingOnlyAnnotationCompletionParser(parser: object): void;
|
|
827
868
|
/**
|
|
828
869
|
* Generates command-line suggestions based on current parsing state.
|
|
829
870
|
* This function processes the input arguments up to the last argument,
|
|
@@ -958,4 +999,4 @@ declare function getDocPage(parser: Parser<"sync", unknown, unknown>, argsOrOpti
|
|
|
958
999
|
declare function getDocPage(parser: Parser<"async", unknown, unknown>, argsOrOptions?: readonly string[] | ParseOptions, options?: ParseOptions): Promise<DocPage | undefined>;
|
|
959
1000
|
declare function getDocPage<M extends Mode>(parser: Parser<M, unknown, unknown>, argsOrOptions?: readonly string[] | ParseOptions, options?: ParseOptions): ModeValue<M, DocPage | undefined>;
|
|
960
1001
|
//#endregion
|
|
961
|
-
export { CombineModes, DocState, ExecutionContext, ExecutionPhase, InferMode, InferValue, Mode, ModeIterable, ModeValue, ParseFrame, Parser, ParserContext, ParserResult, Result, Suggestion, createParserContext, getDocPage, getDocPageAsync, getDocPageSync, parse, parseAsync, parseSync, suggest, suggestAsync, suggestSync };
|
|
1002
|
+
export { CombineModes, DocState, ExecutionContext, ExecutionPhase, InferMode, InferValue, Mode, ModeIterable, ModeValue, ParseFrame, type ParseOptions, Parser, ParserContext, ParserResult, Result, Suggestion, annotationWrapperRequiresSourceBindingKey, composeWrappedSourceMetadata, createParserContext, defineInheritedAnnotationParser, defineSourceBindingOnlyAnnotationCompletionParser, getDelegatingSuggestRuntimeNodes, getDocPage, getDocPageAsync, getDocPageSync, getParserSuggestRuntimeNodes, inheritParentAnnotationsKey, parse, parseAsync, parseSync, suggest, suggestAsync, suggestSync, unmatchedNonCliDependencySourceStateMarker };
|