@hydranium/core 1.0.0-next.10
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/LICENSE +21 -0
- package/README.md +100 -0
- package/lib/documents/ast-document-manager.d.ts +243 -0
- package/lib/documents/ast-document-manager.d.ts.map +1 -0
- package/lib/documents/ast-document-manager.js +302 -0
- package/lib/documents/ast-document-manager.js.map +1 -0
- package/lib/documents/client-ids.d.ts +30 -0
- package/lib/documents/client-ids.d.ts.map +1 -0
- package/lib/documents/client-ids.js +30 -0
- package/lib/documents/client-ids.js.map +1 -0
- package/lib/documents/hydranium-text-documents.d.ts +490 -0
- package/lib/documents/hydranium-text-documents.d.ts.map +1 -0
- package/lib/documents/hydranium-text-documents.js +893 -0
- package/lib/documents/hydranium-text-documents.js.map +1 -0
- package/lib/documents/index.d.ts +14 -0
- package/lib/documents/index.d.ts.map +1 -0
- package/lib/documents/index.js +14 -0
- package/lib/documents/index.js.map +1 -0
- package/lib/documents/language-client-text-shadow.d.ts +101 -0
- package/lib/documents/language-client-text-shadow.d.ts.map +1 -0
- package/lib/documents/language-client-text-shadow.js +156 -0
- package/lib/documents/language-client-text-shadow.js.map +1 -0
- package/lib/documents/self-save-registry.d.ts +55 -0
- package/lib/documents/self-save-registry.d.ts.map +1 -0
- package/lib/documents/self-save-registry.js +68 -0
- package/lib/documents/self-save-registry.js.map +1 -0
- package/lib/index.d.ts +38 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +39 -0
- package/lib/index.js.map +1 -0
- package/lib/langium/ast-extension/ast-extension-contribution.d.ts +33 -0
- package/lib/langium/ast-extension/ast-extension-contribution.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-extension-contribution.js +10 -0
- package/lib/langium/ast-extension/ast-extension-contribution.js.map +1 -0
- package/lib/langium/ast-extension/ast-extension-service.d.ts +212 -0
- package/lib/langium/ast-extension/ast-extension-service.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-extension-service.js +181 -0
- package/lib/langium/ast-extension/ast-extension-service.js.map +1 -0
- package/lib/langium/ast-extension/ast-node-builder.d.ts +90 -0
- package/lib/langium/ast-extension/ast-node-builder.d.ts.map +1 -0
- package/lib/langium/ast-extension/ast-node-builder.js +61 -0
- package/lib/langium/ast-extension/ast-node-builder.js.map +1 -0
- package/lib/langium/ast-extension/index.d.ts +12 -0
- package/lib/langium/ast-extension/index.d.ts.map +1 -0
- package/lib/langium/ast-extension/index.js +12 -0
- package/lib/langium/ast-extension/index.js.map +1 -0
- package/lib/langium/bootstrap.d.ts +224 -0
- package/lib/langium/bootstrap.d.ts.map +1 -0
- package/lib/langium/bootstrap.js +512 -0
- package/lib/langium/bootstrap.js.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts +77 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.js +102 -0
- package/lib/langium/build-phase-pass/build-phase-pass-service.js.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts +106 -0
- package/lib/langium/build-phase-pass/build-phase-pass.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/build-phase-pass.js +43 -0
- package/lib/langium/build-phase-pass/build-phase-pass.js.map +1 -0
- package/lib/langium/build-phase-pass/index.d.ts +11 -0
- package/lib/langium/build-phase-pass/index.d.ts.map +1 -0
- package/lib/langium/build-phase-pass/index.js +11 -0
- package/lib/langium/build-phase-pass/index.js.map +1 -0
- package/lib/langium/config/index.d.ts +10 -0
- package/lib/langium/config/index.d.ts.map +1 -0
- package/lib/langium/config/index.js +10 -0
- package/lib/langium/config/index.js.map +1 -0
- package/lib/langium/config/settings.d.ts +173 -0
- package/lib/langium/config/settings.d.ts.map +1 -0
- package/lib/langium/config/settings.js +196 -0
- package/lib/langium/config/settings.js.map +1 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts +109 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.d.ts.map +1 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.js +153 -0
- package/lib/langium/diagnostics/hydranium-langium-profiler.js.map +1 -0
- package/lib/langium/diagnostics/index.d.ts +14 -0
- package/lib/langium/diagnostics/index.d.ts.map +1 -0
- package/lib/langium/diagnostics/index.js +19 -0
- package/lib/langium/diagnostics/index.js.map +1 -0
- package/lib/langium/diagnostics/log-file-token.d.ts +16 -0
- package/lib/langium/diagnostics/log-file-token.d.ts.map +1 -0
- package/lib/langium/diagnostics/log-file-token.js +25 -0
- package/lib/langium/diagnostics/log-file-token.js.map +1 -0
- package/lib/langium/diagnostics/log-preamble.d.ts +42 -0
- package/lib/langium/diagnostics/log-preamble.d.ts.map +1 -0
- package/lib/langium/diagnostics/log-preamble.js +57 -0
- package/lib/langium/diagnostics/log-preamble.js.map +1 -0
- package/lib/langium/diagnostics/logger.d.ts +104 -0
- package/lib/langium/diagnostics/logger.d.ts.map +1 -0
- package/lib/langium/diagnostics/logger.js +178 -0
- package/lib/langium/diagnostics/logger.js.map +1 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts +76 -0
- package/lib/langium/diagnostics/lsp-logger.d.ts.map +1 -0
- package/lib/langium/diagnostics/lsp-logger.js +223 -0
- package/lib/langium/diagnostics/lsp-logger.js.map +1 -0
- package/lib/langium/diagnostics/server-tracer.d.ts +27 -0
- package/lib/langium/diagnostics/server-tracer.d.ts.map +1 -0
- package/lib/langium/diagnostics/server-tracer.js +66 -0
- package/lib/langium/diagnostics/server-tracer.js.map +1 -0
- package/lib/langium/document-builder/build-pipeline-integration.d.ts +88 -0
- package/lib/langium/document-builder/build-pipeline-integration.d.ts.map +1 -0
- package/lib/langium/document-builder/build-pipeline-integration.js +151 -0
- package/lib/langium/document-builder/build-pipeline-integration.js.map +1 -0
- package/lib/langium/document-builder/document-builder.d.ts +405 -0
- package/lib/langium/document-builder/document-builder.d.ts.map +1 -0
- package/lib/langium/document-builder/document-builder.js +729 -0
- package/lib/langium/document-builder/document-builder.js.map +1 -0
- package/lib/langium/document-builder/index.d.ts +12 -0
- package/lib/langium/document-builder/index.d.ts.map +1 -0
- package/lib/langium/document-builder/index.js +12 -0
- package/lib/langium/document-builder/index.js.map +1 -0
- package/lib/langium/document-builder/labeled-phase-listener.d.ts +21 -0
- package/lib/langium/document-builder/labeled-phase-listener.d.ts.map +1 -0
- package/lib/langium/document-builder/labeled-phase-listener.js +15 -0
- package/lib/langium/document-builder/labeled-phase-listener.js.map +1 -0
- package/lib/langium/documentation/comment-provider.d.ts +31 -0
- package/lib/langium/documentation/comment-provider.d.ts.map +1 -0
- package/lib/langium/documentation/comment-provider.js +36 -0
- package/lib/langium/documentation/comment-provider.js.map +1 -0
- package/lib/langium/documentation/index.d.ts +10 -0
- package/lib/langium/documentation/index.d.ts.map +1 -0
- package/lib/langium/documentation/index.js +10 -0
- package/lib/langium/documentation/index.js.map +1 -0
- package/lib/langium/integration-services.d.ts +200 -0
- package/lib/langium/integration-services.d.ts.map +1 -0
- package/lib/langium/integration-services.js +65 -0
- package/lib/langium/integration-services.js.map +1 -0
- package/lib/langium/integrity/index.d.ts +12 -0
- package/lib/langium/integrity/index.d.ts.map +1 -0
- package/lib/langium/integrity/index.js +12 -0
- package/lib/langium/integrity/index.js.map +1 -0
- package/lib/langium/integrity/integrity-contribution.d.ts +42 -0
- package/lib/langium/integrity/integrity-contribution.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-contribution.js +10 -0
- package/lib/langium/integrity/integrity-contribution.js.map +1 -0
- package/lib/langium/integrity/integrity-rule.d.ts +82 -0
- package/lib/langium/integrity/integrity-rule.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-rule.js +52 -0
- package/lib/langium/integrity/integrity-rule.js.map +1 -0
- package/lib/langium/integrity/integrity-service.d.ts +221 -0
- package/lib/langium/integrity/integrity-service.d.ts.map +1 -0
- package/lib/langium/integrity/integrity-service.js +328 -0
- package/lib/langium/integrity/integrity-service.js.map +1 -0
- package/lib/langium/keys/default-element-key-provider.d.ts +19 -0
- package/lib/langium/keys/default-element-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/default-element-key-provider.js +18 -0
- package/lib/langium/keys/default-element-key-provider.js.map +1 -0
- package/lib/langium/keys/element-key-provider.d.ts +106 -0
- package/lib/langium/keys/element-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/element-key-provider.js +25 -0
- package/lib/langium/keys/element-key-provider.js.map +1 -0
- package/lib/langium/keys/index.d.ts +13 -0
- package/lib/langium/keys/index.d.ts.map +1 -0
- package/lib/langium/keys/index.js +13 -0
- package/lib/langium/keys/index.js.map +1 -0
- package/lib/langium/keys/name-based-key-provider.d.ts +99 -0
- package/lib/langium/keys/name-based-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/name-based-key-provider.js +134 -0
- package/lib/langium/keys/name-based-key-provider.js.map +1 -0
- package/lib/langium/keys/positional-key-provider.d.ts +41 -0
- package/lib/langium/keys/positional-key-provider.d.ts.map +1 -0
- package/lib/langium/keys/positional-key-provider.js +48 -0
- package/lib/langium/keys/positional-key-provider.js.map +1 -0
- package/lib/langium/labeling/index.d.ts +10 -0
- package/lib/langium/labeling/index.d.ts.map +1 -0
- package/lib/langium/labeling/index.js +10 -0
- package/lib/langium/labeling/index.js.map +1 -0
- package/lib/langium/labeling/label-provider.d.ts +79 -0
- package/lib/langium/labeling/label-provider.d.ts.map +1 -0
- package/lib/langium/labeling/label-provider.js +44 -0
- package/lib/langium/labeling/label-provider.js.map +1 -0
- package/lib/langium/language-module.d.ts +281 -0
- package/lib/langium/language-module.d.ts.map +1 -0
- package/lib/langium/language-module.js +103 -0
- package/lib/langium/language-module.js.map +1 -0
- package/lib/langium/language-types.d.ts +85 -0
- package/lib/langium/language-types.d.ts.map +1 -0
- package/lib/langium/language-types.js +173 -0
- package/lib/langium/language-types.js.map +1 -0
- package/lib/langium/model-service/index.d.ts +10 -0
- package/lib/langium/model-service/index.d.ts.map +1 -0
- package/lib/langium/model-service/index.js +10 -0
- package/lib/langium/model-service/index.js.map +1 -0
- package/lib/langium/model-service/model-service.d.ts +598 -0
- package/lib/langium/model-service/model-service.d.ts.map +1 -0
- package/lib/langium/model-service/model-service.js +889 -0
- package/lib/langium/model-service/model-service.js.map +1 -0
- package/lib/langium/module.d.ts +308 -0
- package/lib/langium/module.d.ts.map +1 -0
- package/lib/langium/module.js +165 -0
- package/lib/langium/module.js.map +1 -0
- package/lib/langium/naming/index.d.ts +11 -0
- package/lib/langium/naming/index.d.ts.map +1 -0
- package/lib/langium/naming/index.js +11 -0
- package/lib/langium/naming/index.js.map +1 -0
- package/lib/langium/naming/name-provider.d.ts +360 -0
- package/lib/langium/naming/name-provider.d.ts.map +1 -0
- package/lib/langium/naming/name-provider.js +240 -0
- package/lib/langium/naming/name-provider.js.map +1 -0
- package/lib/langium/naming/name-separator-validation.d.ts +47 -0
- package/lib/langium/naming/name-separator-validation.d.ts.map +1 -0
- package/lib/langium/naming/name-separator-validation.js +61 -0
- package/lib/langium/naming/name-separator-validation.js.map +1 -0
- package/lib/langium/project/abstract-project-manager.d.ts +242 -0
- package/lib/langium/project/abstract-project-manager.d.ts.map +1 -0
- package/lib/langium/project/abstract-project-manager.js +545 -0
- package/lib/langium/project/abstract-project-manager.js.map +1 -0
- package/lib/langium/project/index.d.ts +13 -0
- package/lib/langium/project/index.d.ts.map +1 -0
- package/lib/langium/project/index.js +13 -0
- package/lib/langium/project/index.js.map +1 -0
- package/lib/langium/project/project-change-event.d.ts +64 -0
- package/lib/langium/project/project-change-event.d.ts.map +1 -0
- package/lib/langium/project/project-change-event.js +10 -0
- package/lib/langium/project/project-change-event.js.map +1 -0
- package/lib/langium/project/project-manager.d.ts +196 -0
- package/lib/langium/project/project-manager.d.ts.map +1 -0
- package/lib/langium/project/project-manager.js +10 -0
- package/lib/langium/project/project-manager.js.map +1 -0
- package/lib/langium/project/single-project-manager.d.ts +69 -0
- package/lib/langium/project/single-project-manager.d.ts.map +1 -0
- package/lib/langium/project/single-project-manager.js +104 -0
- package/lib/langium/project/single-project-manager.js.map +1 -0
- package/lib/langium/residency/cst-residency-service.d.ts +214 -0
- package/lib/langium/residency/cst-residency-service.d.ts.map +1 -0
- package/lib/langium/residency/cst-residency-service.js +349 -0
- package/lib/langium/residency/cst-residency-service.js.map +1 -0
- package/lib/langium/residency/index.d.ts +10 -0
- package/lib/langium/residency/index.d.ts.map +1 -0
- package/lib/langium/residency/index.js +10 -0
- package/lib/langium/residency/index.js.map +1 -0
- package/lib/langium/scope/ast-node-description-provider.d.ts +122 -0
- package/lib/langium/scope/ast-node-description-provider.d.ts.map +1 -0
- package/lib/langium/scope/ast-node-description-provider.js +115 -0
- package/lib/langium/scope/ast-node-description-provider.js.map +1 -0
- package/lib/langium/scope/hydranium-scope-computation.d.ts +163 -0
- package/lib/langium/scope/hydranium-scope-computation.d.ts.map +1 -0
- package/lib/langium/scope/hydranium-scope-computation.js +220 -0
- package/lib/langium/scope/hydranium-scope-computation.js.map +1 -0
- package/lib/langium/scope/hydranium-scope-provider.d.ts +411 -0
- package/lib/langium/scope/hydranium-scope-provider.d.ts.map +1 -0
- package/lib/langium/scope/hydranium-scope-provider.js +543 -0
- package/lib/langium/scope/hydranium-scope-provider.js.map +1 -0
- package/lib/langium/scope/index.d.ts +18 -0
- package/lib/langium/scope/index.d.ts.map +1 -0
- package/lib/langium/scope/index.js +18 -0
- package/lib/langium/scope/index.js.map +1 -0
- package/lib/langium/scope/reference-builder.d.ts +125 -0
- package/lib/langium/scope/reference-builder.d.ts.map +1 -0
- package/lib/langium/scope/reference-builder.js +115 -0
- package/lib/langium/scope/reference-builder.js.map +1 -0
- package/lib/langium/scope/reference-candidate-provider.d.ts +228 -0
- package/lib/langium/scope/reference-candidate-provider.d.ts.map +1 -0
- package/lib/langium/scope/reference-candidate-provider.js +185 -0
- package/lib/langium/scope/reference-candidate-provider.js.map +1 -0
- package/lib/langium/scope/scope-extension-contribution.d.ts +32 -0
- package/lib/langium/scope/scope-extension-contribution.d.ts.map +1 -0
- package/lib/langium/scope/scope-extension-contribution.js +10 -0
- package/lib/langium/scope/scope-extension-contribution.js.map +1 -0
- package/lib/langium/scope/scope-extension-service.d.ts +149 -0
- package/lib/langium/scope/scope-extension-service.d.ts.map +1 -0
- package/lib/langium/scope/scope-extension-service.js +94 -0
- package/lib/langium/scope/scope-extension-service.js.map +1 -0
- package/lib/langium/scope/scoped-ast-node-description.d.ts +160 -0
- package/lib/langium/scope/scoped-ast-node-description.d.ts.map +1 -0
- package/lib/langium/scope/scoped-ast-node-description.js +98 -0
- package/lib/langium/scope/scoped-ast-node-description.js.map +1 -0
- package/lib/langium/scope/tier-specificity.d.ts +47 -0
- package/lib/langium/scope/tier-specificity.d.ts.map +1 -0
- package/lib/langium/scope/tier-specificity.js +83 -0
- package/lib/langium/scope/tier-specificity.js.map +1 -0
- package/lib/langium/serialization/abstract-serializer.d.ts +316 -0
- package/lib/langium/serialization/abstract-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/abstract-serializer.js +351 -0
- package/lib/langium/serialization/abstract-serializer.js.map +1 -0
- package/lib/langium/serialization/index.d.ts +14 -0
- package/lib/langium/serialization/index.d.ts.map +1 -0
- package/lib/langium/serialization/index.js +14 -0
- package/lib/langium/serialization/index.js.map +1 -0
- package/lib/langium/serialization/json-serializer.d.ts +106 -0
- package/lib/langium/serialization/json-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/json-serializer.js +198 -0
- package/lib/langium/serialization/json-serializer.js.map +1 -0
- package/lib/langium/serialization/serialization-util.d.ts +29 -0
- package/lib/langium/serialization/serialization-util.d.ts.map +1 -0
- package/lib/langium/serialization/serialization-util.js +37 -0
- package/lib/langium/serialization/serialization-util.js.map +1 -0
- package/lib/langium/serialization/serializer.d.ts +66 -0
- package/lib/langium/serialization/serializer.d.ts.map +1 -0
- package/lib/langium/serialization/serializer.js +10 -0
- package/lib/langium/serialization/serializer.js.map +1 -0
- package/lib/langium/serialization/yaml-serializer.d.ts +166 -0
- package/lib/langium/serialization/yaml-serializer.d.ts.map +1 -0
- package/lib/langium/serialization/yaml-serializer.js +228 -0
- package/lib/langium/serialization/yaml-serializer.js.map +1 -0
- package/lib/langium/service-registry.d.ts +220 -0
- package/lib/langium/service-registry.d.ts.map +1 -0
- package/lib/langium/service-registry.js +258 -0
- package/lib/langium/service-registry.js.map +1 -0
- package/lib/langium/shared-services.d.ts +98 -0
- package/lib/langium/shared-services.d.ts.map +1 -0
- package/lib/langium/shared-services.js +30 -0
- package/lib/langium/shared-services.js.map +1 -0
- package/lib/langium/transfer/index.d.ts +10 -0
- package/lib/langium/transfer/index.d.ts.map +1 -0
- package/lib/langium/transfer/index.js +10 -0
- package/lib/langium/transfer/index.js.map +1 -0
- package/lib/langium/transfer/transfer-encoder.d.ts +294 -0
- package/lib/langium/transfer/transfer-encoder.d.ts.map +1 -0
- package/lib/langium/transfer/transfer-encoder.js +328 -0
- package/lib/langium/transfer/transfer-encoder.js.map +1 -0
- package/lib/langium/update-rewrite/index.d.ts +14 -0
- package/lib/langium/update-rewrite/index.d.ts.map +1 -0
- package/lib/langium/update-rewrite/index.js +14 -0
- package/lib/langium/update-rewrite/index.js.map +1 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.d.ts +52 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.d.ts.map +1 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.js +83 -0
- package/lib/langium/update-rewrite/normalize-empty-strings.js.map +1 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts +37 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.d.ts.map +1 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.js +51 -0
- package/lib/langium/update-rewrite/semantic-root-rewrite.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts +42 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.js +10 -0
- package/lib/langium/update-rewrite/update-rewrite-contribution.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-service.d.ts +89 -0
- package/lib/langium/update-rewrite/update-rewrite-service.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite-service.js +75 -0
- package/lib/langium/update-rewrite/update-rewrite-service.js.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite.d.ts +59 -0
- package/lib/langium/update-rewrite/update-rewrite.d.ts.map +1 -0
- package/lib/langium/update-rewrite/update-rewrite.js +10 -0
- package/lib/langium/update-rewrite/update-rewrite.js.map +1 -0
- package/lib/langium/validation/document-validator.d.ts +106 -0
- package/lib/langium/validation/document-validator.d.ts.map +1 -0
- package/lib/langium/validation/document-validator.js +118 -0
- package/lib/langium/validation/document-validator.js.map +1 -0
- package/lib/langium/validation/index.d.ts +12 -0
- package/lib/langium/validation/index.d.ts.map +1 -0
- package/lib/langium/validation/index.js +12 -0
- package/lib/langium/validation/index.js.map +1 -0
- package/lib/langium/validation/validation-contribution-collector.d.ts +34 -0
- package/lib/langium/validation/validation-contribution-collector.d.ts.map +1 -0
- package/lib/langium/validation/validation-contribution-collector.js +51 -0
- package/lib/langium/validation/validation-contribution-collector.js.map +1 -0
- package/lib/langium/validation/validation-contribution.d.ts +36 -0
- package/lib/langium/validation/validation-contribution.d.ts.map +1 -0
- package/lib/langium/validation/validation-contribution.js +10 -0
- package/lib/langium/validation/validation-contribution.js.map +1 -0
- package/lib/langium/workspace/additional-document-contribution.d.ts +68 -0
- package/lib/langium/workspace/additional-document-contribution.d.ts.map +1 -0
- package/lib/langium/workspace/additional-document-contribution.js +23 -0
- package/lib/langium/workspace/additional-document-contribution.js.map +1 -0
- package/lib/langium/workspace/document-uri-policy.d.ts +151 -0
- package/lib/langium/workspace/document-uri-policy.d.ts.map +1 -0
- package/lib/langium/workspace/document-uri-policy.js +121 -0
- package/lib/langium/workspace/document-uri-policy.js.map +1 -0
- package/lib/langium/workspace/file-system-provider.d.ts +30 -0
- package/lib/langium/workspace/file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/file-system-provider.js +41 -0
- package/lib/langium/workspace/file-system-provider.js.map +1 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts +45 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.js +64 -0
- package/lib/langium/workspace/hydranium-langium-document-factory.js.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-lock.d.ts +31 -0
- package/lib/langium/workspace/hydranium-workspace-lock.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-lock.js +33 -0
- package/lib/langium/workspace/hydranium-workspace-lock.js.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts +232 -0
- package/lib/langium/workspace/hydranium-workspace-manager.d.ts.map +1 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js +368 -0
- package/lib/langium/workspace/hydranium-workspace-manager.js.map +1 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts +127 -0
- package/lib/langium/workspace/in-memory-file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/in-memory-file-system-provider.js +195 -0
- package/lib/langium/workspace/in-memory-file-system-provider.js.map +1 -0
- package/lib/langium/workspace/index-manager.d.ts +142 -0
- package/lib/langium/workspace/index-manager.d.ts.map +1 -0
- package/lib/langium/workspace/index-manager.js +245 -0
- package/lib/langium/workspace/index-manager.js.map +1 -0
- package/lib/langium/workspace/index.d.ts +23 -0
- package/lib/langium/workspace/index.d.ts.map +1 -0
- package/lib/langium/workspace/index.js +23 -0
- package/lib/langium/workspace/index.js.map +1 -0
- package/lib/langium/workspace/initialize-workspace.d.ts +63 -0
- package/lib/langium/workspace/initialize-workspace.d.ts.map +1 -0
- package/lib/langium/workspace/initialize-workspace.js +88 -0
- package/lib/langium/workspace/initialize-workspace.js.map +1 -0
- package/lib/langium/workspace/langium-documents.d.ts +47 -0
- package/lib/langium/workspace/langium-documents.d.ts.map +1 -0
- package/lib/langium/workspace/langium-documents.js +85 -0
- package/lib/langium/workspace/langium-documents.js.map +1 -0
- package/lib/langium/workspace/persistent-file-system-provider.d.ts +207 -0
- package/lib/langium/workspace/persistent-file-system-provider.d.ts.map +1 -0
- package/lib/langium/workspace/persistent-file-system-provider.js +208 -0
- package/lib/langium/workspace/persistent-file-system-provider.js.map +1 -0
- package/lib/langium/workspace/synthetic.d.ts +38 -0
- package/lib/langium/workspace/synthetic.d.ts.map +1 -0
- package/lib/langium/workspace/synthetic.js +58 -0
- package/lib/langium/workspace/synthetic.js.map +1 -0
- package/lib/langium/workspace/virtual-document.d.ts +78 -0
- package/lib/langium/workspace/virtual-document.d.ts.map +1 -0
- package/lib/langium/workspace/virtual-document.js +89 -0
- package/lib/langium/workspace/virtual-document.js.map +1 -0
- package/lib/langium/workspace/write-lock-scope.d.ts +69 -0
- package/lib/langium/workspace/write-lock-scope.d.ts.map +1 -0
- package/lib/langium/workspace/write-lock-scope.js +54 -0
- package/lib/langium/workspace/write-lock-scope.js.map +1 -0
- package/lib/launcher/index.d.ts +10 -0
- package/lib/launcher/index.d.ts.map +1 -0
- package/lib/launcher/index.js +12 -0
- package/lib/launcher/index.js.map +1 -0
- package/lib/launcher/integrated-server.d.ts +28 -0
- package/lib/launcher/integrated-server.d.ts.map +1 -0
- package/lib/launcher/integrated-server.js +10 -0
- package/lib/launcher/integrated-server.js.map +1 -0
- package/lib/lsp/completion/hydranium-completion-provider.d.ts +89 -0
- package/lib/lsp/completion/hydranium-completion-provider.d.ts.map +1 -0
- package/lib/lsp/completion/hydranium-completion-provider.js +123 -0
- package/lib/lsp/completion/hydranium-completion-provider.js.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.d.ts +204 -0
- package/lib/lsp/hydranium-document-update-handler.d.ts.map +1 -0
- package/lib/lsp/hydranium-document-update-handler.js +288 -0
- package/lib/lsp/hydranium-document-update-handler.js.map +1 -0
- package/lib/lsp/index.d.ts +23 -0
- package/lib/lsp/index.d.ts.map +1 -0
- package/lib/lsp/index.js +23 -0
- package/lib/lsp/index.js.map +1 -0
- package/lib/lsp/instrument-connection.d.ts +36 -0
- package/lib/lsp/instrument-connection.d.ts.map +1 -0
- package/lib/lsp/instrument-connection.js +62 -0
- package/lib/lsp/instrument-connection.js.map +1 -0
- package/lib/lsp/language-module.d.ts +53 -0
- package/lib/lsp/language-module.d.ts.map +1 -0
- package/lib/lsp/language-module.js +28 -0
- package/lib/lsp/language-module.js.map +1 -0
- package/lib/lsp/semantic-token-provider.d.ts +131 -0
- package/lib/lsp/semantic-token-provider.d.ts.map +1 -0
- package/lib/lsp/semantic-token-provider.js +148 -0
- package/lib/lsp/semantic-token-provider.js.map +1 -0
- package/lib/lsp/shared-module.d.ts +76 -0
- package/lib/lsp/shared-module.d.ts.map +1 -0
- package/lib/lsp/shared-module.js +33 -0
- package/lib/lsp/shared-module.js.map +1 -0
- package/lib/lsp/start-language-server.d.ts +43 -0
- package/lib/lsp/start-language-server.d.ts.map +1 -0
- package/lib/lsp/start-language-server.js +60 -0
- package/lib/lsp/start-language-server.js.map +1 -0
- package/lib/node/ast-ground-truth.d.ts +57 -0
- package/lib/node/ast-ground-truth.d.ts.map +1 -0
- package/lib/node/ast-ground-truth.js +46 -0
- package/lib/node/ast-ground-truth.js.map +1 -0
- package/lib/node/event-loop-monitor.d.ts +40 -0
- package/lib/node/event-loop-monitor.d.ts.map +1 -0
- package/lib/node/event-loop-monitor.js +62 -0
- package/lib/node/event-loop-monitor.js.map +1 -0
- package/lib/node/index.d.ts +29 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +50 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/latency-from-env.d.ts +32 -0
- package/lib/node/latency-from-env.d.ts.map +1 -0
- package/lib/node/latency-from-env.js +36 -0
- package/lib/node/latency-from-env.js.map +1 -0
- package/lib/node/lint-grammar.d.ts +87 -0
- package/lib/node/lint-grammar.d.ts.map +1 -0
- package/lib/node/lint-grammar.js +124 -0
- package/lib/node/lint-grammar.js.map +1 -0
- package/lib/node/log-file-sink.d.ts +22 -0
- package/lib/node/log-file-sink.d.ts.map +1 -0
- package/lib/node/log-file-sink.js +43 -0
- package/lib/node/log-file-sink.js.map +1 -0
- package/lib/node/log-preamble-node.d.ts +28 -0
- package/lib/node/log-preamble-node.d.ts.map +1 -0
- package/lib/node/log-preamble-node.js +55 -0
- package/lib/node/log-preamble-node.js.map +1 -0
- package/lib/node/measure-memory.d.ts +86 -0
- package/lib/node/measure-memory.d.ts.map +1 -0
- package/lib/node/measure-memory.js +128 -0
- package/lib/node/measure-memory.js.map +1 -0
- package/lib/node/memory-monitor.d.ts +42 -0
- package/lib/node/memory-monitor.d.ts.map +1 -0
- package/lib/node/memory-monitor.js +83 -0
- package/lib/node/memory-monitor.js.map +1 -0
- package/lib/node/node-file-system-provider.d.ts +112 -0
- package/lib/node/node-file-system-provider.d.ts.map +1 -0
- package/lib/node/node-file-system-provider.js +230 -0
- package/lib/node/node-file-system-provider.js.map +1 -0
- package/lib/node/process-memory.d.ts +66 -0
- package/lib/node/process-memory.d.ts.map +1 -0
- package/lib/node/process-memory.js +252 -0
- package/lib/node/process-memory.js.map +1 -0
- package/lib/node/profile-capture.d.ts +118 -0
- package/lib/node/profile-capture.d.ts.map +1 -0
- package/lib/node/profile-capture.js +315 -0
- package/lib/node/profile-capture.js.map +1 -0
- package/lib/node/profile-digest.d.ts +49 -0
- package/lib/node/profile-digest.d.ts.map +1 -0
- package/lib/node/profile-digest.js +74 -0
- package/lib/node/profile-digest.js.map +1 -0
- package/lib/node/profiling-run.d.ts +80 -0
- package/lib/node/profiling-run.d.ts.map +1 -0
- package/lib/node/profiling-run.js +183 -0
- package/lib/node/profiling-run.js.map +1 -0
- package/lib/node/reflect-grammar.d.ts +109 -0
- package/lib/node/reflect-grammar.d.ts.map +1 -0
- package/lib/node/reflect-grammar.js +96 -0
- package/lib/node/reflect-grammar.js.map +1 -0
- package/lib/node/server-diagnostics.d.ts +43 -0
- package/lib/node/server-diagnostics.d.ts.map +1 -0
- package/lib/node/server-diagnostics.js +46 -0
- package/lib/node/server-diagnostics.js.map +1 -0
- package/lib/node/server-state-snapshot.d.ts +48 -0
- package/lib/node/server-state-snapshot.d.ts.map +1 -0
- package/lib/node/server-state-snapshot.js +139 -0
- package/lib/node/server-state-snapshot.js.map +1 -0
- package/lib/node/socket-launcher.d.ts +106 -0
- package/lib/node/socket-launcher.d.ts.map +1 -0
- package/lib/node/socket-launcher.js +138 -0
- package/lib/node/socket-launcher.js.map +1 -0
- package/lib/node/stdio-launcher.d.ts +88 -0
- package/lib/node/stdio-launcher.d.ts.map +1 -0
- package/lib/node/stdio-launcher.js +83 -0
- package/lib/node/stdio-launcher.js.map +1 -0
- package/lib/node/validate-workspace.d.ts +80 -0
- package/lib/node/validate-workspace.d.ts.map +1 -0
- package/lib/node/validate-workspace.js +72 -0
- package/lib/node/validate-workspace.js.map +1 -0
- package/lib/node/write-lock-scope-node.d.ts +27 -0
- package/lib/node/write-lock-scope-node.d.ts.map +1 -0
- package/lib/node/write-lock-scope-node.js +38 -0
- package/lib/node/write-lock-scope-node.js.map +1 -0
- package/lib/testing/ast-snapshot.d.ts +38 -0
- package/lib/testing/ast-snapshot.d.ts.map +1 -0
- package/lib/testing/ast-snapshot.js +78 -0
- package/lib/testing/ast-snapshot.js.map +1 -0
- package/lib/testing/document-uri-policy-conformance.d.ts +65 -0
- package/lib/testing/document-uri-policy-conformance.d.ts.map +1 -0
- package/lib/testing/document-uri-policy-conformance.js +69 -0
- package/lib/testing/document-uri-policy-conformance.js.map +1 -0
- package/lib/testing/fake-description.d.ts +35 -0
- package/lib/testing/fake-description.d.ts.map +1 -0
- package/lib/testing/fake-description.js +38 -0
- package/lib/testing/fake-description.js.map +1 -0
- package/lib/testing/fake-document.d.ts +71 -0
- package/lib/testing/fake-document.d.ts.map +1 -0
- package/lib/testing/fake-document.js +85 -0
- package/lib/testing/fake-document.js.map +1 -0
- package/lib/testing/fake-reflection.d.ts +29 -0
- package/lib/testing/fake-reflection.d.ts.map +1 -0
- package/lib/testing/fake-reflection.js +30 -0
- package/lib/testing/fake-reflection.js.map +1 -0
- package/lib/testing/index.d.ts +44 -0
- package/lib/testing/index.d.ts.map +1 -0
- package/lib/testing/index.js +44 -0
- package/lib/testing/index.js.map +1 -0
- package/lib/testing/langium-test-helpers.d.ts +26 -0
- package/lib/testing/langium-test-helpers.d.ts.map +1 -0
- package/lib/testing/langium-test-helpers.js +26 -0
- package/lib/testing/langium-test-helpers.js.map +1 -0
- package/lib/testing/make-noop-language-services.d.ts +39 -0
- package/lib/testing/make-noop-language-services.d.ts.map +1 -0
- package/lib/testing/make-noop-language-services.js +30 -0
- package/lib/testing/make-noop-language-services.js.map +1 -0
- package/lib/testing/make-noop-shared-services.d.ts +61 -0
- package/lib/testing/make-noop-shared-services.d.ts.map +1 -0
- package/lib/testing/make-noop-shared-services.js +49 -0
- package/lib/testing/make-noop-shared-services.js.map +1 -0
- package/lib/testing/make-test-services.d.ts +217 -0
- package/lib/testing/make-test-services.d.ts.map +1 -0
- package/lib/testing/make-test-services.js +128 -0
- package/lib/testing/make-test-services.js.map +1 -0
- package/lib/testing/make-test-tracer.d.ts +67 -0
- package/lib/testing/make-test-tracer.d.ts.map +1 -0
- package/lib/testing/make-test-tracer.js +68 -0
- package/lib/testing/make-test-tracer.js.map +1 -0
- package/lib/testing/node/generated-workspace.d.ts +95 -0
- package/lib/testing/node/generated-workspace.d.ts.map +1 -0
- package/lib/testing/node/generated-workspace.js +134 -0
- package/lib/testing/node/generated-workspace.js.map +1 -0
- package/lib/testing/node/golden-corpus.d.ts +50 -0
- package/lib/testing/node/golden-corpus.d.ts.map +1 -0
- package/lib/testing/node/golden-corpus.js +80 -0
- package/lib/testing/node/golden-corpus.js.map +1 -0
- package/lib/testing/node/index.d.ts +28 -0
- package/lib/testing/node/index.d.ts.map +1 -0
- package/lib/testing/node/index.js +28 -0
- package/lib/testing/node/index.js.map +1 -0
- package/lib/testing/node/lsp-harness.d.ts +139 -0
- package/lib/testing/node/lsp-harness.d.ts.map +1 -0
- package/lib/testing/node/lsp-harness.js +119 -0
- package/lib/testing/node/lsp-harness.js.map +1 -0
- package/lib/testing/node/lsp-server-connection.d.ts +232 -0
- package/lib/testing/node/lsp-server-connection.d.ts.map +1 -0
- package/lib/testing/node/lsp-server-connection.js +304 -0
- package/lib/testing/node/lsp-server-connection.js.map +1 -0
- package/lib/testing/node/scratch-workspace.d.ts +60 -0
- package/lib/testing/node/scratch-workspace.d.ts.map +1 -0
- package/lib/testing/node/scratch-workspace.js +87 -0
- package/lib/testing/node/scratch-workspace.js.map +1 -0
- package/lib/testing/node/spawned-server.d.ts +170 -0
- package/lib/testing/node/spawned-server.d.ts.map +1 -0
- package/lib/testing/node/spawned-server.js +265 -0
- package/lib/testing/node/spawned-server.js.map +1 -0
- package/lib/testing/parse-semantic-root.d.ts +83 -0
- package/lib/testing/parse-semantic-root.d.ts.map +1 -0
- package/lib/testing/parse-semantic-root.js +119 -0
- package/lib/testing/parse-semantic-root.js.map +1 -0
- package/lib/testing/playwright/browser-capture-bridge.d.ts +80 -0
- package/lib/testing/playwright/browser-capture-bridge.d.ts.map +1 -0
- package/lib/testing/playwright/browser-capture-bridge.js +161 -0
- package/lib/testing/playwright/browser-capture-bridge.js.map +1 -0
- package/lib/testing/playwright/e2e-profiling.d.ts +132 -0
- package/lib/testing/playwright/e2e-profiling.d.ts.map +1 -0
- package/lib/testing/playwright/e2e-profiling.js +270 -0
- package/lib/testing/playwright/e2e-profiling.js.map +1 -0
- package/lib/testing/playwright/index.d.ts +13 -0
- package/lib/testing/playwright/index.d.ts.map +1 -0
- package/lib/testing/playwright/index.js +16 -0
- package/lib/testing/playwright/index.js.map +1 -0
- package/lib/testing/playwright/server-log-capture.d.ts +230 -0
- package/lib/testing/playwright/server-log-capture.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-capture.js +336 -0
- package/lib/testing/playwright/server-log-capture.js.map +1 -0
- package/lib/testing/playwright/server-log-fixture.d.ts +36 -0
- package/lib/testing/playwright/server-log-fixture.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-fixture.js +38 -0
- package/lib/testing/playwright/server-log-fixture.js.map +1 -0
- package/lib/testing/playwright/server-log-rename-reporter.d.ts +22 -0
- package/lib/testing/playwright/server-log-rename-reporter.d.ts.map +1 -0
- package/lib/testing/playwright/server-log-rename-reporter.js +26 -0
- package/lib/testing/playwright/server-log-rename-reporter.js.map +1 -0
- package/lib/testing/run-update-pipeline.d.ts +99 -0
- package/lib/testing/run-update-pipeline.d.ts.map +1 -0
- package/lib/testing/run-update-pipeline.js +24 -0
- package/lib/testing/run-update-pipeline.js.map +1 -0
- package/lib/testing/stub-ast-document-manager.d.ts +82 -0
- package/lib/testing/stub-ast-document-manager.d.ts.map +1 -0
- package/lib/testing/stub-ast-document-manager.js +125 -0
- package/lib/testing/stub-ast-document-manager.js.map +1 -0
- package/lib/testing/stub-document-builder.d.ts +99 -0
- package/lib/testing/stub-document-builder.d.ts.map +1 -0
- package/lib/testing/stub-document-builder.js +142 -0
- package/lib/testing/stub-document-builder.js.map +1 -0
- package/lib/testing/stub-hydranium-text-documents.d.ts +125 -0
- package/lib/testing/stub-hydranium-text-documents.d.ts.map +1 -0
- package/lib/testing/stub-hydranium-text-documents.js +164 -0
- package/lib/testing/stub-hydranium-text-documents.js.map +1 -0
- package/lib/testing/stub-index-manager.d.ts +40 -0
- package/lib/testing/stub-index-manager.d.ts.map +1 -0
- package/lib/testing/stub-index-manager.js +38 -0
- package/lib/testing/stub-index-manager.js.map +1 -0
- package/lib/testing/stub-langium-documents.d.ts +53 -0
- package/lib/testing/stub-langium-documents.d.ts.map +1 -0
- package/lib/testing/stub-langium-documents.js +62 -0
- package/lib/testing/stub-langium-documents.js.map +1 -0
- package/lib/testing/stub-model-service.d.ts +31 -0
- package/lib/testing/stub-model-service.d.ts.map +1 -0
- package/lib/testing/stub-model-service.js +45 -0
- package/lib/testing/stub-model-service.js.map +1 -0
- package/lib/testing/stub-project-manager.d.ts +43 -0
- package/lib/testing/stub-project-manager.d.ts.map +1 -0
- package/lib/testing/stub-project-manager.js +125 -0
- package/lib/testing/stub-project-manager.js.map +1 -0
- package/lib/testing/stub-self-save-registry.d.ts +31 -0
- package/lib/testing/stub-self-save-registry.d.ts.map +1 -0
- package/lib/testing/stub-self-save-registry.js +23 -0
- package/lib/testing/stub-self-save-registry.js.map +1 -0
- package/lib/testing/stub-service-registry.d.ts +95 -0
- package/lib/testing/stub-service-registry.d.ts.map +1 -0
- package/lib/testing/stub-service-registry.js +108 -0
- package/lib/testing/stub-service-registry.js.map +1 -0
- package/lib/testing/stub-writable-file-system.d.ts +42 -0
- package/lib/testing/stub-writable-file-system.d.ts.map +1 -0
- package/lib/testing/stub-writable-file-system.js +26 -0
- package/lib/testing/stub-writable-file-system.js.map +1 -0
- package/lib/util/connection-liveness.d.ts +25 -0
- package/lib/util/connection-liveness.d.ts.map +1 -0
- package/lib/util/connection-liveness.js +46 -0
- package/lib/util/connection-liveness.js.map +1 -0
- package/lib/util/environment.d.ts +53 -0
- package/lib/util/environment.d.ts.map +1 -0
- package/lib/util/environment.js +78 -0
- package/lib/util/environment.js.map +1 -0
- package/lib/util/index.d.ts +13 -0
- package/lib/util/index.d.ts.map +1 -0
- package/lib/util/index.js +18 -0
- package/lib/util/index.js.map +1 -0
- package/lib/util/registry.d.ts +88 -0
- package/lib/util/registry.d.ts.map +1 -0
- package/lib/util/registry.js +105 -0
- package/lib/util/registry.js.map +1 -0
- package/package.json +134 -0
- package/src/documents/ast-document-manager.ts +455 -0
- package/src/documents/client-ids.ts +33 -0
- package/src/documents/hydranium-text-documents.ts +1142 -0
- package/src/documents/index.ts +14 -0
- package/src/documents/language-client-text-shadow.ts +175 -0
- package/src/documents/self-save-registry.ts +81 -0
- package/src/index.ts +39 -0
- package/src/langium/ast-extension/ast-extension-contribution.ts +35 -0
- package/src/langium/ast-extension/ast-extension-service.ts +311 -0
- package/src/langium/ast-extension/ast-node-builder.ts +125 -0
- package/src/langium/ast-extension/index.ts +12 -0
- package/src/langium/bootstrap.ts +600 -0
- package/src/langium/build-phase-pass/build-phase-pass-service.ts +141 -0
- package/src/langium/build-phase-pass/build-phase-pass.ts +123 -0
- package/src/langium/build-phase-pass/index.ts +11 -0
- package/src/langium/config/index.ts +10 -0
- package/src/langium/config/settings.ts +353 -0
- package/src/langium/diagnostics/hydranium-langium-profiler.ts +187 -0
- package/src/langium/diagnostics/index.ts +19 -0
- package/src/langium/diagnostics/log-file-token.ts +26 -0
- package/src/langium/diagnostics/log-preamble.ts +87 -0
- package/src/langium/diagnostics/logger.ts +246 -0
- package/src/langium/diagnostics/lsp-logger.ts +277 -0
- package/src/langium/diagnostics/server-tracer.ts +73 -0
- package/src/langium/document-builder/build-pipeline-integration.ts +193 -0
- package/src/langium/document-builder/document-builder.ts +839 -0
- package/src/langium/document-builder/index.ts +12 -0
- package/src/langium/document-builder/labeled-phase-listener.ts +26 -0
- package/src/langium/documentation/comment-provider.ts +37 -0
- package/src/langium/documentation/index.ts +10 -0
- package/src/langium/integration-services.ts +281 -0
- package/src/langium/integrity/index.ts +12 -0
- package/src/langium/integrity/integrity-contribution.ts +44 -0
- package/src/langium/integrity/integrity-rule.ts +100 -0
- package/src/langium/integrity/integrity-service.ts +423 -0
- package/src/langium/keys/default-element-key-provider.ts +20 -0
- package/src/langium/keys/element-key-provider.ts +114 -0
- package/src/langium/keys/index.ts +13 -0
- package/src/langium/keys/name-based-key-provider.ts +146 -0
- package/src/langium/keys/positional-key-provider.ts +57 -0
- package/src/langium/labeling/index.ts +10 -0
- package/src/langium/labeling/label-provider.ts +110 -0
- package/src/langium/language-module.ts +367 -0
- package/src/langium/language-types.ts +214 -0
- package/src/langium/model-service/index.ts +10 -0
- package/src/langium/model-service/model-service.ts +1051 -0
- package/src/langium/module.ts +446 -0
- package/src/langium/naming/index.ts +11 -0
- package/src/langium/naming/name-provider.ts +533 -0
- package/src/langium/naming/name-separator-validation.ts +73 -0
- package/src/langium/project/abstract-project-manager.ts +630 -0
- package/src/langium/project/index.ts +13 -0
- package/src/langium/project/project-change-event.ts +66 -0
- package/src/langium/project/project-manager.ts +221 -0
- package/src/langium/project/single-project-manager.ts +126 -0
- package/src/langium/residency/cst-residency-service.ts +412 -0
- package/src/langium/residency/index.ts +10 -0
- package/src/langium/scope/ast-node-description-provider.ts +141 -0
- package/src/langium/scope/hydranium-scope-computation.ts +246 -0
- package/src/langium/scope/hydranium-scope-provider.ts +659 -0
- package/src/langium/scope/index.ts +18 -0
- package/src/langium/scope/reference-builder.ts +194 -0
- package/src/langium/scope/reference-candidate-provider.ts +314 -0
- package/src/langium/scope/scope-extension-contribution.ts +34 -0
- package/src/langium/scope/scope-extension-service.ts +207 -0
- package/src/langium/scope/scoped-ast-node-description.ts +174 -0
- package/src/langium/scope/tier-specificity.ts +89 -0
- package/src/langium/serialization/abstract-serializer.ts +474 -0
- package/src/langium/serialization/index.ts +14 -0
- package/src/langium/serialization/json-serializer.ts +264 -0
- package/src/langium/serialization/serialization-util.ts +40 -0
- package/src/langium/serialization/serializer.ts +68 -0
- package/src/langium/serialization/yaml-serializer.ts +348 -0
- package/src/langium/service-registry.ts +323 -0
- package/src/langium/shared-services.ts +107 -0
- package/src/langium/transfer/index.ts +10 -0
- package/src/langium/transfer/transfer-encoder.ts +434 -0
- package/src/langium/update-rewrite/index.ts +14 -0
- package/src/langium/update-rewrite/normalize-empty-strings.ts +86 -0
- package/src/langium/update-rewrite/semantic-root-rewrite.ts +57 -0
- package/src/langium/update-rewrite/update-rewrite-contribution.ts +44 -0
- package/src/langium/update-rewrite/update-rewrite-service.ts +129 -0
- package/src/langium/update-rewrite/update-rewrite.ts +60 -0
- package/src/langium/validation/document-validator.ts +188 -0
- package/src/langium/validation/index.ts +12 -0
- package/src/langium/validation/validation-contribution-collector.ts +61 -0
- package/src/langium/validation/validation-contribution.ts +38 -0
- package/src/langium/workspace/additional-document-contribution.ts +80 -0
- package/src/langium/workspace/document-uri-policy.ts +187 -0
- package/src/langium/workspace/file-system-provider.ts +52 -0
- package/src/langium/workspace/hydranium-langium-document-factory.ts +78 -0
- package/src/langium/workspace/hydranium-workspace-lock.ts +35 -0
- package/src/langium/workspace/hydranium-workspace-manager.ts +412 -0
- package/src/langium/workspace/in-memory-file-system-provider.ts +241 -0
- package/src/langium/workspace/index-manager.ts +266 -0
- package/src/langium/workspace/index.ts +23 -0
- package/src/langium/workspace/initialize-workspace.ts +102 -0
- package/src/langium/workspace/langium-documents.ts +94 -0
- package/src/langium/workspace/persistent-file-system-provider.ts +287 -0
- package/src/langium/workspace/synthetic.ts +63 -0
- package/src/langium/workspace/virtual-document.ts +94 -0
- package/src/langium/workspace/write-lock-scope.ts +88 -0
- package/src/launcher/index.ts +12 -0
- package/src/launcher/integrated-server.ts +28 -0
- package/src/lsp/completion/hydranium-completion-provider.ts +132 -0
- package/src/lsp/hydranium-document-update-handler.ts +345 -0
- package/src/lsp/index.ts +24 -0
- package/src/lsp/instrument-connection.ts +66 -0
- package/src/lsp/language-module.ts +64 -0
- package/src/lsp/semantic-token-provider.ts +215 -0
- package/src/lsp/shared-module.ts +88 -0
- package/src/lsp/start-language-server.ts +68 -0
- package/src/node/ast-ground-truth.ts +76 -0
- package/src/node/event-loop-monitor.ts +89 -0
- package/src/node/index.ts +53 -0
- package/src/node/latency-from-env.ts +39 -0
- package/src/node/lint-grammar.ts +189 -0
- package/src/node/log-file-sink.ts +43 -0
- package/src/node/log-preamble-node.ts +63 -0
- package/src/node/measure-memory.ts +196 -0
- package/src/node/memory-monitor.ts +103 -0
- package/src/node/node-file-system-provider.ts +252 -0
- package/src/node/process-memory.ts +299 -0
- package/src/node/profile-capture.ts +377 -0
- package/src/node/profile-digest.ts +112 -0
- package/src/node/profiling-run.ts +236 -0
- package/src/node/reflect-grammar.ts +182 -0
- package/src/node/server-diagnostics.ts +63 -0
- package/src/node/server-state-snapshot.ts +192 -0
- package/src/node/socket-launcher.ts +210 -0
- package/src/node/stdio-launcher.ts +150 -0
- package/src/node/validate-workspace.ts +133 -0
- package/src/node/write-lock-scope-node.ts +41 -0
- package/src/testing/ast-snapshot.ts +88 -0
- package/src/testing/document-uri-policy-conformance.ts +104 -0
- package/src/testing/fake-description.ts +52 -0
- package/src/testing/fake-document.ts +120 -0
- package/src/testing/fake-reflection.ts +39 -0
- package/src/testing/index.ts +45 -0
- package/src/testing/langium-test-helpers.ts +26 -0
- package/src/testing/make-noop-language-services.ts +47 -0
- package/src/testing/make-noop-shared-services.ts +78 -0
- package/src/testing/make-test-services.ts +356 -0
- package/src/testing/make-test-tracer.ts +92 -0
- package/src/testing/node/generated-workspace.ts +222 -0
- package/src/testing/node/golden-corpus.ts +114 -0
- package/src/testing/node/index.ts +29 -0
- package/src/testing/node/lsp-harness.ts +230 -0
- package/src/testing/node/lsp-server-connection.ts +575 -0
- package/src/testing/node/scratch-workspace.ts +137 -0
- package/src/testing/node/spawned-server.ts +447 -0
- package/src/testing/parse-semantic-root.ts +150 -0
- package/src/testing/playwright/browser-capture-bridge.ts +258 -0
- package/src/testing/playwright/e2e-profiling.ts +362 -0
- package/src/testing/playwright/index.ts +16 -0
- package/src/testing/playwright/server-log-capture.ts +433 -0
- package/src/testing/playwright/server-log-fixture.ts +57 -0
- package/src/testing/playwright/server-log-rename-reporter.ts +29 -0
- package/src/testing/run-update-pipeline.ts +113 -0
- package/src/testing/stub-ast-document-manager.ts +224 -0
- package/src/testing/stub-document-builder.ts +242 -0
- package/src/testing/stub-hydranium-text-documents.ts +270 -0
- package/src/testing/stub-index-manager.ts +79 -0
- package/src/testing/stub-langium-documents.ts +104 -0
- package/src/testing/stub-model-service.ts +72 -0
- package/src/testing/stub-project-manager.ts +161 -0
- package/src/testing/stub-self-save-registry.ts +43 -0
- package/src/testing/stub-service-registry.ts +192 -0
- package/src/testing/stub-writable-file-system.ts +58 -0
- package/src/util/connection-liveness.ts +47 -0
- package/src/util/environment.ts +88 -0
- package/src/util/index.ts +18 -0
- package/src/util/registry.ts +129 -0
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
import { isPromiseLike, type MaybePromise, type TransferElement } from '@hydranium/protocol';
|
|
11
|
+
import { type AstNode, type GenericAstNode, isAstNode } from '@hydranium/langium';
|
|
12
|
+
import { type HydraniumLanguageServices } from '../language-module.js';
|
|
13
|
+
import { AbstractSerializer, type AbstractSerializerOptions } from './abstract-serializer.js';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Options for {@link YamlSerializer}. Extends the format-agnostic
|
|
17
|
+
* {@link AbstractSerializerOptions} with YAML-specific style settings.
|
|
18
|
+
*/
|
|
19
|
+
export interface YamlSerializerOptions extends AbstractSerializerOptions {
|
|
20
|
+
/**
|
|
21
|
+
* Property paths (`"<TypeName>.<propertyName>"`) whose values should be
|
|
22
|
+
* serialized without quotes. Required for grammar terminals that accept
|
|
23
|
+
* unquoted enum-like values (e.g. cardinality keywords, type literals).
|
|
24
|
+
* Defaults to an empty set — grammars without unquoted terminals omit this.
|
|
25
|
+
*/
|
|
26
|
+
readonly unquotedProperties?: ReadonlySet<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Properties whose **multi-line** string values serialize as a YAML literal
|
|
29
|
+
* block scalar (`key: |` followed by the indented lines) instead of a single
|
|
30
|
+
* quoted scalar. An entry is matched either as a qualified path
|
|
31
|
+
* (`"<TypeName>.<propertyName>"`, for a property on one specific type) or as
|
|
32
|
+
* a bare property name (`"<propertyName>"`, matching that property on any
|
|
33
|
+
* node — use for a property declared on a shared interface, e.g. a
|
|
34
|
+
* `description` carried by every named element). Single-line values for the
|
|
35
|
+
* same properties serialize normally (quoted). Required for free-text
|
|
36
|
+
* properties that legitimately span multiple lines (e.g. multi-line
|
|
37
|
+
* expressions) and must round-trip through a block-scalar terminal.
|
|
38
|
+
* Defaults to an empty set — grammars without such properties omit this.
|
|
39
|
+
*/
|
|
40
|
+
readonly blockScalarProperties?: ReadonlySet<string>;
|
|
41
|
+
/**
|
|
42
|
+
* AST type names that should serialize on the same line as their parent
|
|
43
|
+
* key (rather than as an indented YAML block). Use for thin wrapper types
|
|
44
|
+
* whose own block structure adds noise. Defaults to an empty set —
|
|
45
|
+
* grammars without inline-block types omit this.
|
|
46
|
+
*/
|
|
47
|
+
readonly inlineSerializedTypes?: ReadonlySet<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Newline character used between serialized lines. Defaults to `'\n'`.
|
|
50
|
+
* Adopters emitting Windows line endings pass `'\r\n'`.
|
|
51
|
+
*/
|
|
52
|
+
readonly newlineChar?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Indentation character. Defaults to `' '` (space). Adopters with a
|
|
55
|
+
* tab-indent house style pass `'\t'`.
|
|
56
|
+
*/
|
|
57
|
+
readonly indentationChar?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Number of {@link indentationChar} characters per indentation level.
|
|
60
|
+
* Defaults to `2` (YAML community convention). Set to `4` for 4-space
|
|
61
|
+
* indent.
|
|
62
|
+
*/
|
|
63
|
+
readonly indentationAmount?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Lookup table mapping `"<propertyName>.<valueType>"` → substitute YAML
|
|
66
|
+
* keyword. Used when a grammar declares multiple keyword alternatives
|
|
67
|
+
* for the same property (e.g. `element=FooElement |
|
|
68
|
+
* element=BarElement`) and the emitted keyword needs
|
|
69
|
+
* to switch based on the actual `$type` of the value. Defaults to an
|
|
70
|
+
* empty map — grammars without alternative-keyword properties omit
|
|
71
|
+
* this.
|
|
72
|
+
*/
|
|
73
|
+
readonly typeSpecificKeywords?: ReadonlyMap<string, string>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Hand-written grammar-aware AST → YAML serializer.
|
|
78
|
+
*
|
|
79
|
+
* Implements the YAML-specific layout on top of {@link AbstractSerializer}: nodes
|
|
80
|
+
* become `key: value` lines (2-space block indentation by default), nested
|
|
81
|
+
* nodes go on a new line unless declared in `inlineSerializedTypes`, and
|
|
82
|
+
* arrays render as `- item` block-style lists.
|
|
83
|
+
*
|
|
84
|
+
* The shared dispatch algorithm (reference detection, default-value skipping,
|
|
85
|
+
* reference-wrapper collapsing, custom-value hook) lives in
|
|
86
|
+
* {@link AbstractSerializer}. Consult that class for the format-agnostic extension
|
|
87
|
+
* points. YAML's one addition is unquoted-terminal emission, handled by its
|
|
88
|
+
* {@link serializeCustomValue} override driven by
|
|
89
|
+
* {@link YamlSerializerOptions.unquotedProperties}.
|
|
90
|
+
*/
|
|
91
|
+
export class YamlSerializer<TAst extends AstNode = AstNode, TTransfer extends TransferElement = TransferElement> extends AbstractSerializer<
|
|
92
|
+
TAst,
|
|
93
|
+
TTransfer
|
|
94
|
+
> {
|
|
95
|
+
/** Default {@link YamlSerializerOptions.newlineChar}. */
|
|
96
|
+
static readonly DEFAULT_NEWLINE_CHAR = '\n';
|
|
97
|
+
/** Default {@link YamlSerializerOptions.indentationChar}. */
|
|
98
|
+
static readonly DEFAULT_INDENTATION_CHAR = ' ';
|
|
99
|
+
/** Default {@link YamlSerializerOptions.indentationAmount}. */
|
|
100
|
+
static readonly DEFAULT_INDENTATION_AMOUNT = 2;
|
|
101
|
+
/** Default {@link YamlSerializerOptions.typeSpecificKeywords}: empty map (no dispatch). */
|
|
102
|
+
static readonly DEFAULT_TYPE_SPECIFIC_KEYWORDS: ReadonlyMap<string, string> = new Map();
|
|
103
|
+
|
|
104
|
+
/** Narrows the inherited {@link AbstractSerializer.options} field to the YAML-specific shape. */
|
|
105
|
+
declare protected readonly options: YamlSerializerOptions;
|
|
106
|
+
|
|
107
|
+
protected readonly newlineChar: string;
|
|
108
|
+
protected readonly indentationChar: string;
|
|
109
|
+
protected readonly indentationAmount: number;
|
|
110
|
+
protected readonly typeSpecificKeywords: ReadonlyMap<string, string>;
|
|
111
|
+
|
|
112
|
+
constructor(services: HydraniumLanguageServices, options: YamlSerializerOptions = {}) {
|
|
113
|
+
super(services, options);
|
|
114
|
+
this.newlineChar = options.newlineChar ?? YamlSerializer.DEFAULT_NEWLINE_CHAR;
|
|
115
|
+
this.indentationChar = options.indentationChar ?? YamlSerializer.DEFAULT_INDENTATION_CHAR;
|
|
116
|
+
this.indentationAmount = options.indentationAmount ?? YamlSerializer.DEFAULT_INDENTATION_AMOUNT;
|
|
117
|
+
this.typeSpecificKeywords = options.typeSpecificKeywords ?? YamlSerializer.DEFAULT_TYPE_SPECIFIC_KEYWORDS;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Serialize an AST or transfer-model node as a YAML block. Properties are
|
|
122
|
+
* emitted in grammar-declared order ({@link getOrderedPropertyNames}); each
|
|
123
|
+
* property is rendered as `key: value` either inline (scalars / inline
|
|
124
|
+
* types) or with the value on the next line (nested blocks, arrays).
|
|
125
|
+
*
|
|
126
|
+
* @param isArrayElement when `true`, the first property is not indented
|
|
127
|
+
* (the array `- ` prefix handles alignment).
|
|
128
|
+
*/
|
|
129
|
+
protected override serializeNode(
|
|
130
|
+
node: AstNode | Record<string, unknown>,
|
|
131
|
+
indentationLevel: number,
|
|
132
|
+
isArrayElement = false
|
|
133
|
+
): MaybePromise<string> {
|
|
134
|
+
const nodeType = (node as AstNode).$type;
|
|
135
|
+
const propNames = this.getOrderedPropertyNames(node, nodeType);
|
|
136
|
+
const state: { isFirst: boolean } = { isFirst: !isArrayElement };
|
|
137
|
+
return this.collectNodeLines(node, nodeType, propNames, indentationLevel, state, [], 0);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Iterate `propNames` from `startIndex`, serialise each property, and
|
|
142
|
+
* accumulate the resulting YAML lines. Stays on the sync fast path while
|
|
143
|
+
* every {@link serializePropertyValue} returns a string; the moment one
|
|
144
|
+
* returns a Promise, switches to a `.then`-chained tail that resumes
|
|
145
|
+
* iteration after the async value resolves. Keeps the all-sync case
|
|
146
|
+
* Promise-free even though the method's declared return type is the union.
|
|
147
|
+
*/
|
|
148
|
+
protected collectNodeLines(
|
|
149
|
+
node: AstNode | Record<string, unknown>,
|
|
150
|
+
nodeType: string,
|
|
151
|
+
propNames: readonly string[],
|
|
152
|
+
indentationLevel: number,
|
|
153
|
+
state: { isFirst: boolean },
|
|
154
|
+
lines: string[],
|
|
155
|
+
startIndex: number
|
|
156
|
+
): MaybePromise<string> {
|
|
157
|
+
for (let i = startIndex; i < propNames.length; i++) {
|
|
158
|
+
const prop = propNames[i];
|
|
159
|
+
const propValue = (node as GenericAstNode)[prop];
|
|
160
|
+
if (this.shouldSkipProperty(nodeType, prop, propValue)) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
// Arrays and non-inline objects start on a new line after the keyword.
|
|
164
|
+
const onNewLine = Array.isArray(propValue) || (isAstNode(propValue) && !this.options.inlineSerializedTypes?.has(propValue.$type));
|
|
165
|
+
// Pick the grammar keyword: when the value is an AST node and the property has
|
|
166
|
+
// type-specific keyword alternatives (e.g. `element` → `fooElement`),
|
|
167
|
+
// `getPropertyKeyword` consults the `YamlSerializerOptions.typeSpecificKeywords`
|
|
168
|
+
// map. Adopters that need procedural logic instead of (or in addition to) the map
|
|
169
|
+
// override the method.
|
|
170
|
+
const valueType = isAstNode(propValue) ? propValue.$type : undefined;
|
|
171
|
+
const keyword = this.getPropertyKeyword(prop, valueType);
|
|
172
|
+
// Multi-line string for a declared block-scalar property: emit `key: |` plus the
|
|
173
|
+
// indented content. The block content carries its own absolute indentation (one level
|
|
174
|
+
// deeper than the key), computed here from the real node level — `serializeCustomValue`
|
|
175
|
+
// cannot do this because inline values are dispatched at level 0.
|
|
176
|
+
if (
|
|
177
|
+
typeof propValue === 'string' &&
|
|
178
|
+
propValue.includes(this.newlineChar) &&
|
|
179
|
+
(this.options.blockScalarProperties?.has(`${nodeType}.${prop}`) || this.options.blockScalarProperties?.has(prop))
|
|
180
|
+
) {
|
|
181
|
+
const blockScalar = this.serializeBlockScalar(propValue, indentationLevel);
|
|
182
|
+
this.pushNodeLine(blockScalar, keyword, /* onNewLine */ false, indentationLevel, state, lines);
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
const maybe = this.serializePropertyValue(nodeType, prop, propValue, onNewLine ? indentationLevel + 1 : 0);
|
|
186
|
+
if (isPromiseLike(maybe)) {
|
|
187
|
+
const resumeAt = i + 1;
|
|
188
|
+
return maybe.then(serialized => {
|
|
189
|
+
this.pushNodeLine(serialized, keyword, onNewLine, indentationLevel, state, lines);
|
|
190
|
+
return this.collectNodeLines(node, nodeType, propNames, indentationLevel, state, lines, resumeAt);
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
this.pushNodeLine(maybe, keyword, onNewLine, indentationLevel, state, lines);
|
|
194
|
+
}
|
|
195
|
+
return lines.join(this.newlineChar + this.indent('', indentationLevel));
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Returns the YAML keyword for a property. Default reads from
|
|
200
|
+
* {@link typeSpecificKeywords} (initialised from
|
|
201
|
+
* {@link YamlSerializerOptions.typeSpecificKeywords} in the constructor):
|
|
202
|
+
* looks up `${prop}.${valueType}` and falls back to the raw property name
|
|
203
|
+
* for non-AST values and unmapped types. Adopters whose keyword follows a
|
|
204
|
+
* rule rather than a fixed table override this method instead of
|
|
205
|
+
* providing the data map.
|
|
206
|
+
*/
|
|
207
|
+
protected getPropertyKeyword(prop: string, valueType?: string): string {
|
|
208
|
+
if (valueType === undefined) {
|
|
209
|
+
return prop;
|
|
210
|
+
}
|
|
211
|
+
return this.typeSpecificKeywords.get(`${prop}.${valueType}`) ?? prop;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
protected pushNodeLine(
|
|
215
|
+
serialized: string | undefined,
|
|
216
|
+
keyword: string,
|
|
217
|
+
onNewLine: boolean,
|
|
218
|
+
indentationLevel: number,
|
|
219
|
+
state: { isFirst: boolean },
|
|
220
|
+
lines: string[]
|
|
221
|
+
): void {
|
|
222
|
+
if (!serialized) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const separator = onNewLine ? this.newlineChar : ' ';
|
|
226
|
+
const line = `${keyword}:${separator}${serialized}`;
|
|
227
|
+
lines.push(state.isFirst ? this.indent(line, indentationLevel) : line);
|
|
228
|
+
state.isFirst = false;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** Serialize an array of reference values (Langium References or plain strings). */
|
|
232
|
+
protected override serializeReferenceArray(items: unknown[], indentationLevel: number): MaybePromise<string> {
|
|
233
|
+
return this.collectReferenceArrayLines(items, indentationLevel, [], 0);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** Same sync-or-async tail pattern as {@link collectArrayLines}, for reference-array elements. */
|
|
237
|
+
protected collectReferenceArrayLines(
|
|
238
|
+
items: unknown[],
|
|
239
|
+
indentationLevel: number,
|
|
240
|
+
lines: string[],
|
|
241
|
+
startIndex: number
|
|
242
|
+
): MaybePromise<string> {
|
|
243
|
+
for (let i = startIndex; i < items.length; i++) {
|
|
244
|
+
const item = items[i];
|
|
245
|
+
if (item === undefined) {
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
const refText = this.serializeReferenceText(item);
|
|
249
|
+
let maybe: MaybePromise<string> | undefined;
|
|
250
|
+
if (refText !== undefined) {
|
|
251
|
+
maybe = this.formatReferenceValue(refText);
|
|
252
|
+
} else if (typeof item === 'string') {
|
|
253
|
+
maybe = this.formatReferenceValue(item);
|
|
254
|
+
}
|
|
255
|
+
if (maybe === undefined) {
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
if (isPromiseLike(maybe)) {
|
|
259
|
+
const resumeAt = i + 1;
|
|
260
|
+
return maybe.then(formatted => {
|
|
261
|
+
lines.push(this.indent(` - ${formatted}`, indentationLevel - 1));
|
|
262
|
+
return this.collectReferenceArrayLines(items, indentationLevel, lines, resumeAt);
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
lines.push(this.indent(` - ${maybe}`, indentationLevel - 1));
|
|
266
|
+
}
|
|
267
|
+
return lines.join(this.newlineChar);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/** Serialize an array of non-reference values. */
|
|
271
|
+
protected override serializeArray(items: unknown[], nodeType: string, key: string, indentationLevel: number): MaybePromise<string> {
|
|
272
|
+
return this.collectArrayLines(items, nodeType, key, indentationLevel, [], 0);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** Same sync-or-async tail pattern as {@link collectNodeLines}, for array elements. */
|
|
276
|
+
protected collectArrayLines(
|
|
277
|
+
items: unknown[],
|
|
278
|
+
nodeType: string,
|
|
279
|
+
key: string,
|
|
280
|
+
indentationLevel: number,
|
|
281
|
+
lines: string[],
|
|
282
|
+
startIndex: number
|
|
283
|
+
): MaybePromise<string> {
|
|
284
|
+
for (let i = startIndex; i < items.length; i++) {
|
|
285
|
+
const item = items[i];
|
|
286
|
+
if (item === undefined) {
|
|
287
|
+
continue;
|
|
288
|
+
}
|
|
289
|
+
const maybe = this.serializePropertyValue(nodeType, key, item, indentationLevel, /* isArrayElement */ true);
|
|
290
|
+
if (isPromiseLike(maybe)) {
|
|
291
|
+
const resumeAt = i + 1;
|
|
292
|
+
return maybe.then(serialized => {
|
|
293
|
+
this.pushArrayLine(serialized, indentationLevel, lines);
|
|
294
|
+
return this.collectArrayLines(items, nodeType, key, indentationLevel, lines, resumeAt);
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
this.pushArrayLine(maybe, indentationLevel, lines);
|
|
298
|
+
}
|
|
299
|
+
return lines.join(this.newlineChar);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
protected pushArrayLine(serialized: string | undefined, indentationLevel: number, lines: string[]): void {
|
|
303
|
+
if (serialized === undefined) {
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
lines.push(this.indent(` - ${serialized}`, indentationLevel - 1));
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* YAML emits grammar-declared unquoted terminals (cardinality keywords,
|
|
311
|
+
* type literals) as bare strings rather than quoting them. The decision is
|
|
312
|
+
* `(type, key)`-based, so it rides the {@link AbstractSerializer.serializeCustomValue}
|
|
313
|
+
* hook; non-matching properties delegate up the chain via `super`.
|
|
314
|
+
*/
|
|
315
|
+
protected override serializeCustomValue(
|
|
316
|
+
nodeType: string,
|
|
317
|
+
key: string,
|
|
318
|
+
value: unknown,
|
|
319
|
+
indentationLevel: number
|
|
320
|
+
): MaybePromise<string | undefined> {
|
|
321
|
+
if (typeof value === 'string' && this.options.unquotedProperties?.has(`${nodeType}.${key}`)) {
|
|
322
|
+
return String(value);
|
|
323
|
+
}
|
|
324
|
+
return super.serializeCustomValue(nodeType, key, value, indentationLevel);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/** Indent a line at the given level. */
|
|
328
|
+
protected indent(text: string, level: number): string {
|
|
329
|
+
return `${this.indentationChar.repeat(level * this.indentationAmount)}${text}`;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Serialize a multi-line string as a YAML literal block scalar. Returns
|
|
334
|
+
* `|` followed by every line indented one level deeper than `indentationLevel`
|
|
335
|
+
* (the node level at which the owning `key:` is emitted), so the block content
|
|
336
|
+
* sits below — and is reparsed relative to — its key. Every line (including
|
|
337
|
+
* blank ones) is indented so a block-string value converter that strips the
|
|
338
|
+
* common indentation round-trips interior and trailing blank lines.
|
|
339
|
+
*/
|
|
340
|
+
protected serializeBlockScalar(value: string, indentationLevel: number): string {
|
|
341
|
+
const indent = this.indentationChar.repeat((indentationLevel + 1) * this.indentationAmount);
|
|
342
|
+
const lines = value
|
|
343
|
+
.split(this.newlineChar)
|
|
344
|
+
.map(line => indent + line)
|
|
345
|
+
.join(this.newlineChar);
|
|
346
|
+
return `|${this.newlineChar}${lines}`;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2026 CrossBreeze, EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the MIT License which is available in the project root.
|
|
6
|
+
*
|
|
7
|
+
* SPDX-License-Identifier: MIT
|
|
8
|
+
********************************************************************************/
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
type AstNode,
|
|
12
|
+
AstUtils,
|
|
13
|
+
DefaultServiceRegistry,
|
|
14
|
+
isAstNode,
|
|
15
|
+
type LangiumCoreServices,
|
|
16
|
+
type LangiumSharedCoreServices,
|
|
17
|
+
type LanguageMetaData,
|
|
18
|
+
URI
|
|
19
|
+
} from '@hydranium/langium';
|
|
20
|
+
import { buildLanguageTypeIndex, type LanguageTypeIndex } from './language-types.js';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Anything that identifies the document whose language is wanted: an AST node
|
|
24
|
+
* (routed by the document it lives in), a `URI`, or a URI string.
|
|
25
|
+
*
|
|
26
|
+
* Named because it is a concept rather than an incidental union — "the thing
|
|
27
|
+
* whose own language decides this". `undefined` is deliberately NOT a member:
|
|
28
|
+
* whether a given parameter is optional is a fact about that signature, not
|
|
29
|
+
* about what can identify a document.
|
|
30
|
+
*/
|
|
31
|
+
export type LanguageTarget = AstNode | URI | string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* `DefaultServiceRegistry` whose `register` / `getServices` methods are typed
|
|
35
|
+
* with a consumer-specific extended-services type.
|
|
36
|
+
*
|
|
37
|
+
* Langium's stock `ServiceRegistry` returns the base `LangiumCoreServices`,
|
|
38
|
+
* which forces consumers to cast every time they reach for an extended
|
|
39
|
+
* service. By parameterising the registry with the consumer's full service
|
|
40
|
+
* type, the type narrowing happens at the registry boundary instead of every
|
|
41
|
+
* call site.
|
|
42
|
+
*/
|
|
43
|
+
export class HydraniumServiceRegistry<TServices extends LangiumCoreServices = LangiumCoreServices> extends DefaultServiceRegistry {
|
|
44
|
+
/**
|
|
45
|
+
* Shared services, held only so `workspace.TextDocuments` can be resolved
|
|
46
|
+
* per lookup instead of at construction.
|
|
47
|
+
*/
|
|
48
|
+
protected sharedServices?: LangiumSharedCoreServices;
|
|
49
|
+
|
|
50
|
+
/** Backing field for {@link registrations}. */
|
|
51
|
+
protected _registrations = 0;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* How many times {@link register} has been called — monotonic, and the
|
|
55
|
+
* cache key a consumer memoising over the registered set should use.
|
|
56
|
+
*
|
|
57
|
+
* `all.length` does not work for that: `register` writes into
|
|
58
|
+
* `languageIdMap` keyed by language id, so RE-registering an id replaces
|
|
59
|
+
* the entry and leaves the length unchanged. A consumer keyed on the count
|
|
60
|
+
* would then keep a cache built from the replaced language's metadata.
|
|
61
|
+
*/
|
|
62
|
+
get registrations(): number {
|
|
63
|
+
return this._registrations;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
constructor(services?: LangiumSharedCoreServices) {
|
|
67
|
+
// Deliberately NOT forwarded to `super`. Langium's constructor eagerly
|
|
68
|
+
// dereferences `services.workspace.TextDocuments`, which would make the
|
|
69
|
+
// registry construction-time dependent on it — and that path leads
|
|
70
|
+
// straight back here: TextDocuments → Tracer → Logger →
|
|
71
|
+
// `Settings.value` → `lsp.configurationRoot` → `ServiceRegistry.all`.
|
|
72
|
+
// Langium's injector throws on that cycle ("Cycle detected"). Holding
|
|
73
|
+
// the reference and resolving TextDocuments per lookup keeps Langium's
|
|
74
|
+
// languageId rung (see `getServices`) with no construction-time edge.
|
|
75
|
+
// Latent rather than live for an adopter that binds
|
|
76
|
+
// `lsp.configurationRoot` to a constant, which is exactly the kind of
|
|
77
|
+
// accident that should not be left for the next adopter to hit.
|
|
78
|
+
super();
|
|
79
|
+
this.sharedServices = services;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Supply the shared services after construction, for a registry built
|
|
84
|
+
* without them. Only fills an empty reference — an explicitly constructed
|
|
85
|
+
* one is never replaced. Called by `bootstrapLangiumLanguages` so the
|
|
86
|
+
* languageId rung works regardless of how the adopter's `ServiceRegistry`
|
|
87
|
+
* binding constructed the registry; without it, an adopter rebinding the
|
|
88
|
+
* slot with a zero-argument `new MyRegistry()` would silently lose that
|
|
89
|
+
* rung with nothing to indicate it.
|
|
90
|
+
*/
|
|
91
|
+
acceptSharedServices(services: LangiumSharedCoreServices): void {
|
|
92
|
+
this.sharedServices ??= services;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
override register(language: TServices): void {
|
|
96
|
+
super.register(language);
|
|
97
|
+
this._registrations++;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Langium's lookup ladder: an open document's declared `languageId`, then
|
|
102
|
+
* its file name, then its extension, then a throw. Because `super` was
|
|
103
|
+
* never given the services it reads `textDocuments` from, its own
|
|
104
|
+
* languageId rung is inert — so this supplies that rung and delegates
|
|
105
|
+
* every rung below it (and the throw) to `super`, rather than restating
|
|
106
|
+
* the ladder.
|
|
107
|
+
*
|
|
108
|
+
* The declared-id rung is what lets an `untitled:` or extensionless
|
|
109
|
+
* document route at all, and what gives an OPEN buffer's declared id
|
|
110
|
+
* precedence over its file extension.
|
|
111
|
+
*
|
|
112
|
+
* It does NOT make two languages that share a file extension workable, and
|
|
113
|
+
* `assertDistinctFileRouting` fails the boot on that configuration: only an
|
|
114
|
+
* open buffer has a declared id, while indexing, scope computation and
|
|
115
|
+
* validation route every CLOSED file in the workspace by extension, where
|
|
116
|
+
* Langium's last-registered-wins would silently hand half the workspace to
|
|
117
|
+
* the wrong grammar.
|
|
118
|
+
*/
|
|
119
|
+
override getServices(uri: URI): TServices {
|
|
120
|
+
const languageId = this.sharedServices?.workspace.TextDocuments?.get(uri)?.languageId;
|
|
121
|
+
if (languageId !== undefined) {
|
|
122
|
+
const byLanguageId = this.languageIdMap.get(languageId);
|
|
123
|
+
if (byLanguageId) {
|
|
124
|
+
return byLanguageId as TServices;
|
|
125
|
+
}
|
|
126
|
+
// A declared id nothing is registered for (a stale client
|
|
127
|
+
// contribution, a plain-text buffer) is not an error — fall through
|
|
128
|
+
// to the file-name and extension rungs.
|
|
129
|
+
}
|
|
130
|
+
return super.getServices(uri) as TServices;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
declare const ServicesTypeBrand: unique symbol;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Phantom-branded subtype of {@link LanguageMetaData} that carries the
|
|
138
|
+
* extended-services type as a compile-time tag. Construct via
|
|
139
|
+
* {@link typedMetadata} from a generated `<Grammar>LanguageMetaData` constant,
|
|
140
|
+
* and pass instances to {@link ExtendedServiceRegistry.getServices} for a
|
|
141
|
+
* fully-inferred return type (no caller-side cast).
|
|
142
|
+
*
|
|
143
|
+
* The brand uses a `unique symbol` member so the type is invariant in
|
|
144
|
+
* `TServices` — `TypedLanguageMetaData<A>` is NOT assignable to
|
|
145
|
+
* `TypedLanguageMetaData<B>` even when `A` and `B` are structurally
|
|
146
|
+
* identical. The brand is optional (`?`) so a bare `LanguageMetaData`
|
|
147
|
+
* literal stays structurally assignable to the underlying interface; only
|
|
148
|
+
* the `TypedLanguageMetaData` view of it has phantom-type teeth.
|
|
149
|
+
*/
|
|
150
|
+
export interface TypedLanguageMetaData<TServices extends LangiumCoreServices = LangiumCoreServices> extends LanguageMetaData {
|
|
151
|
+
readonly [ServicesTypeBrand]?: TServices;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Annotate a generated {@link LanguageMetaData} constant with the
|
|
156
|
+
* extended-services type it indexes. Use once per grammar at module
|
|
157
|
+
* scope; the resulting handle is a stable identity for typed
|
|
158
|
+
* `getServices(metadata)` lookups.
|
|
159
|
+
*/
|
|
160
|
+
export function typedMetadata<TServices extends LangiumCoreServices>(metadata: LanguageMetaData): TypedLanguageMetaData<TServices> {
|
|
161
|
+
return metadata as TypedLanguageMetaData<TServices>;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function isLanguageMetaData(arg: unknown): arg is TypedLanguageMetaData<LangiumCoreServices> {
|
|
165
|
+
return typeof arg === 'object' && arg !== null && 'languageId' in arg && 'fileExtensions' in arg;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Extended {@link HydraniumServiceRegistry}, adding the lookups the inherited
|
|
170
|
+
* URI-keyed `getServices(uri)` cannot answer:
|
|
171
|
+
*
|
|
172
|
+
* - **Typed metadata handle** — `getServices(metadata: TypedLanguageMetaData<T>)`
|
|
173
|
+
* returns the registered services typed as `T | undefined`. The primary
|
|
174
|
+
* path: callers hold a typed handle per grammar (constructed once via
|
|
175
|
+
* {@link typedMetadata}) and resolve services without any caller-side cast.
|
|
176
|
+
* - **Anything that identifies a document** — {@link getServicesFor} takes an
|
|
177
|
+
* AST node, a `URI` or a URI string, and abstains instead of throwing.
|
|
178
|
+
* - **String id escape hatch** — {@link getServicesById}, for a language id
|
|
179
|
+
* derived dynamically (from a wire envelope) where the typed handle isn't
|
|
180
|
+
* reachable at the call site.
|
|
181
|
+
* - **File extension escape hatch** — {@link getServicesByExtension}, for
|
|
182
|
+
* file-routing logic that has no URI yet.
|
|
183
|
+
* - **Producible AST type** — {@link getServicesByType} returns every language
|
|
184
|
+
* whose grammar can produce a `$type`, and {@link soleServicesByType}
|
|
185
|
+
* narrows that to the unambiguous case. It is the only routing signal a
|
|
186
|
+
* request that names no document carries at all.
|
|
187
|
+
*
|
|
188
|
+
* Two overload signatures on `getServices` discriminate at compile time
|
|
189
|
+
* — passing a `URI` keeps the inherited `TServices` return shape; passing a
|
|
190
|
+
* `TypedLanguageMetaData<T>` returns `T | undefined`.
|
|
191
|
+
*
|
|
192
|
+
* Langium's base `ServiceRegistry` type stays unchanged. The framework narrows
|
|
193
|
+
* its own `ServiceRegistry` slot to this class instead, so the extended lookups
|
|
194
|
+
* are reachable from the shared-services shapes without a cast.
|
|
195
|
+
*/
|
|
196
|
+
export class ExtendedServiceRegistry<
|
|
197
|
+
TServices extends LangiumCoreServices = LangiumCoreServices
|
|
198
|
+
> extends HydraniumServiceRegistry<TServices> {
|
|
199
|
+
// Typed-handle overload: primary path, fully inferred.
|
|
200
|
+
override getServices<TMetaServices extends LangiumCoreServices>(
|
|
201
|
+
metadata: TypedLanguageMetaData<TMetaServices>
|
|
202
|
+
): TMetaServices | undefined;
|
|
203
|
+
// URI overload: preserves Langium's inherited semantics.
|
|
204
|
+
override getServices(uri: URI): TServices;
|
|
205
|
+
override getServices(arg: URI | TypedLanguageMetaData<LangiumCoreServices>): TServices | LangiumCoreServices | undefined {
|
|
206
|
+
if (isLanguageMetaData(arg)) {
|
|
207
|
+
return this.languageIdMap.get(arg.languageId);
|
|
208
|
+
}
|
|
209
|
+
return super.getServices(arg);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Lookup by anything that identifies a document — an AST node (routed by
|
|
214
|
+
* the document it lives in), a `URI`, or a URI string. `undefined` when the
|
|
215
|
+
* node has no document, or nothing routes the URI.
|
|
216
|
+
*
|
|
217
|
+
* **Abstains rather than throws**, unlike the inherited `getServices(uri)`.
|
|
218
|
+
* Throwing is right for a build pipeline, which must have a language for
|
|
219
|
+
* every document it builds, and wrong for a caller asking an optional
|
|
220
|
+
* question about an arbitrary target: a foreign reference target, a
|
|
221
|
+
* synthetic node, a directory URI. Same contract as
|
|
222
|
+
* {@link getServicesById}.
|
|
223
|
+
*
|
|
224
|
+
* **The per-target lookup belongs here, not at the call sites.** The thing
|
|
225
|
+
* to apply to a node is decided by the node's OWN document, and a caller
|
|
226
|
+
* that captures one provider and reuses it across nodes derives names and
|
|
227
|
+
* keys under the wrong grammar's `nameProperties` / `nameSeparator` the
|
|
228
|
+
* moment two languages differ — silently, since the result is a
|
|
229
|
+
* plausible-looking string. Hand-rolling the three steps (node to root
|
|
230
|
+
* document, abstain on miss, one ladder walk not two) is what let that
|
|
231
|
+
* defect recur; being a registry method makes the correct call the
|
|
232
|
+
* discoverable one, and the generic `TServices` return means no call site
|
|
233
|
+
* needs a cast.
|
|
234
|
+
*
|
|
235
|
+
* One walk of the lookup ladder: Langium implements `hasServices` as a
|
|
236
|
+
* try/catch around `getServices`, so the obvious `hasServices(uri) &&
|
|
237
|
+
* getServices(uri)` pair costs two walks on the happy path — and these are
|
|
238
|
+
* bulk paths, once per indexed node or serialised reference.
|
|
239
|
+
*/
|
|
240
|
+
getServicesFor(target: LanguageTarget | undefined): TServices | undefined {
|
|
241
|
+
const uri = isAstNode(target) ? AstUtils.findRootNode(target).$document?.uri : target;
|
|
242
|
+
if (uri === undefined) {
|
|
243
|
+
return undefined;
|
|
244
|
+
}
|
|
245
|
+
try {
|
|
246
|
+
return this.getServices(typeof uri === 'string' ? URI.parse(uri) : uri);
|
|
247
|
+
} catch {
|
|
248
|
+
return undefined;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Lookup by raw `languageId` string. Returns `undefined` when no
|
|
254
|
+
* services have been registered for the id (vs. the URI overload's
|
|
255
|
+
* inherited Langium semantics, which throws on miss). Used for
|
|
256
|
+
* dynamically-routed lookups where the language id comes from
|
|
257
|
+
* external input.
|
|
258
|
+
*/
|
|
259
|
+
getServicesById(languageId: string): LangiumCoreServices | undefined {
|
|
260
|
+
return this.languageIdMap.get(languageId);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Lookup by file extension. Returns `undefined` when no services match.
|
|
265
|
+
* Useful for routing decisions that need to dispatch on file extension
|
|
266
|
+
* before a URI is available.
|
|
267
|
+
*/
|
|
268
|
+
getServicesByExtension(extension: string): LangiumCoreServices | undefined {
|
|
269
|
+
return this.fileExtensionMap.get(extension);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Every registered language whose grammar can PRODUCE `type`, in
|
|
274
|
+
* registration order. Empty when none can; more than one when several do
|
|
275
|
+
* (types reached through a grammar they both import).
|
|
276
|
+
*
|
|
277
|
+
* Returns the list rather than a single answer on purpose: "no language
|
|
278
|
+
* produces this" and "four do" are different facts, and a caller needs to
|
|
279
|
+
* tell them apart both to explain itself and to decide whether to fall
|
|
280
|
+
* through to another signal. The registry answers the fact; the head owns
|
|
281
|
+
* the policy. {@link soleServicesByType} is the shorthand for the common
|
|
282
|
+
* policy.
|
|
283
|
+
*
|
|
284
|
+
* Attribution is *produced, not mentioned* and *reachable from the entry
|
|
285
|
+
* rule, not merely present* — see `collectProducibleTypes`.
|
|
286
|
+
*/
|
|
287
|
+
getServicesByType(type: string): readonly TServices[] {
|
|
288
|
+
return this.typeIndex.languagesFor(type);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* The single language that can produce `type`, or `undefined` when none
|
|
293
|
+
* can or several can. The common policy over {@link getServicesByType}:
|
|
294
|
+
* an ambiguous type does not identify a language, so abstaining is the
|
|
295
|
+
* honest answer rather than taking the first.
|
|
296
|
+
*/
|
|
297
|
+
soleServicesByType(type: string): TServices | undefined {
|
|
298
|
+
const owners = this.getServicesByType(type);
|
|
299
|
+
return owners.length === 1 ? owners[0] : undefined;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Drop the memoised type index, so a language registered after the first
|
|
304
|
+
* type lookup is accounted for. The reason this index belongs on the
|
|
305
|
+
* registry rather than in a consumer's private memo: the registry is the
|
|
306
|
+
* one place that knows when the registered set changed.
|
|
307
|
+
*/
|
|
308
|
+
override register(language: TServices): void {
|
|
309
|
+
super.register(language);
|
|
310
|
+
this._typeIndex = undefined;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
protected _typeIndex?: LanguageTypeIndex<TServices>;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Type → language index over the registered grammars, built on first use.
|
|
317
|
+
* Lazy because a grammar walk per language is not free and most lookups
|
|
318
|
+
* never need it; invalidated by {@link register}.
|
|
319
|
+
*/
|
|
320
|
+
protected get typeIndex(): LanguageTypeIndex<TServices> {
|
|
321
|
+
return (this._typeIndex ??= buildLanguageTypeIndex(this.all as readonly TServices[]));
|
|
322
|
+
}
|
|
323
|
+
}
|