@aster-cloud/aster-lang-ts 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +144 -0
- package/dist/peg/headers-parser.js +1887 -0
- package/dist/scripts/aster.d.ts +3 -0
- package/dist/scripts/aster.d.ts.map +1 -0
- package/dist/scripts/aster.js +304 -0
- package/dist/scripts/aster.js.map +1 -0
- package/dist/scripts/build-example-packages.d.ts +3 -0
- package/dist/scripts/build-example-packages.d.ts.map +1 -0
- package/dist/scripts/build-example-packages.js +78 -0
- package/dist/scripts/build-example-packages.js.map +1 -0
- package/dist/scripts/build-peg.d.ts +3 -0
- package/dist/scripts/build-peg.d.ts.map +1 -0
- package/dist/scripts/build-peg.js +13 -0
- package/dist/scripts/build-peg.js.map +1 -0
- package/dist/scripts/cleanup-examples.d.ts +3 -0
- package/dist/scripts/cleanup-examples.d.ts.map +1 -0
- package/dist/scripts/cleanup-examples.js +40 -0
- package/dist/scripts/cleanup-examples.js.map +1 -0
- package/dist/scripts/clear-method-cache.d.ts +3 -0
- package/dist/scripts/clear-method-cache.d.ts.map +1 -0
- package/dist/scripts/clear-method-cache.js +20 -0
- package/dist/scripts/clear-method-cache.js.map +1 -0
- package/dist/scripts/cli.d.ts +3 -0
- package/dist/scripts/cli.d.ts.map +1 -0
- package/dist/scripts/cli.js +51 -0
- package/dist/scripts/cli.js.map +1 -0
- package/dist/scripts/determinism.d.ts +3 -0
- package/dist/scripts/determinism.d.ts.map +1 -0
- package/dist/scripts/determinism.js +124 -0
- package/dist/scripts/determinism.js.map +1 -0
- package/dist/scripts/emit-classfiles-core.d.ts +3 -0
- package/dist/scripts/emit-classfiles-core.d.ts.map +1 -0
- package/dist/scripts/emit-classfiles-core.js +86 -0
- package/dist/scripts/emit-classfiles-core.js.map +1 -0
- package/dist/scripts/emit-classfiles.d.ts +3 -0
- package/dist/scripts/emit-classfiles.d.ts.map +1 -0
- package/dist/scripts/emit-classfiles.js +401 -0
- package/dist/scripts/emit-classfiles.js.map +1 -0
- package/dist/scripts/emit-core.d.ts +3 -0
- package/dist/scripts/emit-core.d.ts.map +1 -0
- package/dist/scripts/emit-core.js +52 -0
- package/dist/scripts/emit-core.js.map +1 -0
- package/dist/scripts/emit-hints.d.ts +3 -0
- package/dist/scripts/emit-hints.d.ts.map +1 -0
- package/dist/scripts/emit-hints.js +75 -0
- package/dist/scripts/emit-hints.js.map +1 -0
- package/dist/scripts/format-examples.d.ts +3 -0
- package/dist/scripts/format-examples.d.ts.map +1 -0
- package/dist/scripts/format-examples.js +55 -0
- package/dist/scripts/format-examples.js.map +1 -0
- package/dist/scripts/generate_error_code_docs.d.ts +8 -0
- package/dist/scripts/generate_error_code_docs.d.ts.map +1 -0
- package/dist/scripts/generate_error_code_docs.js +128 -0
- package/dist/scripts/generate_error_code_docs.js.map +1 -0
- package/dist/scripts/generate_error_codes.d.ts +3 -0
- package/dist/scripts/generate_error_codes.d.ts.map +1 -0
- package/dist/scripts/generate_error_codes.js +224 -0
- package/dist/scripts/generate_error_codes.js.map +1 -0
- package/dist/scripts/golden.d.ts +3 -0
- package/dist/scripts/golden.d.ts.map +1 -0
- package/dist/scripts/golden.js +405 -0
- package/dist/scripts/golden.js.map +1 -0
- package/dist/scripts/health-check.d.ts +3 -0
- package/dist/scripts/health-check.d.ts.map +1 -0
- package/dist/scripts/health-check.js +42 -0
- package/dist/scripts/health-check.js.map +1 -0
- package/dist/scripts/inspect-method-cache.d.ts +3 -0
- package/dist/scripts/inspect-method-cache.d.ts.map +1 -0
- package/dist/scripts/inspect-method-cache.js +24 -0
- package/dist/scripts/inspect-method-cache.js.map +1 -0
- package/dist/scripts/lsp-build-index.d.ts +3 -0
- package/dist/scripts/lsp-build-index.d.ts.map +1 -0
- package/dist/scripts/lsp-build-index.js +60 -0
- package/dist/scripts/lsp-build-index.js.map +1 -0
- package/dist/scripts/lsp-capmanifest-codeaction-smoke.d.ts +3 -0
- package/dist/scripts/lsp-capmanifest-codeaction-smoke.d.ts.map +1 -0
- package/dist/scripts/lsp-capmanifest-codeaction-smoke.js +161 -0
- package/dist/scripts/lsp-capmanifest-codeaction-smoke.js.map +1 -0
- package/dist/scripts/lsp-client-helper.d.ts +30 -0
- package/dist/scripts/lsp-client-helper.d.ts.map +1 -0
- package/dist/scripts/lsp-client-helper.js +192 -0
- package/dist/scripts/lsp-client-helper.js.map +1 -0
- package/dist/scripts/lsp-client-helper.test.d.ts +7 -0
- package/dist/scripts/lsp-client-helper.test.d.ts.map +1 -0
- package/dist/scripts/lsp-client-helper.test.js +45 -0
- package/dist/scripts/lsp-client-helper.test.js.map +1 -0
- package/dist/scripts/lsp-codeaction-smoke.d.ts +3 -0
- package/dist/scripts/lsp-codeaction-smoke.d.ts.map +1 -0
- package/dist/scripts/lsp-codeaction-smoke.js +98 -0
- package/dist/scripts/lsp-codeaction-smoke.js.map +1 -0
- package/dist/scripts/lsp-harness.d.ts +3 -0
- package/dist/scripts/lsp-harness.d.ts.map +1 -0
- package/dist/scripts/lsp-harness.js +33 -0
- package/dist/scripts/lsp-harness.js.map +1 -0
- package/dist/scripts/lsp-health-smoke.d.ts +3 -0
- package/dist/scripts/lsp-health-smoke.d.ts.map +1 -0
- package/dist/scripts/lsp-health-smoke.js +98 -0
- package/dist/scripts/lsp-health-smoke.js.map +1 -0
- package/dist/scripts/lsp-health.d.ts +3 -0
- package/dist/scripts/lsp-health.d.ts.map +1 -0
- package/dist/scripts/lsp-health.js +22 -0
- package/dist/scripts/lsp-health.js.map +1 -0
- package/dist/scripts/lsp-highlight-smoke.d.ts +3 -0
- package/dist/scripts/lsp-highlight-smoke.d.ts.map +1 -0
- package/dist/scripts/lsp-highlight-smoke.js +124 -0
- package/dist/scripts/lsp-highlight-smoke.js.map +1 -0
- package/dist/scripts/lsp-missing-header-codeaction-smoke.d.ts +3 -0
- package/dist/scripts/lsp-missing-header-codeaction-smoke.d.ts.map +1 -0
- package/dist/scripts/lsp-missing-header-codeaction-smoke.js +78 -0
- package/dist/scripts/lsp-missing-header-codeaction-smoke.js.map +1 -0
- package/dist/scripts/lsp-multi-rename.test.d.ts +3 -0
- package/dist/scripts/lsp-multi-rename.test.d.ts.map +1 -0
- package/dist/scripts/lsp-multi-rename.test.js +81 -0
- package/dist/scripts/lsp-multi-rename.test.js.map +1 -0
- package/dist/scripts/lsp-punct-codeaction-smoke.d.ts +3 -0
- package/dist/scripts/lsp-punct-codeaction-smoke.d.ts.map +1 -0
- package/dist/scripts/lsp-punct-codeaction-smoke.js +71 -0
- package/dist/scripts/lsp-punct-codeaction-smoke.js.map +1 -0
- package/dist/scripts/lsp-signaturehelp-smoke.d.ts +3 -0
- package/dist/scripts/lsp-signaturehelp-smoke.d.ts.map +1 -0
- package/dist/scripts/lsp-signaturehelp-smoke.js +129 -0
- package/dist/scripts/lsp-signaturehelp-smoke.js.map +1 -0
- package/dist/scripts/lsp-smoke.d.ts +3 -0
- package/dist/scripts/lsp-smoke.d.ts.map +1 -0
- package/dist/scripts/lsp-smoke.js +54 -0
- package/dist/scripts/lsp-smoke.js.map +1 -0
- package/dist/scripts/lsp-streaming-progress-smoke.d.ts +3 -0
- package/dist/scripts/lsp-streaming-progress-smoke.d.ts.map +1 -0
- package/dist/scripts/lsp-streaming-progress-smoke.js +116 -0
- package/dist/scripts/lsp-streaming-progress-smoke.js.map +1 -0
- package/dist/scripts/lsp-workspace-diagnostics-smoke.d.ts +3 -0
- package/dist/scripts/lsp-workspace-diagnostics-smoke.d.ts.map +1 -0
- package/dist/scripts/lsp-workspace-diagnostics-smoke.js +81 -0
- package/dist/scripts/lsp-workspace-diagnostics-smoke.js.map +1 -0
- package/dist/scripts/perf-assert-report.d.ts +8 -0
- package/dist/scripts/perf-assert-report.d.ts.map +1 -0
- package/dist/scripts/perf-assert-report.js +44 -0
- package/dist/scripts/perf-assert-report.js.map +1 -0
- package/dist/scripts/perf-assert.d.ts +3 -0
- package/dist/scripts/perf-assert.d.ts.map +1 -0
- package/dist/scripts/perf-assert.js +29 -0
- package/dist/scripts/perf-assert.js.map +1 -0
- package/dist/scripts/perf-benchmark.d.ts +9 -0
- package/dist/scripts/perf-benchmark.d.ts.map +1 -0
- package/dist/scripts/perf-benchmark.js +272 -0
- package/dist/scripts/perf-benchmark.js.map +1 -0
- package/dist/scripts/perf-diagnostics.d.ts +7 -0
- package/dist/scripts/perf-diagnostics.d.ts.map +1 -0
- package/dist/scripts/perf-diagnostics.js +87 -0
- package/dist/scripts/perf-diagnostics.js.map +1 -0
- package/dist/scripts/perf-lsp-e2e-v2.d.ts +15 -0
- package/dist/scripts/perf-lsp-e2e-v2.d.ts.map +1 -0
- package/dist/scripts/perf-lsp-e2e-v2.js +323 -0
- package/dist/scripts/perf-lsp-e2e-v2.js.map +1 -0
- package/dist/scripts/perf-lsp-e2e.d.ts +3 -0
- package/dist/scripts/perf-lsp-e2e.d.ts.map +1 -0
- package/dist/scripts/perf-lsp-e2e.js +331 -0
- package/dist/scripts/perf-lsp-e2e.js.map +1 -0
- package/dist/scripts/perf-lsp-internal.d.ts +11 -0
- package/dist/scripts/perf-lsp-internal.d.ts.map +1 -0
- package/dist/scripts/perf-lsp-internal.js +163 -0
- package/dist/scripts/perf-lsp-internal.js.map +1 -0
- package/dist/scripts/perf-lsp-ipc.d.ts +11 -0
- package/dist/scripts/perf-lsp-ipc.d.ts.map +1 -0
- package/dist/scripts/perf-lsp-ipc.js +127 -0
- package/dist/scripts/perf-lsp-ipc.js.map +1 -0
- package/dist/scripts/perf-lsp.d.ts +3 -0
- package/dist/scripts/perf-lsp.d.ts.map +1 -0
- package/dist/scripts/perf-lsp.js +87 -0
- package/dist/scripts/perf-lsp.js.map +1 -0
- package/dist/scripts/perf-utils.d.ts +29 -0
- package/dist/scripts/perf-utils.d.ts.map +1 -0
- package/dist/scripts/perf-utils.js +40 -0
- package/dist/scripts/perf-utils.js.map +1 -0
- package/dist/scripts/profile-medium-project.d.ts +7 -0
- package/dist/scripts/profile-medium-project.d.ts.map +1 -0
- package/dist/scripts/profile-medium-project.js +152 -0
- package/dist/scripts/profile-medium-project.js.map +1 -0
- package/dist/scripts/repl.d.ts +3 -0
- package/dist/scripts/repl.d.ts.map +1 -0
- package/dist/scripts/repl.js +88 -0
- package/dist/scripts/repl.js.map +1 -0
- package/dist/scripts/scaffold.d.ts +3 -0
- package/dist/scripts/scaffold.d.ts.map +1 -0
- package/dist/scripts/scaffold.js +73 -0
- package/dist/scripts/scaffold.js.map +1 -0
- package/dist/scripts/seed-method-cache.d.ts +3 -0
- package/dist/scripts/seed-method-cache.d.ts.map +1 -0
- package/dist/scripts/seed-method-cache.js +37 -0
- package/dist/scripts/seed-method-cache.js.map +1 -0
- package/dist/scripts/test-comments-golden.d.ts +3 -0
- package/dist/scripts/test-comments-golden.d.ts.map +1 -0
- package/dist/scripts/test-comments-golden.js +36 -0
- package/dist/scripts/test-comments-golden.js.map +1 -0
- package/dist/scripts/test-lossless-golden.d.ts +3 -0
- package/dist/scripts/test-lossless-golden.d.ts.map +1 -0
- package/dist/scripts/test-lossless-golden.js +42 -0
- package/dist/scripts/test-lossless-golden.js.map +1 -0
- package/dist/scripts/test-lossless.d.ts +3 -0
- package/dist/scripts/test-lossless.d.ts.map +1 -0
- package/dist/scripts/test-lossless.js +26 -0
- package/dist/scripts/test-lossless.js.map +1 -0
- package/dist/scripts/test-lsp-index.d.ts +3 -0
- package/dist/scripts/test-lsp-index.d.ts.map +1 -0
- package/dist/scripts/test-lsp-index.js +37 -0
- package/dist/scripts/test-lsp-index.js.map +1 -0
- package/dist/scripts/test-medium-diagnostics.d.ts +7 -0
- package/dist/scripts/test-medium-diagnostics.d.ts.map +1 -0
- package/dist/scripts/test-medium-diagnostics.js +129 -0
- package/dist/scripts/test-medium-diagnostics.js.map +1 -0
- package/dist/scripts/typecheck-cli.d.ts +3 -0
- package/dist/scripts/typecheck-cli.d.ts.map +1 -0
- package/dist/scripts/typecheck-cli.js +104 -0
- package/dist/scripts/typecheck-cli.js.map +1 -0
- package/dist/scripts/update-eff-violation-expected.d.ts +3 -0
- package/dist/scripts/update-eff-violation-expected.d.ts.map +1 -0
- package/dist/scripts/update-eff-violation-expected.js +57 -0
- package/dist/scripts/update-eff-violation-expected.js.map +1 -0
- package/dist/scripts/update-golden-ast.d.ts +3 -0
- package/dist/scripts/update-golden-ast.d.ts.map +1 -0
- package/dist/scripts/update-golden-ast.js +61 -0
- package/dist/scripts/update-golden-ast.js.map +1 -0
- package/dist/scripts/validate_error_codes.d.ts +12 -0
- package/dist/scripts/validate_error_codes.d.ts.map +1 -0
- package/dist/scripts/validate_error_codes.js +114 -0
- package/dist/scripts/validate_error_codes.js.map +1 -0
- package/dist/scripts/verify-capabilities.d.ts +3 -0
- package/dist/scripts/verify-capabilities.d.ts.map +1 -0
- package/dist/scripts/verify-capabilities.js +23 -0
- package/dist/scripts/verify-capabilities.js.map +1 -0
- package/dist/scripts/verify-classes.d.ts +3 -0
- package/dist/scripts/verify-classes.d.ts.map +1 -0
- package/dist/scripts/verify-classes.js +32 -0
- package/dist/scripts/verify-classes.js.map +1 -0
- package/dist/scripts/verify-examples.d.ts +3 -0
- package/dist/scripts/verify-examples.d.ts.map +1 -0
- package/dist/scripts/verify-examples.js +79 -0
- package/dist/scripts/verify-examples.js.map +1 -0
- package/dist/scripts/verify-fuzz.d.ts +3 -0
- package/dist/scripts/verify-fuzz.d.ts.map +1 -0
- package/dist/scripts/verify-fuzz.js +88 -0
- package/dist/scripts/verify-fuzz.js.map +1 -0
- package/dist/scripts/verify-jar-checksum.d.ts +3 -0
- package/dist/scripts/verify-jar-checksum.d.ts.map +1 -0
- package/dist/scripts/verify-jar-checksum.js +63 -0
- package/dist/scripts/verify-jar-checksum.js.map +1 -0
- package/dist/scripts/verify-nullstrict.d.ts +3 -0
- package/dist/scripts/verify-nullstrict.d.ts.map +1 -0
- package/dist/scripts/verify-nullstrict.js +20 -0
- package/dist/scripts/verify-nullstrict.js.map +1 -0
- package/dist/src/ai/generation-cache.d.ts +36 -0
- package/dist/src/ai/generation-cache.d.ts.map +1 -0
- package/dist/src/ai/generation-cache.js +91 -0
- package/dist/src/ai/generation-cache.js.map +1 -0
- package/dist/src/ai/generator.d.ts +105 -0
- package/dist/src/ai/generator.d.ts.map +1 -0
- package/dist/src/ai/generator.js +103 -0
- package/dist/src/ai/generator.js.map +1 -0
- package/dist/src/ai/llm-provider.d.ts +31 -0
- package/dist/src/ai/llm-provider.d.ts.map +1 -0
- package/dist/src/ai/llm-provider.js +17 -0
- package/dist/src/ai/llm-provider.js.map +1 -0
- package/dist/src/ai/prompt-manager.d.ts +48 -0
- package/dist/src/ai/prompt-manager.d.ts.map +1 -0
- package/dist/src/ai/prompt-manager.js +70 -0
- package/dist/src/ai/prompt-manager.js.map +1 -0
- package/dist/src/ai/provenance.d.ts +70 -0
- package/dist/src/ai/provenance.d.ts.map +1 -0
- package/dist/src/ai/provenance.js +95 -0
- package/dist/src/ai/provenance.js.map +1 -0
- package/dist/src/ai/providers/anthropic.d.ts +14 -0
- package/dist/src/ai/providers/anthropic.d.ts.map +1 -0
- package/dist/src/ai/providers/anthropic.js +56 -0
- package/dist/src/ai/providers/anthropic.js.map +1 -0
- package/dist/src/ai/providers/openai.d.ts +15 -0
- package/dist/src/ai/providers/openai.d.ts.map +1 -0
- package/dist/src/ai/providers/openai.js +58 -0
- package/dist/src/ai/providers/openai.js.map +1 -0
- package/dist/src/ai/validator.d.ts +68 -0
- package/dist/src/ai/validator.d.ts.map +1 -0
- package/dist/src/ai/validator.js +108 -0
- package/dist/src/ai/validator.js.map +1 -0
- package/dist/src/ast/ast.d.ts +49 -0
- package/dist/src/ast/ast.d.ts.map +1 -0
- package/dist/src/ast/ast.js +191 -0
- package/dist/src/ast/ast.js.map +1 -0
- package/dist/src/ast/ast_visitor.d.ts +66 -0
- package/dist/src/ast/ast_visitor.d.ts.map +1 -0
- package/dist/src/ast/ast_visitor.js +176 -0
- package/dist/src/ast/ast_visitor.js.map +1 -0
- package/dist/src/ast/index.d.ts +13 -0
- package/dist/src/ast/index.d.ts.map +1 -0
- package/dist/src/ast/index.js +12 -0
- package/dist/src/ast/index.js.map +1 -0
- package/dist/src/cli/commands/ai-generate.d.ts +39 -0
- package/dist/src/cli/commands/ai-generate.d.ts.map +1 -0
- package/dist/src/cli/commands/ai-generate.js +146 -0
- package/dist/src/cli/commands/ai-generate.js.map +1 -0
- package/dist/src/cli/commands/install.d.ts +7 -0
- package/dist/src/cli/commands/install.d.ts.map +1 -0
- package/dist/src/cli/commands/install.js +146 -0
- package/dist/src/cli/commands/install.js.map +1 -0
- package/dist/src/cli/commands/list.d.ts +6 -0
- package/dist/src/cli/commands/list.d.ts.map +1 -0
- package/dist/src/cli/commands/list.js +158 -0
- package/dist/src/cli/commands/list.js.map +1 -0
- package/dist/src/cli/commands/search.d.ts +2 -0
- package/dist/src/cli/commands/search.d.ts.map +1 -0
- package/dist/src/cli/commands/search.js +174 -0
- package/dist/src/cli/commands/search.js.map +1 -0
- package/dist/src/cli/commands/update.d.ts +2 -0
- package/dist/src/cli/commands/update.d.ts.map +1 -0
- package/dist/src/cli/commands/update.js +244 -0
- package/dist/src/cli/commands/update.js.map +1 -0
- package/dist/src/cli/policy-converter.d.ts +10 -0
- package/dist/src/cli/policy-converter.d.ts.map +1 -0
- package/dist/src/cli/policy-converter.js +188 -0
- package/dist/src/cli/policy-converter.js.map +1 -0
- package/dist/src/cli/utils/error-handler.d.ts +4 -0
- package/dist/src/cli/utils/error-handler.d.ts.map +1 -0
- package/dist/src/cli/utils/error-handler.js +91 -0
- package/dist/src/cli/utils/error-handler.js.map +1 -0
- package/dist/src/cli/utils/logger.d.ts +8 -0
- package/dist/src/cli/utils/logger.d.ts.map +1 -0
- package/dist/src/cli/utils/logger.js +20 -0
- package/dist/src/cli/utils/logger.js.map +1 -0
- package/dist/src/config/config-service.d.ts +79 -0
- package/dist/src/config/config-service.d.ts.map +1 -0
- package/dist/src/config/config-service.js +112 -0
- package/dist/src/config/config-service.js.map +1 -0
- package/dist/src/config/effect_config.d.ts +111 -0
- package/dist/src/config/effect_config.d.ts.map +1 -0
- package/dist/src/config/effect_config.js +248 -0
- package/dist/src/config/effect_config.js.map +1 -0
- package/dist/src/config/effects.d.ts +33 -0
- package/dist/src/config/effects.d.ts.map +1 -0
- package/dist/src/config/effects.js +34 -0
- package/dist/src/config/effects.js.map +1 -0
- package/dist/src/config/lexicons/de-DE.d.ts +12 -0
- package/dist/src/config/lexicons/de-DE.d.ts.map +1 -0
- package/dist/src/config/lexicons/de-DE.js +129 -0
- package/dist/src/config/lexicons/de-DE.js.map +1 -0
- package/dist/src/config/lexicons/en-US.d.ts +15 -0
- package/dist/src/config/lexicons/en-US.d.ts.map +1 -0
- package/dist/src/config/lexicons/en-US.js +136 -0
- package/dist/src/config/lexicons/en-US.js.map +1 -0
- package/dist/src/config/lexicons/identifiers/domains/finance.loan.zh-CN.d.ts +13 -0
- package/dist/src/config/lexicons/identifiers/domains/finance.loan.zh-CN.d.ts.map +1 -0
- package/dist/src/config/lexicons/identifiers/domains/finance.loan.zh-CN.js +307 -0
- package/dist/src/config/lexicons/identifiers/domains/finance.loan.zh-CN.js.map +1 -0
- package/dist/src/config/lexicons/identifiers/domains/insurance.auto.zh-CN.d.ts +25 -0
- package/dist/src/config/lexicons/identifiers/domains/insurance.auto.zh-CN.d.ts.map +1 -0
- package/dist/src/config/lexicons/identifiers/domains/insurance.auto.zh-CN.js +355 -0
- package/dist/src/config/lexicons/identifiers/domains/insurance.auto.zh-CN.js.map +1 -0
- package/dist/src/config/lexicons/identifiers/examples/canonicalizer-integration.d.ts +47 -0
- package/dist/src/config/lexicons/identifiers/examples/canonicalizer-integration.d.ts.map +1 -0
- package/dist/src/config/lexicons/identifiers/examples/canonicalizer-integration.js +142 -0
- package/dist/src/config/lexicons/identifiers/examples/canonicalizer-integration.js.map +1 -0
- package/dist/src/config/lexicons/identifiers/index.d.ts +34 -0
- package/dist/src/config/lexicons/identifiers/index.d.ts.map +1 -0
- package/dist/src/config/lexicons/identifiers/index.js +37 -0
- package/dist/src/config/lexicons/identifiers/index.js.map +1 -0
- package/dist/src/config/lexicons/identifiers/registry.d.ts +112 -0
- package/dist/src/config/lexicons/identifiers/registry.d.ts.map +1 -0
- package/dist/src/config/lexicons/identifiers/registry.js +188 -0
- package/dist/src/config/lexicons/identifiers/registry.js.map +1 -0
- package/dist/src/config/lexicons/identifiers/types.d.ts +129 -0
- package/dist/src/config/lexicons/identifiers/types.d.ts.map +1 -0
- package/dist/src/config/lexicons/identifiers/types.js +146 -0
- package/dist/src/config/lexicons/identifiers/types.js.map +1 -0
- package/dist/src/config/lexicons/index.d.ts +33 -0
- package/dist/src/config/lexicons/index.d.ts.map +1 -0
- package/dist/src/config/lexicons/index.js +50 -0
- package/dist/src/config/lexicons/index.js.map +1 -0
- package/dist/src/config/lexicons/registry.d.ts +41 -0
- package/dist/src/config/lexicons/registry.d.ts.map +1 -0
- package/dist/src/config/lexicons/registry.js +205 -0
- package/dist/src/config/lexicons/registry.js.map +1 -0
- package/dist/src/config/lexicons/template.d.ts +67 -0
- package/dist/src/config/lexicons/template.d.ts.map +1 -0
- package/dist/src/config/lexicons/template.js +442 -0
- package/dist/src/config/lexicons/template.js.map +1 -0
- package/dist/src/config/lexicons/types.d.ts +169 -0
- package/dist/src/config/lexicons/types.d.ts.map +1 -0
- package/dist/src/config/lexicons/types.js +62 -0
- package/dist/src/config/lexicons/types.js.map +1 -0
- package/dist/src/config/lexicons/zh-CN.d.ts +21 -0
- package/dist/src/config/lexicons/zh-CN.d.ts.map +1 -0
- package/dist/src/config/lexicons/zh-CN.js +139 -0
- package/dist/src/config/lexicons/zh-CN.js.map +1 -0
- package/dist/src/config/runtime.d.ts +2 -0
- package/dist/src/config/runtime.d.ts.map +1 -0
- package/dist/src/config/runtime.js +13 -0
- package/dist/src/config/runtime.js.map +1 -0
- package/dist/src/config/semantic.d.ts +262 -0
- package/dist/src/config/semantic.d.ts.map +1 -0
- package/dist/src/config/semantic.js +394 -0
- package/dist/src/config/semantic.js.map +1 -0
- package/dist/src/config/token-kind.d.ts +177 -0
- package/dist/src/config/token-kind.d.ts.map +1 -0
- package/dist/src/config/token-kind.js +298 -0
- package/dist/src/config/token-kind.js.map +1 -0
- package/dist/src/core/core_ir.d.ts +50 -0
- package/dist/src/core/core_ir.d.ts.map +1 -0
- package/dist/src/core/core_ir.js +139 -0
- package/dist/src/core/core_ir.js.map +1 -0
- package/dist/src/core/core_ir_json.d.ts +62 -0
- package/dist/src/core/core_ir_json.d.ts.map +1 -0
- package/dist/src/core/core_ir_json.js +81 -0
- package/dist/src/core/core_ir_json.js.map +1 -0
- package/dist/src/core/index.d.ts +18 -0
- package/dist/src/core/index.d.ts.map +1 -0
- package/dist/src/core/index.js +16 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/pretty_core.d.ts +3 -0
- package/dist/src/core/pretty_core.d.ts.map +1 -0
- package/dist/src/core/pretty_core.js +177 -0
- package/dist/src/core/pretty_core.js.map +1 -0
- package/dist/src/core/visitor.d.ts +51 -0
- package/dist/src/core/visitor.d.ts.map +1 -0
- package/dist/src/core/visitor.js +117 -0
- package/dist/src/core/visitor.js.map +1 -0
- package/dist/src/cst/cst.d.ts +32 -0
- package/dist/src/cst/cst.d.ts.map +1 -0
- package/dist/src/cst/cst.js +2 -0
- package/dist/src/cst/cst.js.map +1 -0
- package/dist/src/cst/cst_builder.d.ts +5 -0
- package/dist/src/cst/cst_builder.d.ts.map +1 -0
- package/dist/src/cst/cst_builder.js +101 -0
- package/dist/src/cst/cst_builder.js.map +1 -0
- package/dist/src/cst/cst_printer.d.ts +8 -0
- package/dist/src/cst/cst_printer.d.ts.map +1 -0
- package/dist/src/cst/cst_printer.js +47 -0
- package/dist/src/cst/cst_printer.js.map +1 -0
- package/dist/src/cst/index.d.ts +14 -0
- package/dist/src/cst/index.d.ts.map +1 -0
- package/dist/src/cst/index.js +13 -0
- package/dist/src/cst/index.js.map +1 -0
- package/dist/src/diagnostics/diagnostics.d.ts +138 -0
- package/dist/src/diagnostics/diagnostics.d.ts.map +1 -0
- package/dist/src/diagnostics/diagnostics.js +249 -0
- package/dist/src/diagnostics/diagnostics.js.map +1 -0
- package/dist/src/diagnostics/error_codes.d.ts +88 -0
- package/dist/src/diagnostics/error_codes.d.ts.map +1 -0
- package/dist/src/diagnostics/error_codes.js +551 -0
- package/dist/src/diagnostics/error_codes.js.map +1 -0
- package/dist/src/diagnostics/index.d.ts +14 -0
- package/dist/src/diagnostics/index.d.ts.map +1 -0
- package/dist/src/diagnostics/index.js +14 -0
- package/dist/src/diagnostics/index.js.map +1 -0
- package/dist/src/effects/capabilities.d.ts +18 -0
- package/dist/src/effects/capabilities.d.ts.map +1 -0
- package/dist/src/effects/capabilities.js +101 -0
- package/dist/src/effects/capabilities.js.map +1 -0
- package/dist/src/effects/effect_inference.d.ts +17 -0
- package/dist/src/effects/effect_inference.d.ts.map +1 -0
- package/dist/src/effects/effect_inference.js +557 -0
- package/dist/src/effects/effect_inference.js.map +1 -0
- package/dist/src/effects/effect_signature.d.ts +13 -0
- package/dist/src/effects/effect_signature.d.ts.map +1 -0
- package/dist/src/effects/effect_signature.js +2 -0
- package/dist/src/effects/effect_signature.js.map +1 -0
- package/dist/src/effects/index.d.ts +14 -0
- package/dist/src/effects/index.d.ts.map +1 -0
- package/dist/src/effects/index.js +13 -0
- package/dist/src/effects/index.js.map +1 -0
- package/dist/src/formatter.d.ts +7 -0
- package/dist/src/formatter.d.ts.map +1 -0
- package/dist/src/formatter.js +383 -0
- package/dist/src/formatter.js.map +1 -0
- package/dist/src/frontend/canonicalizer.d.ts +55 -0
- package/dist/src/frontend/canonicalizer.d.ts.map +1 -0
- package/dist/src/frontend/canonicalizer.js +348 -0
- package/dist/src/frontend/canonicalizer.js.map +1 -0
- package/dist/src/frontend/index.d.ts +17 -0
- package/dist/src/frontend/index.d.ts.map +1 -0
- package/dist/src/frontend/index.js +16 -0
- package/dist/src/frontend/index.js.map +1 -0
- package/dist/src/frontend/keyword-translator.d.ts +134 -0
- package/dist/src/frontend/keyword-translator.d.ts.map +1 -0
- package/dist/src/frontend/keyword-translator.js +188 -0
- package/dist/src/frontend/keyword-translator.js.map +1 -0
- package/dist/src/frontend/lexer.d.ts +59 -0
- package/dist/src/frontend/lexer.d.ts.map +1 -0
- package/dist/src/frontend/lexer.js +536 -0
- package/dist/src/frontend/lexer.js.map +1 -0
- package/dist/src/frontend/tokens.d.ts +12 -0
- package/dist/src/frontend/tokens.d.ts.map +1 -0
- package/dist/src/frontend/tokens.js +12 -0
- package/dist/src/frontend/tokens.js.map +1 -0
- package/dist/src/index.d.ts +36 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +37 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/jvm/emitter.d.ts +3 -0
- package/dist/src/jvm/emitter.d.ts.map +1 -0
- package/dist/src/jvm/emitter.js +609 -0
- package/dist/src/jvm/emitter.js.map +1 -0
- package/dist/src/lower_to_core.d.ts +53 -0
- package/dist/src/lower_to_core.d.ts.map +1 -0
- package/dist/src/lower_to_core.js +528 -0
- package/dist/src/lower_to_core.js.map +1 -0
- package/dist/src/lsp/analysis.d.ts +50 -0
- package/dist/src/lsp/analysis.d.ts.map +1 -0
- package/dist/src/lsp/analysis.js +399 -0
- package/dist/src/lsp/analysis.js.map +1 -0
- package/dist/src/lsp/codeaction.d.ts +21 -0
- package/dist/src/lsp/codeaction.d.ts.map +1 -0
- package/dist/src/lsp/codeaction.js +531 -0
- package/dist/src/lsp/codeaction.js.map +1 -0
- package/dist/src/lsp/completion.d.ts +81 -0
- package/dist/src/lsp/completion.d.ts.map +1 -0
- package/dist/src/lsp/completion.js +345 -0
- package/dist/src/lsp/completion.js.map +1 -0
- package/dist/src/lsp/config.d.ts +34 -0
- package/dist/src/lsp/config.d.ts.map +1 -0
- package/dist/src/lsp/config.js +23 -0
- package/dist/src/lsp/config.js.map +1 -0
- package/dist/src/lsp/diagnostics.d.ts +87 -0
- package/dist/src/lsp/diagnostics.d.ts.map +1 -0
- package/dist/src/lsp/diagnostics.js +474 -0
- package/dist/src/lsp/diagnostics.js.map +1 -0
- package/dist/src/lsp/formatting.d.ts +16 -0
- package/dist/src/lsp/formatting.d.ts.map +1 -0
- package/dist/src/lsp/formatting.js +75 -0
- package/dist/src/lsp/formatting.js.map +1 -0
- package/dist/src/lsp/health.d.ts +74 -0
- package/dist/src/lsp/health.d.ts.map +1 -0
- package/dist/src/lsp/health.js +106 -0
- package/dist/src/lsp/health.js.map +1 -0
- package/dist/src/lsp/index.d.ts +14 -0
- package/dist/src/lsp/index.d.ts.map +1 -0
- package/dist/src/lsp/index.js +17 -0
- package/dist/src/lsp/index.js.map +1 -0
- package/dist/src/lsp/module_cache.d.ts +39 -0
- package/dist/src/lsp/module_cache.d.ts.map +1 -0
- package/dist/src/lsp/module_cache.js +308 -0
- package/dist/src/lsp/module_cache.js.map +1 -0
- package/dist/src/lsp/navigation/definition.d.ts +20 -0
- package/dist/src/lsp/navigation/definition.d.ts.map +1 -0
- package/dist/src/lsp/navigation/definition.js +96 -0
- package/dist/src/lsp/navigation/definition.js.map +1 -0
- package/dist/src/lsp/navigation/document-symbol.d.ts +20 -0
- package/dist/src/lsp/navigation/document-symbol.d.ts.map +1 -0
- package/dist/src/lsp/navigation/document-symbol.js +196 -0
- package/dist/src/lsp/navigation/document-symbol.js.map +1 -0
- package/dist/src/lsp/navigation/hover.d.ts +20 -0
- package/dist/src/lsp/navigation/hover.d.ts.map +1 -0
- package/dist/src/lsp/navigation/hover.js +147 -0
- package/dist/src/lsp/navigation/hover.js.map +1 -0
- package/dist/src/lsp/navigation/references.d.ts +17 -0
- package/dist/src/lsp/navigation/references.d.ts.map +1 -0
- package/dist/src/lsp/navigation/references.js +104 -0
- package/dist/src/lsp/navigation/references.js.map +1 -0
- package/dist/src/lsp/navigation/rename.d.ts +22 -0
- package/dist/src/lsp/navigation/rename.d.ts.map +1 -0
- package/dist/src/lsp/navigation/rename.js +161 -0
- package/dist/src/lsp/navigation/rename.js.map +1 -0
- package/dist/src/lsp/navigation/shared.d.ts +175 -0
- package/dist/src/lsp/navigation/shared.d.ts.map +1 -0
- package/dist/src/lsp/navigation/shared.js +470 -0
- package/dist/src/lsp/navigation/shared.js.map +1 -0
- package/dist/src/lsp/navigation.d.ts +23 -0
- package/dist/src/lsp/navigation.d.ts.map +1 -0
- package/dist/src/lsp/navigation.js +28 -0
- package/dist/src/lsp/navigation.js.map +1 -0
- package/dist/src/lsp/pii_diagnostics.d.ts +15 -0
- package/dist/src/lsp/pii_diagnostics.d.ts.map +1 -0
- package/dist/src/lsp/pii_diagnostics.js +624 -0
- package/dist/src/lsp/pii_diagnostics.js.map +1 -0
- package/dist/src/lsp/server.d.ts +3 -0
- package/dist/src/lsp/server.d.ts.map +1 -0
- package/dist/src/lsp/server.js +406 -0
- package/dist/src/lsp/server.js.map +1 -0
- package/dist/src/lsp/shared-state.d.ts +15 -0
- package/dist/src/lsp/shared-state.d.ts.map +1 -0
- package/dist/src/lsp/shared-state.js +21 -0
- package/dist/src/lsp/shared-state.js.map +1 -0
- package/dist/src/lsp/symbols.d.ts +35 -0
- package/dist/src/lsp/symbols.d.ts.map +1 -0
- package/dist/src/lsp/symbols.js +124 -0
- package/dist/src/lsp/symbols.js.map +1 -0
- package/dist/src/lsp/task-queue.d.ts +172 -0
- package/dist/src/lsp/task-queue.d.ts.map +1 -0
- package/dist/src/lsp/task-queue.js +310 -0
- package/dist/src/lsp/task-queue.js.map +1 -0
- package/dist/src/lsp/token-index.d.ts +45 -0
- package/dist/src/lsp/token-index.d.ts.map +1 -0
- package/dist/src/lsp/token-index.js +114 -0
- package/dist/src/lsp/token-index.js.map +1 -0
- package/dist/src/lsp/tokens.d.ts +33 -0
- package/dist/src/lsp/tokens.d.ts.map +1 -0
- package/dist/src/lsp/tokens.js +259 -0
- package/dist/src/lsp/tokens.js.map +1 -0
- package/dist/src/lsp/type-guards.d.ts +80 -0
- package/dist/src/lsp/type-guards.d.ts.map +1 -0
- package/dist/src/lsp/type-guards.js +132 -0
- package/dist/src/lsp/type-guards.js.map +1 -0
- package/dist/src/lsp/utils.d.ts +4 -0
- package/dist/src/lsp/utils.d.ts.map +1 -0
- package/dist/src/lsp/utils.js +52 -0
- package/dist/src/lsp/utils.js.map +1 -0
- package/dist/src/lsp/workspace/document-indexer.d.ts +14 -0
- package/dist/src/lsp/workspace/document-indexer.d.ts.map +1 -0
- package/dist/src/lsp/workspace/document-indexer.js +88 -0
- package/dist/src/lsp/workspace/document-indexer.js.map +1 -0
- package/dist/src/lsp/workspace/file-watcher.d.ts +137 -0
- package/dist/src/lsp/workspace/file-watcher.d.ts.map +1 -0
- package/dist/src/lsp/workspace/file-watcher.js +307 -0
- package/dist/src/lsp/workspace/file-watcher.js.map +1 -0
- package/dist/src/lsp/workspace/index-manager.d.ts +48 -0
- package/dist/src/lsp/workspace/index-manager.d.ts.map +1 -0
- package/dist/src/lsp/workspace/index-manager.js +131 -0
- package/dist/src/lsp/workspace/index-manager.js.map +1 -0
- package/dist/src/lsp/workspace/symbol-finder.d.ts +13 -0
- package/dist/src/lsp/workspace/symbol-finder.d.ts.map +1 -0
- package/dist/src/lsp/workspace/symbol-finder.js +69 -0
- package/dist/src/lsp/workspace/symbol-finder.js.map +1 -0
- package/dist/src/lsp/workspace/types.d.ts +77 -0
- package/dist/src/lsp/workspace/types.d.ts.map +1 -0
- package/dist/src/lsp/workspace/types.js +6 -0
- package/dist/src/lsp/workspace/types.js.map +1 -0
- package/dist/src/lsp/workspace/workspace-scanner.d.ts +11 -0
- package/dist/src/lsp/workspace/workspace-scanner.d.ts.map +1 -0
- package/dist/src/lsp/workspace/workspace-scanner.js +115 -0
- package/dist/src/lsp/workspace/workspace-scanner.js.map +1 -0
- package/dist/src/manifest.d.ts +48 -0
- package/dist/src/manifest.d.ts.map +1 -0
- package/dist/src/manifest.js +10 -0
- package/dist/src/manifest.js.map +1 -0
- package/dist/src/package/config.d.ts +28 -0
- package/dist/src/package/config.d.ts.map +1 -0
- package/dist/src/package/config.js +59 -0
- package/dist/src/package/config.js.map +1 -0
- package/dist/src/package/dependency-graph.d.ts +42 -0
- package/dist/src/package/dependency-graph.d.ts.map +1 -0
- package/dist/src/package/dependency-graph.js +144 -0
- package/dist/src/package/dependency-graph.js.map +1 -0
- package/dist/src/package/lockfile.d.ts +20 -0
- package/dist/src/package/lockfile.d.ts.map +1 -0
- package/dist/src/package/lockfile.js +146 -0
- package/dist/src/package/lockfile.js.map +1 -0
- package/dist/src/package/manifest-parser.d.ts +22 -0
- package/dist/src/package/manifest-parser.d.ts.map +1 -0
- package/dist/src/package/manifest-parser.js +275 -0
- package/dist/src/package/manifest-parser.js.map +1 -0
- package/dist/src/package/package-cache.d.ts +56 -0
- package/dist/src/package/package-cache.d.ts.map +1 -0
- package/dist/src/package/package-cache.js +166 -0
- package/dist/src/package/package-cache.js.map +1 -0
- package/dist/src/package/package-installer.d.ts +67 -0
- package/dist/src/package/package-installer.d.ts.map +1 -0
- package/dist/src/package/package-installer.js +310 -0
- package/dist/src/package/package-installer.js.map +1 -0
- package/dist/src/package/package-registry.d.ts +70 -0
- package/dist/src/package/package-registry.d.ts.map +1 -0
- package/dist/src/package/package-registry.js +480 -0
- package/dist/src/package/package-registry.js.map +1 -0
- package/dist/src/package/resolver.d.ts +50 -0
- package/dist/src/package/resolver.d.ts.map +1 -0
- package/dist/src/package/resolver.js +236 -0
- package/dist/src/package/resolver.js.map +1 -0
- package/dist/src/package/version-utils.d.ts +53 -0
- package/dist/src/package/version-utils.d.ts.map +1 -0
- package/dist/src/package/version-utils.js +61 -0
- package/dist/src/package/version-utils.js.map +1 -0
- package/dist/src/parser/constraint-parser.d.ts +42 -0
- package/dist/src/parser/constraint-parser.d.ts.map +1 -0
- package/dist/src/parser/constraint-parser.js +192 -0
- package/dist/src/parser/constraint-parser.js.map +1 -0
- package/dist/src/parser/context.d.ts +56 -0
- package/dist/src/parser/context.d.ts.map +1 -0
- package/dist/src/parser/context.js +177 -0
- package/dist/src/parser/context.js.map +1 -0
- package/dist/src/parser/decl-parser.d.ts +52 -0
- package/dist/src/parser/decl-parser.d.ts.map +1 -0
- package/dist/src/parser/decl-parser.js +461 -0
- package/dist/src/parser/decl-parser.js.map +1 -0
- package/dist/src/parser/expr-stmt-parser.d.ts +51 -0
- package/dist/src/parser/expr-stmt-parser.d.ts.map +1 -0
- package/dist/src/parser/expr-stmt-parser.js +1317 -0
- package/dist/src/parser/expr-stmt-parser.js.map +1 -0
- package/dist/src/parser/field-variant-parser.d.ts +47 -0
- package/dist/src/parser/field-variant-parser.d.ts.map +1 -0
- package/dist/src/parser/field-variant-parser.js +142 -0
- package/dist/src/parser/field-variant-parser.js.map +1 -0
- package/dist/src/parser/import-parser.d.ts +40 -0
- package/dist/src/parser/import-parser.d.ts.map +1 -0
- package/dist/src/parser/import-parser.js +91 -0
- package/dist/src/parser/import-parser.js.map +1 -0
- package/dist/src/parser/parser-tools.d.ts +52 -0
- package/dist/src/parser/parser-tools.d.ts.map +1 -0
- package/dist/src/parser/parser-tools.js +50 -0
- package/dist/src/parser/parser-tools.js.map +1 -0
- package/dist/src/parser/span-utils.d.ts +16 -0
- package/dist/src/parser/span-utils.d.ts.map +1 -0
- package/dist/src/parser/span-utils.js +90 -0
- package/dist/src/parser/span-utils.js.map +1 -0
- package/dist/src/parser/type-inference.d.ts +90 -0
- package/dist/src/parser/type-inference.d.ts.map +1 -0
- package/dist/src/parser/type-inference.js +287 -0
- package/dist/src/parser/type-inference.js.map +1 -0
- package/dist/src/parser/type-parser.d.ts +24 -0
- package/dist/src/parser/type-parser.d.ts.map +1 -0
- package/dist/src/parser/type-parser.js +338 -0
- package/dist/src/parser/type-parser.js.map +1 -0
- package/dist/src/parser.d.ts +12 -0
- package/dist/src/parser.d.ts.map +1 -0
- package/dist/src/parser.js +25 -0
- package/dist/src/parser.js.map +1 -0
- package/dist/src/typecheck/async.d.ts +57 -0
- package/dist/src/typecheck/async.d.ts.map +1 -0
- package/dist/src/typecheck/async.js +369 -0
- package/dist/src/typecheck/async.js.map +1 -0
- package/dist/src/typecheck/capabilities.d.ts +20 -0
- package/dist/src/typecheck/capabilities.d.ts.map +1 -0
- package/dist/src/typecheck/capabilities.js +86 -0
- package/dist/src/typecheck/capabilities.js.map +1 -0
- package/dist/src/typecheck/context.d.ts +31 -0
- package/dist/src/typecheck/context.d.ts.map +1 -0
- package/dist/src/typecheck/context.js +34 -0
- package/dist/src/typecheck/context.js.map +1 -0
- package/dist/src/typecheck/diagnostics.d.ts +15 -0
- package/dist/src/typecheck/diagnostics.d.ts.map +1 -0
- package/dist/src/typecheck/diagnostics.js +92 -0
- package/dist/src/typecheck/diagnostics.js.map +1 -0
- package/dist/src/typecheck/effects.d.ts +16 -0
- package/dist/src/typecheck/effects.d.ts.map +1 -0
- package/dist/src/typecheck/effects.js +122 -0
- package/dist/src/typecheck/effects.js.map +1 -0
- package/dist/src/typecheck/expression.d.ts +12 -0
- package/dist/src/typecheck/expression.d.ts.map +1 -0
- package/dist/src/typecheck/expression.js +306 -0
- package/dist/src/typecheck/expression.js.map +1 -0
- package/dist/src/typecheck/generics.d.ts +6 -0
- package/dist/src/typecheck/generics.d.ts.map +1 -0
- package/dist/src/typecheck/generics.js +131 -0
- package/dist/src/typecheck/generics.js.map +1 -0
- package/dist/src/typecheck/index.d.ts +6 -0
- package/dist/src/typecheck/index.d.ts.map +1 -0
- package/dist/src/typecheck/index.js +3 -0
- package/dist/src/typecheck/index.js.map +1 -0
- package/dist/src/typecheck/module.d.ts +9 -0
- package/dist/src/typecheck/module.d.ts.map +1 -0
- package/dist/src/typecheck/module.js +223 -0
- package/dist/src/typecheck/module.js.map +1 -0
- package/dist/src/typecheck/pattern.d.ts +6 -0
- package/dist/src/typecheck/pattern.d.ts.map +1 -0
- package/dist/src/typecheck/pattern.js +80 -0
- package/dist/src/typecheck/pattern.js.map +1 -0
- package/dist/src/typecheck/statement.d.ts +13 -0
- package/dist/src/typecheck/statement.d.ts.map +1 -0
- package/dist/src/typecheck/statement.js +176 -0
- package/dist/src/typecheck/statement.js.map +1 -0
- package/dist/src/typecheck/symbol_table.d.ts +63 -0
- package/dist/src/typecheck/symbol_table.d.ts.map +1 -0
- package/dist/src/typecheck/symbol_table.js +208 -0
- package/dist/src/typecheck/symbol_table.js.map +1 -0
- package/dist/src/typecheck/type_system.d.ts +30 -0
- package/dist/src/typecheck/type_system.d.ts.map +1 -0
- package/dist/src/typecheck/type_system.js +529 -0
- package/dist/src/typecheck/type_system.js.map +1 -0
- package/dist/src/typecheck/utils.d.ts +45 -0
- package/dist/src/typecheck/utils.d.ts.map +1 -0
- package/dist/src/typecheck/utils.js +110 -0
- package/dist/src/typecheck/utils.js.map +1 -0
- package/dist/src/typecheck/workflow.d.ts +8 -0
- package/dist/src/typecheck/workflow.d.ts.map +1 -0
- package/dist/src/typecheck/workflow.js +247 -0
- package/dist/src/typecheck/workflow.js.map +1 -0
- package/dist/src/typecheck-pii.d.ts +3 -0
- package/dist/src/typecheck-pii.d.ts.map +1 -0
- package/dist/src/typecheck-pii.js +534 -0
- package/dist/src/typecheck-pii.js.map +1 -0
- package/dist/src/typecheck.d.ts +7 -0
- package/dist/src/typecheck.d.ts.map +1 -0
- package/dist/src/typecheck.js +2 -0
- package/dist/src/typecheck.js.map +1 -0
- package/dist/src/types/base.d.ts +423 -0
- package/dist/src/types/base.d.ts.map +1 -0
- package/dist/src/types/base.js +18 -0
- package/dist/src/types/base.js.map +1 -0
- package/dist/src/types.d.ts +531 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +47 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils/logger.d.ts +28 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/logger.js +60 -0
- package/dist/src/utils/logger.js.map +1 -0
- package/dist/test/benchmark.d.ts +3 -0
- package/dist/test/benchmark.d.ts.map +1 -0
- package/dist/test/benchmark.js +106 -0
- package/dist/test/benchmark.js.map +1 -0
- package/dist/test/cli/commands/install.test.d.ts +2 -0
- package/dist/test/cli/commands/install.test.d.ts.map +1 -0
- package/dist/test/cli/commands/install.test.js +97 -0
- package/dist/test/cli/commands/install.test.js.map +1 -0
- package/dist/test/cli/commands/list.test.d.ts +2 -0
- package/dist/test/cli/commands/list.test.d.ts.map +1 -0
- package/dist/test/cli/commands/list.test.js +98 -0
- package/dist/test/cli/commands/list.test.js.map +1 -0
- package/dist/test/cli/commands/search.test.d.ts +2 -0
- package/dist/test/cli/commands/search.test.d.ts.map +1 -0
- package/dist/test/cli/commands/search.test.js +133 -0
- package/dist/test/cli/commands/search.test.js.map +1 -0
- package/dist/test/cli/commands/update.test.d.ts +2 -0
- package/dist/test/cli/commands/update.test.d.ts.map +1 -0
- package/dist/test/cli/commands/update.test.js +205 -0
- package/dist/test/cli/commands/update.test.js.map +1 -0
- package/dist/test/cli/integration.test.d.ts +2 -0
- package/dist/test/cli/integration.test.d.ts.map +1 -0
- package/dist/test/cli/integration.test.js +51 -0
- package/dist/test/cli/integration.test.js.map +1 -0
- package/dist/test/cli/registry-utils.d.ts +6 -0
- package/dist/test/cli/registry-utils.d.ts.map +1 -0
- package/dist/test/cli/registry-utils.js +35 -0
- package/dist/test/cli/registry-utils.js.map +1 -0
- package/dist/test/cli/utils/error-handler.test.d.ts +2 -0
- package/dist/test/cli/utils/error-handler.test.d.ts.map +1 -0
- package/dist/test/cli/utils/error-handler.test.js +108 -0
- package/dist/test/cli/utils/error-handler.test.js.map +1 -0
- package/dist/test/compiler/depends-on.test.d.ts +2 -0
- package/dist/test/compiler/depends-on.test.d.ts.map +1 -0
- package/dist/test/compiler/depends-on.test.js +184 -0
- package/dist/test/compiler/depends-on.test.js.map +1 -0
- package/dist/test/compiler/inventory-capability.test.d.ts +2 -0
- package/dist/test/compiler/inventory-capability.test.d.ts.map +1 -0
- package/dist/test/compiler/inventory-capability.test.js +22 -0
- package/dist/test/compiler/inventory-capability.test.js.map +1 -0
- package/dist/test/compiler/payment-capability.test.d.ts +2 -0
- package/dist/test/compiler/payment-capability.test.d.ts.map +1 -0
- package/dist/test/compiler/payment-capability.test.js +22 -0
- package/dist/test/compiler/payment-capability.test.js.map +1 -0
- package/dist/test/compiler/workflow-emitter-helpers.d.ts +3 -0
- package/dist/test/compiler/workflow-emitter-helpers.d.ts.map +1 -0
- package/dist/test/compiler/workflow-emitter-helpers.js +44 -0
- package/dist/test/compiler/workflow-emitter-helpers.js.map +1 -0
- package/dist/test/e2e/package-management.test.d.ts +2 -0
- package/dist/test/e2e/package-management.test.d.ts.map +1 -0
- package/dist/test/e2e/package-management.test.js +51 -0
- package/dist/test/e2e/package-management.test.js.map +1 -0
- package/dist/test/e2e/runner/golden-runner.d.ts +3 -0
- package/dist/test/e2e/runner/golden-runner.d.ts.map +1 -0
- package/dist/test/e2e/runner/golden-runner.js +212 -0
- package/dist/test/e2e/runner/golden-runner.js.map +1 -0
- package/dist/test/fuzz/formatter-fuzz.test.d.ts +3 -0
- package/dist/test/fuzz/formatter-fuzz.test.d.ts.map +1 -0
- package/dist/test/fuzz/formatter-fuzz.test.js +44 -0
- package/dist/test/fuzz/formatter-fuzz.test.js.map +1 -0
- package/dist/test/fuzz/fuzz.test.d.ts +3 -0
- package/dist/test/fuzz/fuzz.test.d.ts.map +1 -0
- package/dist/test/fuzz/fuzz.test.js +141 -0
- package/dist/test/fuzz/fuzz.test.js.map +1 -0
- package/dist/test/fuzz/lossless-fuzz.test.d.ts +3 -0
- package/dist/test/fuzz/lossless-fuzz.test.d.ts.map +1 -0
- package/dist/test/fuzz/lossless-fuzz.test.js +116 -0
- package/dist/test/fuzz/lossless-fuzz.test.js.map +1 -0
- package/dist/test/generators.d.ts +53 -0
- package/dist/test/generators.d.ts.map +1 -0
- package/dist/test/generators.js +253 -0
- package/dist/test/generators.js.map +1 -0
- package/dist/test/helpers/test-factories.d.ts +24 -0
- package/dist/test/helpers/test-factories.d.ts.map +1 -0
- package/dist/test/helpers/test-factories.js +30 -0
- package/dist/test/helpers/test-factories.js.map +1 -0
- package/dist/test/helpers/test-utils.d.ts +19 -0
- package/dist/test/helpers/test-utils.d.ts.map +1 -0
- package/dist/test/helpers/test-utils.js +30 -0
- package/dist/test/helpers/test-utils.js.map +1 -0
- package/dist/test/integration/capabilities/capabilities.test.d.ts +3 -0
- package/dist/test/integration/capabilities/capabilities.test.d.ts.map +1 -0
- package/dist/test/integration/capabilities/capabilities.test.js +63 -0
- package/dist/test/integration/capabilities/capabilities.test.js.map +1 -0
- package/dist/test/integration/capabilities/config-service.test.d.ts +11 -0
- package/dist/test/integration/capabilities/config-service.test.d.ts.map +1 -0
- package/dist/test/integration/capabilities/config-service.test.js +125 -0
- package/dist/test/integration/capabilities/config-service.test.js.map +1 -0
- package/dist/test/integration/capabilities/effect-config.test.d.ts +3 -0
- package/dist/test/integration/capabilities/effect-config.test.d.ts.map +1 -0
- package/dist/test/integration/capabilities/effect-config.test.js +196 -0
- package/dist/test/integration/capabilities/effect-config.test.js.map +1 -0
- package/dist/test/integration/compliance/compliance-smoke.test.d.ts +14 -0
- package/dist/test/integration/compliance/compliance-smoke.test.d.ts.map +1 -0
- package/dist/test/integration/compliance/compliance-smoke.test.js +222 -0
- package/dist/test/integration/compliance/compliance-smoke.test.js.map +1 -0
- package/dist/test/integration/lsp/lsp-client-helper.test.d.ts +7 -0
- package/dist/test/integration/lsp/lsp-client-helper.test.d.ts.map +1 -0
- package/dist/test/integration/lsp/lsp-client-helper.test.js +45 -0
- package/dist/test/integration/lsp/lsp-client-helper.test.js.map +1 -0
- package/dist/test/integration/lsp/lsp-completion.test.d.ts +7 -0
- package/dist/test/integration/lsp/lsp-completion.test.d.ts.map +1 -0
- package/dist/test/integration/lsp/lsp-completion.test.js +178 -0
- package/dist/test/integration/lsp/lsp-completion.test.js.map +1 -0
- package/dist/test/integration/lsp/lsp-diagnostics.test.d.ts +7 -0
- package/dist/test/integration/lsp/lsp-diagnostics.test.d.ts.map +1 -0
- package/dist/test/integration/lsp/lsp-diagnostics.test.js +105 -0
- package/dist/test/integration/lsp/lsp-diagnostics.test.js.map +1 -0
- package/dist/test/integration/lsp/lsp-file-watcher.test.d.ts +7 -0
- package/dist/test/integration/lsp/lsp-file-watcher.test.d.ts.map +1 -0
- package/dist/test/integration/lsp/lsp-file-watcher.test.js +401 -0
- package/dist/test/integration/lsp/lsp-file-watcher.test.js.map +1 -0
- package/dist/test/integration/lsp/lsp-health-metrics.test.d.ts +7 -0
- package/dist/test/integration/lsp/lsp-health-metrics.test.d.ts.map +1 -0
- package/dist/test/integration/lsp/lsp-health-metrics.test.js +285 -0
- package/dist/test/integration/lsp/lsp-health-metrics.test.js.map +1 -0
- package/dist/test/integration/lsp/lsp-modules.test.d.ts +7 -0
- package/dist/test/integration/lsp/lsp-modules.test.d.ts.map +1 -0
- package/dist/test/integration/lsp/lsp-modules.test.js +193 -0
- package/dist/test/integration/lsp/lsp-modules.test.js.map +1 -0
- package/dist/test/integration/lsp/lsp-multi-rename.test.d.ts +3 -0
- package/dist/test/integration/lsp/lsp-multi-rename.test.d.ts.map +1 -0
- package/dist/test/integration/lsp/lsp-multi-rename.test.js +81 -0
- package/dist/test/integration/lsp/lsp-multi-rename.test.js.map +1 -0
- package/dist/test/integration/lsp/lsp-navigation.test.d.ts +7 -0
- package/dist/test/integration/lsp/lsp-navigation.test.d.ts.map +1 -0
- package/dist/test/integration/lsp/lsp-navigation.test.js +332 -0
- package/dist/test/integration/lsp/lsp-navigation.test.js.map +1 -0
- package/dist/test/integration/lsp/lsp-process-lifecycle.test.d.ts +7 -0
- package/dist/test/integration/lsp/lsp-process-lifecycle.test.d.ts.map +1 -0
- package/dist/test/integration/lsp/lsp-process-lifecycle.test.js +257 -0
- package/dist/test/integration/lsp/lsp-process-lifecycle.test.js.map +1 -0
- package/dist/test/integration/lsp/lsp-task-queue.test.d.ts +7 -0
- package/dist/test/integration/lsp/lsp-task-queue.test.d.ts.map +1 -0
- package/dist/test/integration/lsp/lsp-task-queue.test.js +267 -0
- package/dist/test/integration/lsp/lsp-task-queue.test.js.map +1 -0
- package/dist/test/integration/pipeline/pipeline.test.d.ts +13 -0
- package/dist/test/integration/pipeline/pipeline.test.d.ts.map +1 -0
- package/dist/test/integration/pipeline/pipeline.test.js +310 -0
- package/dist/test/integration/pipeline/pipeline.test.js.map +1 -0
- package/dist/test/perf/perf-utils.test.d.ts +3 -0
- package/dist/test/perf/perf-utils.test.d.ts.map +1 -0
- package/dist/test/perf/perf-utils.test.js +144 -0
- package/dist/test/perf/perf-utils.test.js.map +1 -0
- package/dist/test/performance/package-installer.perf.test.d.ts +9 -0
- package/dist/test/performance/package-installer.perf.test.d.ts.map +1 -0
- package/dist/test/performance/package-installer.perf.test.js +80 -0
- package/dist/test/performance/package-installer.perf.test.js.map +1 -0
- package/dist/test/policy-converter/round-trip.test.d.ts +2 -0
- package/dist/test/policy-converter/round-trip.test.d.ts.map +1 -0
- package/dist/test/policy-converter/round-trip.test.js +83 -0
- package/dist/test/policy-converter/round-trip.test.js.map +1 -0
- package/dist/test/property/lsp-props.test.d.ts +3 -0
- package/dist/test/property/lsp-props.test.d.ts.map +1 -0
- package/dist/test/property/lsp-props.test.js +43 -0
- package/dist/test/property/lsp-props.test.js.map +1 -0
- package/dist/test/property/property.test.d.ts +3 -0
- package/dist/test/property/property.test.d.ts.map +1 -0
- package/dist/test/property/property.test.js +456 -0
- package/dist/test/property/property.test.js.map +1 -0
- package/dist/test/regression/type-checker-golden.test.d.ts +8 -0
- package/dist/test/regression/type-checker-golden.test.d.ts.map +1 -0
- package/dist/test/regression/type-checker-golden.test.js +172 -0
- package/dist/test/regression/type-checker-golden.test.js.map +1 -0
- package/dist/test/type-checker/cross-module-packages.test.d.ts +2 -0
- package/dist/test/type-checker/cross-module-packages.test.d.ts.map +1 -0
- package/dist/test/type-checker/cross-module-packages.test.js +51 -0
- package/dist/test/type-checker/cross-module-packages.test.js.map +1 -0
- package/dist/test/type-checker/pii-propagation.test.d.ts +2 -0
- package/dist/test/type-checker/pii-propagation.test.d.ts.map +1 -0
- package/dist/test/type-checker/pii-propagation.test.js +656 -0
- package/dist/test/type-checker/pii-propagation.test.js.map +1 -0
- package/dist/test/unit/async/async-discipline.test.d.ts +12 -0
- package/dist/test/unit/async/async-discipline.test.d.ts.map +1 -0
- package/dist/test/unit/async/async-discipline.test.js +492 -0
- package/dist/test/unit/async/async-discipline.test.js.map +1 -0
- package/dist/test/unit/async/async-schedule.test.d.ts +7 -0
- package/dist/test/unit/async/async-schedule.test.d.ts.map +1 -0
- package/dist/test/unit/async/async-schedule.test.js +154 -0
- package/dist/test/unit/async/async-schedule.test.js.map +1 -0
- package/dist/test/unit/canonicalizer/canonicalizer.test.d.ts +2 -0
- package/dist/test/unit/canonicalizer/canonicalizer.test.d.ts.map +1 -0
- package/dist/test/unit/canonicalizer/canonicalizer.test.js +195 -0
- package/dist/test/unit/canonicalizer/canonicalizer.test.js.map +1 -0
- package/dist/test/unit/config/config-service.test.d.ts +2 -0
- package/dist/test/unit/config/config-service.test.d.ts.map +1 -0
- package/dist/test/unit/config/config-service.test.js +235 -0
- package/dist/test/unit/config/config-service.test.js.map +1 -0
- package/dist/test/unit/config/effect-config-cache.test.d.ts +2 -0
- package/dist/test/unit/config/effect-config-cache.test.d.ts.map +1 -0
- package/dist/test/unit/config/effect-config-cache.test.js +135 -0
- package/dist/test/unit/config/effect-config-cache.test.js.map +1 -0
- package/dist/test/unit/config/lexicons/i18n.test.d.ts +15 -0
- package/dist/test/unit/config/lexicons/i18n.test.d.ts.map +1 -0
- package/dist/test/unit/config/lexicons/i18n.test.js +318 -0
- package/dist/test/unit/config/lexicons/i18n.test.js.map +1 -0
- package/dist/test/unit/config/lexicons/identifiers/identifier-mapping.test.d.ts +7 -0
- package/dist/test/unit/config/lexicons/identifiers/identifier-mapping.test.d.ts.map +1 -0
- package/dist/test/unit/config/lexicons/identifiers/identifier-mapping.test.js +180 -0
- package/dist/test/unit/config/lexicons/identifiers/identifier-mapping.test.js.map +1 -0
- package/dist/test/unit/config/lexicons/zh-CN.test.d.ts +7 -0
- package/dist/test/unit/config/lexicons/zh-CN.test.d.ts.map +1 -0
- package/dist/test/unit/config/lexicons/zh-CN.test.js +922 -0
- package/dist/test/unit/config/lexicons/zh-CN.test.js.map +1 -0
- package/dist/test/unit/core_ir_json/core_ir_json.test.d.ts +2 -0
- package/dist/test/unit/core_ir_json/core_ir_json.test.d.ts.map +1 -0
- package/dist/test/unit/core_ir_json/core_ir_json.test.js +218 -0
- package/dist/test/unit/core_ir_json/core_ir_json.test.js.map +1 -0
- package/dist/test/unit/dependency-graph.test.d.ts +5 -0
- package/dist/test/unit/dependency-graph.test.d.ts.map +1 -0
- package/dist/test/unit/dependency-graph.test.js +105 -0
- package/dist/test/unit/dependency-graph.test.js.map +1 -0
- package/dist/test/unit/effect/effect-inference.test.d.ts +2 -0
- package/dist/test/unit/effect/effect-inference.test.d.ts.map +1 -0
- package/dist/test/unit/effect/effect-inference.test.js +480 -0
- package/dist/test/unit/effect/effect-inference.test.js.map +1 -0
- package/dist/test/unit/emitter/emitter.test.d.ts +2 -0
- package/dist/test/unit/emitter/emitter.test.d.ts.map +1 -0
- package/dist/test/unit/emitter/emitter.test.js +825 -0
- package/dist/test/unit/emitter/emitter.test.js.map +1 -0
- package/dist/test/unit/generator.test.d.ts +2 -0
- package/dist/test/unit/generator.test.d.ts.map +1 -0
- package/dist/test/unit/generator.test.js +322 -0
- package/dist/test/unit/generator.test.js.map +1 -0
- package/dist/test/unit/keyword-translator.test.d.ts +10 -0
- package/dist/test/unit/keyword-translator.test.d.ts.map +1 -0
- package/dist/test/unit/keyword-translator.test.js +251 -0
- package/dist/test/unit/keyword-translator.test.js.map +1 -0
- package/dist/test/unit/lexer/lexer.test.d.ts +2 -0
- package/dist/test/unit/lexer/lexer.test.d.ts.map +1 -0
- package/dist/test/unit/lexer/lexer.test.js +136 -0
- package/dist/test/unit/lexer/lexer.test.js.map +1 -0
- package/dist/test/unit/lexer/newline-handling.test.d.ts +12 -0
- package/dist/test/unit/lexer/newline-handling.test.d.ts.map +1 -0
- package/dist/test/unit/lexer/newline-handling.test.js +379 -0
- package/dist/test/unit/lexer/newline-handling.test.js.map +1 -0
- package/dist/test/unit/llm-providers.test.d.ts +2 -0
- package/dist/test/unit/llm-providers.test.d.ts.map +1 -0
- package/dist/test/unit/llm-providers.test.js +341 -0
- package/dist/test/unit/llm-providers.test.js.map +1 -0
- package/dist/test/unit/lockfile.test.d.ts +5 -0
- package/dist/test/unit/lockfile.test.d.ts.map +1 -0
- package/dist/test/unit/lockfile.test.js +116 -0
- package/dist/test/unit/lockfile.test.js.map +1 -0
- package/dist/test/unit/lowering/lowering.test.d.ts +2 -0
- package/dist/test/unit/lowering/lowering.test.d.ts.map +1 -0
- package/dist/test/unit/lowering/lowering.test.js +625 -0
- package/dist/test/unit/lowering/lowering.test.js.map +1 -0
- package/dist/test/unit/lsp/analysis.test.d.ts +2 -0
- package/dist/test/unit/lsp/analysis.test.d.ts.map +1 -0
- package/dist/test/unit/lsp/analysis.test.js +401 -0
- package/dist/test/unit/lsp/analysis.test.js.map +1 -0
- package/dist/test/unit/lsp/codeaction.test.d.ts +2 -0
- package/dist/test/unit/lsp/codeaction.test.d.ts.map +1 -0
- package/dist/test/unit/lsp/codeaction.test.js +542 -0
- package/dist/test/unit/lsp/codeaction.test.js.map +1 -0
- package/dist/test/unit/lsp/pii-diagnostics.test.d.ts +2 -0
- package/dist/test/unit/lsp/pii-diagnostics.test.d.ts.map +1 -0
- package/dist/test/unit/lsp/pii-diagnostics.test.js +222 -0
- package/dist/test/unit/lsp/pii-diagnostics.test.js.map +1 -0
- package/dist/test/unit/lsp/symbols.test.d.ts +2 -0
- package/dist/test/unit/lsp/symbols.test.d.ts.map +1 -0
- package/dist/test/unit/lsp/symbols.test.js +160 -0
- package/dist/test/unit/lsp/symbols.test.js.map +1 -0
- package/dist/test/unit/lsp/utils.test.d.ts +2 -0
- package/dist/test/unit/lsp/utils.test.d.ts.map +1 -0
- package/dist/test/unit/lsp/utils.test.js +182 -0
- package/dist/test/unit/lsp/utils.test.js.map +1 -0
- package/dist/test/unit/manifest-parser.test.d.ts +12 -0
- package/dist/test/unit/manifest-parser.test.d.ts.map +1 -0
- package/dist/test/unit/manifest-parser.test.js +285 -0
- package/dist/test/unit/manifest-parser.test.js.map +1 -0
- package/dist/test/unit/manifest-schema.test.d.ts +11 -0
- package/dist/test/unit/manifest-schema.test.d.ts.map +1 -0
- package/dist/test/unit/manifest-schema.test.js +171 -0
- package/dist/test/unit/manifest-schema.test.js.map +1 -0
- package/dist/test/unit/module-cache-packages.test.d.ts +2 -0
- package/dist/test/unit/module-cache-packages.test.d.ts.map +1 -0
- package/dist/test/unit/module-cache-packages.test.js +114 -0
- package/dist/test/unit/module-cache-packages.test.js.map +1 -0
- package/dist/test/unit/package-cache.test.d.ts +7 -0
- package/dist/test/unit/package-cache.test.d.ts.map +1 -0
- package/dist/test/unit/package-cache.test.js +192 -0
- package/dist/test/unit/package-cache.test.js.map +1 -0
- package/dist/test/unit/package-installer.test.d.ts +2 -0
- package/dist/test/unit/package-installer.test.d.ts.map +1 -0
- package/dist/test/unit/package-installer.test.js +263 -0
- package/dist/test/unit/package-installer.test.js.map +1 -0
- package/dist/test/unit/package-registry.test.d.ts +7 -0
- package/dist/test/unit/package-registry.test.d.ts.map +1 -0
- package/dist/test/unit/package-registry.test.js +198 -0
- package/dist/test/unit/package-registry.test.js.map +1 -0
- package/dist/test/unit/parser/parser.test.d.ts +2 -0
- package/dist/test/unit/parser/parser.test.d.ts.map +1 -0
- package/dist/test/unit/parser/parser.test.js +1117 -0
- package/dist/test/unit/parser/parser.test.js.map +1 -0
- package/dist/test/unit/parser/type-inference.test.d.ts +5 -0
- package/dist/test/unit/parser/type-inference.test.d.ts.map +1 -0
- package/dist/test/unit/parser/type-inference.test.js +262 -0
- package/dist/test/unit/parser/type-inference.test.js.map +1 -0
- package/dist/test/unit/prompt-manager.test.d.ts +2 -0
- package/dist/test/unit/prompt-manager.test.d.ts.map +1 -0
- package/dist/test/unit/prompt-manager.test.js +137 -0
- package/dist/test/unit/prompt-manager.test.js.map +1 -0
- package/dist/test/unit/provenance-integration.test.d.ts +2 -0
- package/dist/test/unit/provenance-integration.test.d.ts.map +1 -0
- package/dist/test/unit/provenance-integration.test.js +181 -0
- package/dist/test/unit/provenance-integration.test.js.map +1 -0
- package/dist/test/unit/provenance.test.d.ts +2 -0
- package/dist/test/unit/provenance.test.d.ts.map +1 -0
- package/dist/test/unit/provenance.test.js +170 -0
- package/dist/test/unit/provenance.test.js.map +1 -0
- package/dist/test/unit/resolver.test.d.ts +5 -0
- package/dist/test/unit/resolver.test.d.ts.map +1 -0
- package/dist/test/unit/resolver.test.js +48 -0
- package/dist/test/unit/resolver.test.js.map +1 -0
- package/dist/test/unit/typecheck/async-discipline-extended.test.d.ts +2 -0
- package/dist/test/unit/typecheck/async-discipline-extended.test.d.ts.map +1 -0
- package/dist/test/unit/typecheck/async-discipline-extended.test.js +69 -0
- package/dist/test/unit/typecheck/async-discipline-extended.test.js.map +1 -0
- package/dist/test/unit/typecheck/effects-and-capabilities.test.d.ts +2 -0
- package/dist/test/unit/typecheck/effects-and-capabilities.test.d.ts.map +1 -0
- package/dist/test/unit/typecheck/effects-and-capabilities.test.js +191 -0
- package/dist/test/unit/typecheck/effects-and-capabilities.test.js.map +1 -0
- package/dist/test/unit/typecheck/regression-fixes.test.d.ts +11 -0
- package/dist/test/unit/typecheck/regression-fixes.test.d.ts.map +1 -0
- package/dist/test/unit/typecheck/regression-fixes.test.js +456 -0
- package/dist/test/unit/typecheck/regression-fixes.test.js.map +1 -0
- package/dist/test/unit/typecheck/should-enforce-pii.test.d.ts +2 -0
- package/dist/test/unit/typecheck/should-enforce-pii.test.d.ts.map +1 -0
- package/dist/test/unit/typecheck/should-enforce-pii.test.js +167 -0
- package/dist/test/unit/typecheck/should-enforce-pii.test.js.map +1 -0
- package/dist/test/unit/typecheck/symbol-table.test.d.ts +7 -0
- package/dist/test/unit/typecheck/symbol-table.test.d.ts.map +1 -0
- package/dist/test/unit/typecheck/symbol-table.test.js +145 -0
- package/dist/test/unit/typecheck/symbol-table.test.js.map +1 -0
- package/dist/test/unit/typecheck/type-inference.test.d.ts +2 -0
- package/dist/test/unit/typecheck/type-inference.test.d.ts.map +1 -0
- package/dist/test/unit/typecheck/type-inference.test.js +122 -0
- package/dist/test/unit/typecheck/type-inference.test.js.map +1 -0
- package/dist/test/unit/typecheck/type-system-extended.test.d.ts +8 -0
- package/dist/test/unit/typecheck/type-system-extended.test.d.ts.map +1 -0
- package/dist/test/unit/typecheck/type-system-extended.test.js +131 -0
- package/dist/test/unit/typecheck/type-system-extended.test.js.map +1 -0
- package/dist/test/unit/typecheck/type-system.test.d.ts +9 -0
- package/dist/test/unit/typecheck/type-system.test.d.ts.map +1 -0
- package/dist/test/unit/typecheck/type-system.test.js +617 -0
- package/dist/test/unit/typecheck/type-system.test.js.map +1 -0
- package/dist/test/unit/typecheck/typecheck-advanced.test.d.ts +2 -0
- package/dist/test/unit/typecheck/typecheck-advanced.test.d.ts.map +1 -0
- package/dist/test/unit/typecheck/typecheck-advanced.test.js +125 -0
- package/dist/test/unit/typecheck/typecheck-advanced.test.js.map +1 -0
- package/dist/test/unit/validator.test.d.ts +2 -0
- package/dist/test/unit/validator.test.d.ts.map +1 -0
- package/dist/test/unit/validator.test.js +154 -0
- package/dist/test/unit/validator.test.js.map +1 -0
- package/dist/test/unit/version-utils.test.d.ts +12 -0
- package/dist/test/unit/version-utils.test.d.ts.map +1 -0
- package/dist/test/unit/version-utils.test.js +112 -0
- package/dist/test/unit/version-utils.test.js.map +1 -0
- package/package.json +153 -0
|
@@ -0,0 +1,625 @@
|
|
|
1
|
+
import { describe, it } from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { canonicalize } from '../../../src/frontend/canonicalizer.js';
|
|
4
|
+
import { lex } from '../../../src/frontend/lexer.js';
|
|
5
|
+
import { parse } from '../../../src/parser.js';
|
|
6
|
+
import { lowerModule } from '../../../src/lower_to_core.js';
|
|
7
|
+
import { CapabilityKind } from '../../../src/config/semantic.js';
|
|
8
|
+
import { Node } from '../../../src/ast/ast.js';
|
|
9
|
+
function lower(source) {
|
|
10
|
+
const canonical = canonicalize(source);
|
|
11
|
+
const tokens = lex(canonical);
|
|
12
|
+
const ast = parse(tokens);
|
|
13
|
+
return lowerModule(ast);
|
|
14
|
+
}
|
|
15
|
+
function lowerAst(module) {
|
|
16
|
+
return lowerModule(module);
|
|
17
|
+
}
|
|
18
|
+
function freshSpan() {
|
|
19
|
+
return {
|
|
20
|
+
start: { line: 0, col: 0 },
|
|
21
|
+
end: { line: 0, col: 0 },
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function makeParam(name, type) {
|
|
25
|
+
return { name, type, span: freshSpan() };
|
|
26
|
+
}
|
|
27
|
+
function makeFunc(options) {
|
|
28
|
+
const body = Node.Block([...options.statements]);
|
|
29
|
+
return Node.Func(options.name, [], options.params ?? [], options.retType, [], [], false, body);
|
|
30
|
+
}
|
|
31
|
+
describe('降级至 Core IR', () => {
|
|
32
|
+
it('模块降级后应保留名称与声明数量', () => {
|
|
33
|
+
const core = lower(`
|
|
34
|
+
This module is test.lowering.basic.
|
|
35
|
+
|
|
36
|
+
Define User with id: Text.
|
|
37
|
+
|
|
38
|
+
To ping, produce Text:
|
|
39
|
+
Return "pong".
|
|
40
|
+
`);
|
|
41
|
+
assert.equal(core.kind, 'Module');
|
|
42
|
+
assert.equal(core.name, 'test.lowering.basic');
|
|
43
|
+
assert.equal(core.decls.length, 2);
|
|
44
|
+
});
|
|
45
|
+
it('函数降级后应保留参数与返回类型', () => {
|
|
46
|
+
const core = lower(`
|
|
47
|
+
This module is test.lowering.func_types.
|
|
48
|
+
|
|
49
|
+
To repeat with text: Text and times: Int, produce Text:
|
|
50
|
+
Return text.
|
|
51
|
+
`);
|
|
52
|
+
const func = core.decls.find(d => d.kind === 'Func');
|
|
53
|
+
assert.ok(func, '应该存在函数声明');
|
|
54
|
+
assert.equal(func.params.length, 2);
|
|
55
|
+
assert.equal(func.params[0].name, 'text');
|
|
56
|
+
assert.equal(func.ret.kind, 'TypeName');
|
|
57
|
+
assert.equal(func.effects.length, 0);
|
|
58
|
+
});
|
|
59
|
+
it('Return 语句应降级为 Core.Return', () => {
|
|
60
|
+
const core = lower(`
|
|
61
|
+
This module is test.lowering.return_stmt.
|
|
62
|
+
|
|
63
|
+
To identity with value: Int, produce Int:
|
|
64
|
+
Return value.
|
|
65
|
+
`);
|
|
66
|
+
const func = core.decls.find(d => d.kind === 'Func');
|
|
67
|
+
const body = func.body.statements;
|
|
68
|
+
assert.equal(body.length, 1);
|
|
69
|
+
assert.equal(body[0].kind, 'Return');
|
|
70
|
+
});
|
|
71
|
+
it('Match 语句应降级并保留所有分支', () => {
|
|
72
|
+
const core = lower(`
|
|
73
|
+
This module is test.lowering.match_stmt.
|
|
74
|
+
|
|
75
|
+
Define Result as one of Ok, Err.
|
|
76
|
+
|
|
77
|
+
To handle with result: Result, produce Int:
|
|
78
|
+
Match result:
|
|
79
|
+
When Ok, Return 1.
|
|
80
|
+
When Err, Return 0.
|
|
81
|
+
`);
|
|
82
|
+
const func = core.decls.find(d => d.kind === 'Func');
|
|
83
|
+
const matchStmt = func.body.statements[0];
|
|
84
|
+
assert.equal(matchStmt.kind, 'Match');
|
|
85
|
+
const matchCore = matchStmt;
|
|
86
|
+
assert.equal(matchCore.cases.length, 2);
|
|
87
|
+
assert.equal(matchCore.cases[0].pattern.kind, 'PatName');
|
|
88
|
+
});
|
|
89
|
+
it('Maybe 类型应降级为 Core.Maybe 包装类型', () => {
|
|
90
|
+
const core = lower(`
|
|
91
|
+
This module is test.lowering.maybe_type.
|
|
92
|
+
|
|
93
|
+
To safeHead with items: List of Int, produce Int?:
|
|
94
|
+
Return None.
|
|
95
|
+
`);
|
|
96
|
+
const func = core.decls.find(d => d.kind === 'Func');
|
|
97
|
+
assert.equal(func.ret.kind, 'Maybe');
|
|
98
|
+
assert.equal(func.ret.type.kind, 'TypeName');
|
|
99
|
+
const returnStmt = func.body.statements[0];
|
|
100
|
+
assert.equal(returnStmt.kind, 'Return');
|
|
101
|
+
});
|
|
102
|
+
it('Lambda 表达式应降级为 Core.Lambda 并保留参数信息', () => {
|
|
103
|
+
const core = lower(`
|
|
104
|
+
This module is test.lowering.lambda_arrows.
|
|
105
|
+
|
|
106
|
+
To makeIdentity, produce Fn1:
|
|
107
|
+
Return (value: Text) => value.
|
|
108
|
+
`);
|
|
109
|
+
const func = core.decls.find(d => d.kind === 'Func');
|
|
110
|
+
const lambda = func.body.statements[0].expr;
|
|
111
|
+
assert.equal(lambda.kind, 'Lambda');
|
|
112
|
+
assert.equal(lambda.params.length, 1);
|
|
113
|
+
assert.equal(lambda.params[0].name, 'value');
|
|
114
|
+
assert.equal(lambda.ret.kind, 'TypeName');
|
|
115
|
+
});
|
|
116
|
+
it('Lambda 闭包应记录外部变量捕获列表', () => {
|
|
117
|
+
const paramValue = makeParam('value', Node.TypeName('Int'));
|
|
118
|
+
const funcParam = makeParam('base', Node.TypeName('Int'));
|
|
119
|
+
const lambdaExpr = Node.Lambda([paramValue], Node.TypeName('Int'), Node.Block([Node.Return(Node.Name('base'))]));
|
|
120
|
+
const funcDecl = makeFunc({
|
|
121
|
+
name: 'makeAdder',
|
|
122
|
+
params: [funcParam],
|
|
123
|
+
retType: Node.TypeName('Fn1'),
|
|
124
|
+
statements: [Node.Return(lambdaExpr)],
|
|
125
|
+
});
|
|
126
|
+
const moduleAst = Node.Module('test.lowering.lambda_capture', [funcDecl]);
|
|
127
|
+
const core = lowerAst(moduleAst);
|
|
128
|
+
const func = core.decls.find(d => d.kind === 'Func');
|
|
129
|
+
const lambda = func.body.statements[0].expr;
|
|
130
|
+
const captures = lambda.captures ? [...lambda.captures].sort() : [];
|
|
131
|
+
assert.deepEqual(captures, ['base']);
|
|
132
|
+
});
|
|
133
|
+
it('Await 表达式应降级为 Core.Await', () => {
|
|
134
|
+
const awaitExpr = Node.Await(Node.Name('taskResult'));
|
|
135
|
+
const funcDecl = makeFunc({
|
|
136
|
+
name: 'awaiter',
|
|
137
|
+
retType: Node.TypeName('Text'),
|
|
138
|
+
statements: [Node.Return(awaitExpr)],
|
|
139
|
+
});
|
|
140
|
+
const moduleAst = Node.Module('test.lowering.await_expr', [funcDecl]);
|
|
141
|
+
const core = lowerAst(moduleAst);
|
|
142
|
+
const func = core.decls[0];
|
|
143
|
+
const retExpr = func.body.statements[0].expr;
|
|
144
|
+
assert.equal(retExpr.kind, 'Await');
|
|
145
|
+
assert.equal(retExpr.expr.kind, 'Name');
|
|
146
|
+
});
|
|
147
|
+
it('Block 语句应降级为 Core.Scope 并保持嵌套顺序', () => {
|
|
148
|
+
const inner = Node.Block([Node.Let('temp', Node.Int(1)), Node.Return(Node.Name('temp'))]);
|
|
149
|
+
const funcDecl = makeFunc({
|
|
150
|
+
name: 'scoped',
|
|
151
|
+
retType: Node.TypeName('Int'),
|
|
152
|
+
statements: [Node.Block([Node.Let('inner', Node.Int(2))]), inner],
|
|
153
|
+
});
|
|
154
|
+
const moduleAst = Node.Module('test.lowering.scope_block', [funcDecl]);
|
|
155
|
+
const core = lowerAst(moduleAst);
|
|
156
|
+
const func = core.decls[0];
|
|
157
|
+
assert.equal(func.body.statements[0].kind, 'Scope');
|
|
158
|
+
const scope = func.body.statements[1];
|
|
159
|
+
assert.equal(scope.kind, 'Scope');
|
|
160
|
+
const scopeBody = scope;
|
|
161
|
+
assert.equal(scopeBody.statements[1].kind, 'Return');
|
|
162
|
+
});
|
|
163
|
+
it('Result/List map 调用应降级并保持 Lambda 参数信息', () => {
|
|
164
|
+
const resultLambda = Node.Lambda([makeParam('value', Node.TypeName('Int'))], Node.TypeName('Int'), Node.Block([Node.Return(Node.Name('value'))]));
|
|
165
|
+
const resultCall = Node.Call(Node.Name('Result.map'), [Node.Name('res'), resultLambda]);
|
|
166
|
+
const listLambda = Node.Lambda([makeParam('item', Node.TypeName('Text'))], Node.TypeName('Text'), Node.Block([Node.Return(Node.Name('prefix'))]));
|
|
167
|
+
const listCall = Node.Call(Node.Name('List.map'), [Node.Name('items'), listLambda]);
|
|
168
|
+
const funcDecl = makeFunc({
|
|
169
|
+
name: 'mapBoth',
|
|
170
|
+
params: [makeParam('prefix', Node.TypeName('Text'))],
|
|
171
|
+
retType: Node.TypeName('List'),
|
|
172
|
+
statements: [Node.Return(resultCall), Node.Return(listCall)],
|
|
173
|
+
});
|
|
174
|
+
const moduleAst = Node.Module('test.lowering.map_calls', [funcDecl]);
|
|
175
|
+
const core = lowerAst(moduleAst);
|
|
176
|
+
const body = core.decls[0].body.statements;
|
|
177
|
+
const resultExpr = body[0].expr;
|
|
178
|
+
const listExpr = body[1].expr;
|
|
179
|
+
assert.equal(resultExpr.kind, 'Call');
|
|
180
|
+
assert.equal(resultExpr.args[1]?.kind, 'Lambda');
|
|
181
|
+
const listLambdaCore = listExpr.args[1];
|
|
182
|
+
assert.deepEqual(listLambdaCore.captures ? [...listLambdaCore.captures] : [], ['prefix']);
|
|
183
|
+
});
|
|
184
|
+
it('effectCaps 显式声明应完整传递', () => {
|
|
185
|
+
const caps = [CapabilityKind.SECRETS];
|
|
186
|
+
const funcDecl = Node.Func('readSecret', [], [], Node.TypeName('Text'), [], caps, true, Node.Block([Node.Return(Node.String('ok'))]));
|
|
187
|
+
const moduleAst = Node.Module('test.lowering.effectcaps.explicit', [funcDecl]);
|
|
188
|
+
const core = lowerAst(moduleAst);
|
|
189
|
+
const func = core.decls[0];
|
|
190
|
+
assert.deepEqual(func.effectCaps, caps);
|
|
191
|
+
assert.notStrictEqual(func.effectCaps, caps);
|
|
192
|
+
assert.equal(func.effectCapsExplicit, true);
|
|
193
|
+
});
|
|
194
|
+
it('effectCaps 推断结果应保持并标记为隐式', () => {
|
|
195
|
+
const caps = [CapabilityKind.FILES, CapabilityKind.TIME];
|
|
196
|
+
const funcDecl = Node.Func('touchFile', [], [], Node.TypeName('Bool'), [], caps, false, Node.Block([Node.Return(Node.Bool(true))]));
|
|
197
|
+
const moduleAst = Node.Module('test.lowering.effectcaps.implicit', [funcDecl]);
|
|
198
|
+
const core = lowerAst(moduleAst);
|
|
199
|
+
const func = core.decls[0];
|
|
200
|
+
assert.deepEqual(func.effectCaps, caps);
|
|
201
|
+
assert.notStrictEqual(func.effectCaps, caps);
|
|
202
|
+
assert.equal(func.effectCapsExplicit, false);
|
|
203
|
+
});
|
|
204
|
+
it('未知 effect 应抛出诊断错误', () => {
|
|
205
|
+
const funcDecl = Node.Func('useUnknownEffect', [], [], Node.TypeName('Int'), ['teleport'], [], false, Node.Block([Node.Return(Node.Int(1))]));
|
|
206
|
+
const moduleAst = Node.Module('test.lowering.effectcaps.unknown', [funcDecl]);
|
|
207
|
+
assert.throws(() => lowerAst(moduleAst), /未知的 effect/);
|
|
208
|
+
});
|
|
209
|
+
it('Set 语句应降级为 Core.Set 并保留表达式', () => {
|
|
210
|
+
const funcDecl = makeFunc({
|
|
211
|
+
name: 'assign',
|
|
212
|
+
params: [makeParam('value', Node.TypeName('Int'))],
|
|
213
|
+
retType: Node.TypeName('Int'),
|
|
214
|
+
statements: [
|
|
215
|
+
Node.Let('counter', Node.Int(0)),
|
|
216
|
+
Node.Set('counter', Node.Name('value')),
|
|
217
|
+
Node.Return(Node.Name('counter')),
|
|
218
|
+
],
|
|
219
|
+
});
|
|
220
|
+
const moduleAst = Node.Module('test.lowering.set.basic', [funcDecl]);
|
|
221
|
+
const core = lowerAst(moduleAst);
|
|
222
|
+
const func = core.decls[0];
|
|
223
|
+
const body = func.body.statements;
|
|
224
|
+
assert.equal(body[1]?.kind, 'Set');
|
|
225
|
+
const setStmt = body[1];
|
|
226
|
+
assert.equal(setStmt.name, 'counter');
|
|
227
|
+
assert.equal(setStmt.expr.kind, 'Name');
|
|
228
|
+
});
|
|
229
|
+
it('连续 Set 语句应保持原有顺序', () => {
|
|
230
|
+
const funcDecl = makeFunc({
|
|
231
|
+
name: 'mutate',
|
|
232
|
+
retType: Node.TypeName('Int'),
|
|
233
|
+
statements: [
|
|
234
|
+
Node.Let('a', Node.Int(1)),
|
|
235
|
+
Node.Set('a', Node.Int(2)),
|
|
236
|
+
Node.Set('a', Node.Int(3)),
|
|
237
|
+
Node.Return(Node.Name('a')),
|
|
238
|
+
],
|
|
239
|
+
});
|
|
240
|
+
const moduleAst = Node.Module('test.lowering.set.sequence', [funcDecl]);
|
|
241
|
+
const core = lowerAst(moduleAst);
|
|
242
|
+
const func = core.decls[0];
|
|
243
|
+
const body = func.body.statements;
|
|
244
|
+
assert.equal(body[1]?.kind, 'Set');
|
|
245
|
+
assert.equal(body[2]?.kind, 'Set');
|
|
246
|
+
assert.equal(body[1].expr.kind, 'Int');
|
|
247
|
+
assert.equal(body[2].expr.kind, 'Int');
|
|
248
|
+
});
|
|
249
|
+
it('PatternNull 应降级为 Core.PatNull', () => {
|
|
250
|
+
const matchStmt = Node.Match(Node.Name('value'), [
|
|
251
|
+
Node.Case(Node.PatternNull(), Node.Return(Node.Int(0))),
|
|
252
|
+
Node.Case(Node.PatternName('other'), Node.Return(Node.Int(1))),
|
|
253
|
+
]);
|
|
254
|
+
const funcDecl = makeFunc({
|
|
255
|
+
name: 'checkNull',
|
|
256
|
+
retType: Node.TypeName('Int'),
|
|
257
|
+
statements: [matchStmt],
|
|
258
|
+
});
|
|
259
|
+
const moduleAst = Node.Module('test.lowering.match.null', [funcDecl]);
|
|
260
|
+
const core = lowerAst(moduleAst);
|
|
261
|
+
const matchCore = (core.decls[0].body.statements[0]);
|
|
262
|
+
assert.equal(matchCore.cases[0]?.pattern.kind, 'PatNull');
|
|
263
|
+
});
|
|
264
|
+
it('PatternCtor 应保留类型名与参数', () => {
|
|
265
|
+
const pattern = Node.PatternCtor('Option.Some', ['item'], [Node.PatternName('inner')]);
|
|
266
|
+
const matchStmt = Node.Match(Node.Name('value'), [
|
|
267
|
+
Node.Case(pattern, Node.Return(Node.Int(1))),
|
|
268
|
+
]);
|
|
269
|
+
const funcDecl = makeFunc({
|
|
270
|
+
name: 'matchCtor',
|
|
271
|
+
retType: Node.TypeName('Int'),
|
|
272
|
+
statements: [matchStmt],
|
|
273
|
+
});
|
|
274
|
+
const moduleAst = Node.Module('test.lowering.match.ctor', [funcDecl]);
|
|
275
|
+
const core = lowerAst(moduleAst);
|
|
276
|
+
const matchCore = (core.decls[0].body.statements[0]);
|
|
277
|
+
const pat = matchCore.cases[0].pattern;
|
|
278
|
+
assert.equal(pat.kind, 'PatCtor');
|
|
279
|
+
assert.equal(pat.typeName, 'Option.Some');
|
|
280
|
+
assert.equal(pat.args?.[0]?.kind, 'PatName');
|
|
281
|
+
});
|
|
282
|
+
it('PatternInt 应降级为 Core.PatInt', () => {
|
|
283
|
+
const matchStmt = Node.Match(Node.Name('num'), [
|
|
284
|
+
Node.Case(Node.PatternInt(42), Node.Return(Node.String('answer'))),
|
|
285
|
+
]);
|
|
286
|
+
const funcDecl = makeFunc({
|
|
287
|
+
name: 'matchInt',
|
|
288
|
+
retType: Node.TypeName('Text'),
|
|
289
|
+
statements: [matchStmt],
|
|
290
|
+
});
|
|
291
|
+
const moduleAst = Node.Module('test.lowering.match.int', [funcDecl]);
|
|
292
|
+
const core = lowerAst(moduleAst);
|
|
293
|
+
const matchCore = (core.decls[0].body.statements[0]);
|
|
294
|
+
const pat = matchCore.cases[0].pattern;
|
|
295
|
+
assert.equal(pat.kind, 'PatInt');
|
|
296
|
+
assert.equal(pat.value, 42);
|
|
297
|
+
});
|
|
298
|
+
it('Ok 表达式应降级为 Core.Ok', () => {
|
|
299
|
+
const funcDecl = makeFunc({
|
|
300
|
+
name: 'wrapOk',
|
|
301
|
+
retType: Node.TypeName('Result'),
|
|
302
|
+
statements: [Node.Return(Node.Ok(Node.Int(1)))],
|
|
303
|
+
});
|
|
304
|
+
const moduleAst = Node.Module('test.lowering.expr.ok', [funcDecl]);
|
|
305
|
+
const core = lowerAst(moduleAst);
|
|
306
|
+
const retStmt = core.decls[0].body.statements[0];
|
|
307
|
+
const expr = retStmt.expr;
|
|
308
|
+
assert.equal(expr.kind, 'Ok');
|
|
309
|
+
assert.equal(expr.expr.kind, 'Int');
|
|
310
|
+
});
|
|
311
|
+
it('Err 表达式应降级为 Core.Err', () => {
|
|
312
|
+
const funcDecl = makeFunc({
|
|
313
|
+
name: 'wrapErr',
|
|
314
|
+
retType: Node.TypeName('Result'),
|
|
315
|
+
statements: [Node.Return(Node.Err(Node.String('fail')))],
|
|
316
|
+
});
|
|
317
|
+
const moduleAst = Node.Module('test.lowering.expr.err', [funcDecl]);
|
|
318
|
+
const core = lowerAst(moduleAst);
|
|
319
|
+
const retStmt = core.decls[0].body.statements[0];
|
|
320
|
+
const expr = retStmt.expr;
|
|
321
|
+
assert.equal(expr.kind, 'Err');
|
|
322
|
+
assert.equal(expr.expr.value, 'fail');
|
|
323
|
+
});
|
|
324
|
+
it('Some 与 None 应分别降级为 Core.Some 与 Core.None', () => {
|
|
325
|
+
const funcDecl = makeFunc({
|
|
326
|
+
name: 'wrapOption',
|
|
327
|
+
retType: Node.Maybe(Node.TypeName('Int')),
|
|
328
|
+
statements: [Node.Return(Node.Some(Node.Int(7))), Node.Return(Node.None())],
|
|
329
|
+
});
|
|
330
|
+
const moduleAst = Node.Module('test.lowering.expr.option', [funcDecl]);
|
|
331
|
+
const core = lowerAst(moduleAst);
|
|
332
|
+
const firstReturn = core.decls[0].body.statements[0];
|
|
333
|
+
const secondReturn = core.decls[0].body.statements[1];
|
|
334
|
+
const someExpr = firstReturn.expr;
|
|
335
|
+
const noneExpr = secondReturn.expr;
|
|
336
|
+
assert.equal(someExpr.kind, 'Some');
|
|
337
|
+
assert.equal(someExpr.expr.kind, 'Int');
|
|
338
|
+
assert.equal(noneExpr.kind, 'None');
|
|
339
|
+
});
|
|
340
|
+
it('Start 语句应降级为 Core.Start', () => {
|
|
341
|
+
const startStmt = Node.Start('job', Node.Call(Node.Name('Async.create'), []));
|
|
342
|
+
const funcDecl = makeFunc({
|
|
343
|
+
name: 'launch',
|
|
344
|
+
retType: Node.TypeName('Int'),
|
|
345
|
+
statements: [startStmt, Node.Return(Node.Int(0))],
|
|
346
|
+
});
|
|
347
|
+
const moduleAst = Node.Module('test.lowering.start', [funcDecl]);
|
|
348
|
+
const core = lowerAst(moduleAst);
|
|
349
|
+
const stmt = core.decls[0].body.statements[0];
|
|
350
|
+
assert.equal(stmt.kind, 'Start');
|
|
351
|
+
assert.equal(stmt.name, 'job');
|
|
352
|
+
assert.equal(stmt.expr.kind, 'Call');
|
|
353
|
+
});
|
|
354
|
+
it('Wait 语句应降级为 Core.Wait 并保留名称列表', () => {
|
|
355
|
+
const waitStmt = Node.Wait(['job', 'other']);
|
|
356
|
+
const funcDecl = makeFunc({
|
|
357
|
+
name: 'awaitAll',
|
|
358
|
+
retType: Node.TypeName('Int'),
|
|
359
|
+
statements: [waitStmt, Node.Return(Node.Int(1))],
|
|
360
|
+
});
|
|
361
|
+
const moduleAst = Node.Module('test.lowering.wait', [funcDecl]);
|
|
362
|
+
const core = lowerAst(moduleAst);
|
|
363
|
+
const stmt = core.decls[0].body.statements[0];
|
|
364
|
+
assert.equal(stmt.kind, 'Wait');
|
|
365
|
+
assert.deepEqual(stmt.names, ['job', 'other']);
|
|
366
|
+
});
|
|
367
|
+
it('Call 语句应降级为占位 Let', () => {
|
|
368
|
+
const callStmt = Node.Call(Node.Name('Console.log'), [Node.String('hi')]);
|
|
369
|
+
const funcDecl = makeFunc({
|
|
370
|
+
name: 'log',
|
|
371
|
+
retType: Node.TypeName('Null'),
|
|
372
|
+
statements: [callStmt, Node.Return(Node.Null())],
|
|
373
|
+
});
|
|
374
|
+
const moduleAst = Node.Module('test.lowering.callStmt', [funcDecl]);
|
|
375
|
+
const core = lowerAst(moduleAst);
|
|
376
|
+
const stmt = core.decls[0].body.statements[0];
|
|
377
|
+
assert.equal(stmt.kind, 'Let');
|
|
378
|
+
assert.equal(stmt.name, '_');
|
|
379
|
+
const expr = stmt.expr;
|
|
380
|
+
assert.equal(expr.kind, 'Call');
|
|
381
|
+
assert.equal(expr.target.kind, 'Name');
|
|
382
|
+
});
|
|
383
|
+
it('If 无 else 时降级后 elseBlock 应为 null', () => {
|
|
384
|
+
const ifStmt = Node.If(Node.Bool(true), Node.Block([Node.Return(Node.Int(1))]), null);
|
|
385
|
+
const funcDecl = makeFunc({
|
|
386
|
+
name: 'onlyThen',
|
|
387
|
+
retType: Node.TypeName('Int'),
|
|
388
|
+
statements: [ifStmt, Node.Return(Node.Int(0))],
|
|
389
|
+
});
|
|
390
|
+
const moduleAst = Node.Module('test.lowering.if.then', [funcDecl]);
|
|
391
|
+
const core = lowerAst(moduleAst);
|
|
392
|
+
const stmt = core.decls[0].body.statements[0];
|
|
393
|
+
assert.equal(stmt.kind, 'If');
|
|
394
|
+
assert.ok(stmt.thenBlock);
|
|
395
|
+
assert.equal(stmt.elseBlock, null);
|
|
396
|
+
});
|
|
397
|
+
it('If 带 else 时应保留 elseBlock', () => {
|
|
398
|
+
const ifStmt = Node.If(Node.Bool(false), Node.Block([Node.Return(Node.Int(1))]), Node.Block([Node.Return(Node.Int(2))]));
|
|
399
|
+
const funcDecl = makeFunc({
|
|
400
|
+
name: 'withElse',
|
|
401
|
+
retType: Node.TypeName('Int'),
|
|
402
|
+
statements: [ifStmt, Node.Return(Node.Int(0))],
|
|
403
|
+
});
|
|
404
|
+
const moduleAst = Node.Module('test.lowering.if.else', [funcDecl]);
|
|
405
|
+
const core = lowerAst(moduleAst);
|
|
406
|
+
const stmt = core.decls[0].body.statements[0];
|
|
407
|
+
assert.equal(stmt.elseBlock.statements[0]?.kind, 'Return');
|
|
408
|
+
});
|
|
409
|
+
it('Within scope 块应降级为 Core.Scope', () => {
|
|
410
|
+
const scopeBlock = Node.Block([
|
|
411
|
+
Node.Let('temp', Node.Int(1)),
|
|
412
|
+
Node.Return(Node.Name('temp')),
|
|
413
|
+
]);
|
|
414
|
+
const funcDecl = makeFunc({
|
|
415
|
+
name: 'singleScope',
|
|
416
|
+
retType: Node.TypeName('Int'),
|
|
417
|
+
statements: [scopeBlock],
|
|
418
|
+
});
|
|
419
|
+
const moduleAst = Node.Module('test.lowering.scope.single', [funcDecl]);
|
|
420
|
+
const core = lowerAst(moduleAst);
|
|
421
|
+
const stmt = core.decls[0].body.statements[0];
|
|
422
|
+
assert.equal(stmt.kind, 'Scope');
|
|
423
|
+
assert.equal(stmt.statements[0]?.kind, 'Let');
|
|
424
|
+
});
|
|
425
|
+
it('嵌套 Within scope 应降级为嵌套 Scope', () => {
|
|
426
|
+
const inner = Node.Block([Node.Set('value', Node.Int(2))]);
|
|
427
|
+
const outer = Node.Block([
|
|
428
|
+
Node.Let('value', Node.Int(1)),
|
|
429
|
+
inner,
|
|
430
|
+
Node.Return(Node.Name('value')),
|
|
431
|
+
]);
|
|
432
|
+
const funcDecl = makeFunc({
|
|
433
|
+
name: 'nestedScope',
|
|
434
|
+
retType: Node.TypeName('Int'),
|
|
435
|
+
statements: [outer],
|
|
436
|
+
});
|
|
437
|
+
const moduleAst = Node.Module('test.lowering.scope.nested', [funcDecl]);
|
|
438
|
+
const core = lowerAst(moduleAst);
|
|
439
|
+
const scope = core.decls[0].body.statements[0];
|
|
440
|
+
assert.equal(scope.kind, 'Scope');
|
|
441
|
+
const nested = scope.statements[1];
|
|
442
|
+
assert.equal(nested.kind, 'Scope');
|
|
443
|
+
assert.equal(nested.statements[0]?.kind, 'Set');
|
|
444
|
+
});
|
|
445
|
+
it('TypePii 应降级为 Core.PiiType', () => {
|
|
446
|
+
const piiParam = makeParam('id', Node.TypePii(Node.TypeName('Text'), 'L2', 'email'));
|
|
447
|
+
const funcDecl = makeFunc({
|
|
448
|
+
name: 'mask',
|
|
449
|
+
params: [piiParam],
|
|
450
|
+
retType: Node.TypeName('Bool'),
|
|
451
|
+
statements: [Node.Return(Node.Bool(true))],
|
|
452
|
+
});
|
|
453
|
+
const moduleAst = Node.Module('test.lowering.type.pii', [funcDecl]);
|
|
454
|
+
const core = lowerAst(moduleAst);
|
|
455
|
+
const paramType = (core.decls[0].params[0]).type;
|
|
456
|
+
assert.equal(paramType.kind, 'PiiType');
|
|
457
|
+
assert.equal(paramType.baseType.kind, 'TypeName');
|
|
458
|
+
assert.equal(paramType.sensitivity, 'L2');
|
|
459
|
+
assert.equal(paramType.category, 'email');
|
|
460
|
+
});
|
|
461
|
+
it('函数应聚合参数与返回值的 PII 元数据', () => {
|
|
462
|
+
const funcDecl = Node.Func('shareProfile', [], [makeParam('userId', Node.TypePii(Node.TypeName('Text'), 'L1', 'name'))], Node.Result(Node.TypePii(Node.TypeName('Text'), 'L2', 'email'), Node.TypeName('Error')), [], [], false, Node.Block([
|
|
463
|
+
Node.Return(Node.Call(Node.Name('Ok'), [
|
|
464
|
+
Node.String('ok'),
|
|
465
|
+
])),
|
|
466
|
+
]));
|
|
467
|
+
const moduleAst = Node.Module('test.lowering.func.pii', [funcDecl]);
|
|
468
|
+
const core = lowerAst(moduleAst);
|
|
469
|
+
const func = core.decls[0];
|
|
470
|
+
assert.equal(func.piiLevel, 'L2');
|
|
471
|
+
assert.deepEqual(func.piiCategories, ['name', 'email']);
|
|
472
|
+
});
|
|
473
|
+
it('类型参数引用应降级为 Core.TypeVar', () => {
|
|
474
|
+
const funcDecl = Node.Func('identity', ['T'], [makeParam('value', Node.TypeName('T'))], Node.TypeName('T'), [], [], false, Node.Block([Node.Return(Node.Name('value'))]));
|
|
475
|
+
const moduleAst = Node.Module('test.lowering.type.var', [funcDecl]);
|
|
476
|
+
const core = lowerAst(moduleAst);
|
|
477
|
+
const func = core.decls[0];
|
|
478
|
+
assert.equal(func.params[0].type.kind, 'TypeVar');
|
|
479
|
+
assert.equal(func.ret.kind, 'TypeVar');
|
|
480
|
+
});
|
|
481
|
+
it('TypeApp 应降级并保留参数列表', () => {
|
|
482
|
+
const funcDecl = Node.Func('getFuture', [], [], Node.TypeApp('Future', [Node.TypeName('Text'), Node.TypeName('Int')]), [], [], false, Node.Block([Node.Return(Node.Name('pending'))]));
|
|
483
|
+
const moduleAst = Node.Module('test.lowering.type.app', [funcDecl]);
|
|
484
|
+
const core = lowerAst(moduleAst);
|
|
485
|
+
const ret = core.decls[0].ret;
|
|
486
|
+
assert.equal(ret.kind, 'TypeApp');
|
|
487
|
+
assert.equal(ret.base, 'Future');
|
|
488
|
+
assert.equal(ret.args.length, 2);
|
|
489
|
+
assert.equal(ret.args[0]?.kind, 'TypeName');
|
|
490
|
+
assert.equal(ret.args[1]?.kind, 'TypeName');
|
|
491
|
+
});
|
|
492
|
+
it('Option 类型应降级为 Core.Option', () => {
|
|
493
|
+
const funcDecl = makeFunc({
|
|
494
|
+
name: 'first',
|
|
495
|
+
params: [makeParam('items', Node.Option(Node.TypeName('Text')))],
|
|
496
|
+
retType: Node.Maybe(Node.TypeName('Text')),
|
|
497
|
+
statements: [Node.Return(Node.None())],
|
|
498
|
+
});
|
|
499
|
+
const moduleAst = Node.Module('test.lowering.type.option', [funcDecl]);
|
|
500
|
+
const core = lowerAst(moduleAst);
|
|
501
|
+
const paramType = (core.decls[0].params[0]).type;
|
|
502
|
+
const ret = core.decls[0].ret;
|
|
503
|
+
assert.equal(paramType.kind, 'Option');
|
|
504
|
+
assert.equal(paramType.type.kind, 'TypeName');
|
|
505
|
+
assert.equal(ret.kind, 'Maybe');
|
|
506
|
+
assert.equal(ret.type.kind, 'TypeName');
|
|
507
|
+
});
|
|
508
|
+
it('Result 类型应降级为 Core.Result', () => {
|
|
509
|
+
const funcDecl = makeFunc({
|
|
510
|
+
name: 'wrapResult',
|
|
511
|
+
retType: Node.Result(Node.TypeName('Text'), Node.TypeName('Error')),
|
|
512
|
+
statements: [Node.Return(Node.Ok(Node.String('ok')))],
|
|
513
|
+
});
|
|
514
|
+
const moduleAst = Node.Module('test.lowering.type.result', [funcDecl]);
|
|
515
|
+
const core = lowerAst(moduleAst);
|
|
516
|
+
const ret = core.decls[0].ret;
|
|
517
|
+
assert.equal(ret.kind, 'Result');
|
|
518
|
+
assert.equal(ret.ok.kind, 'TypeName');
|
|
519
|
+
assert.equal(ret.err.kind, 'TypeName');
|
|
520
|
+
});
|
|
521
|
+
it('Import 声明应直接映射为 Core.Import', () => {
|
|
522
|
+
const moduleAst = Node.Module('test.lowering.import', [
|
|
523
|
+
Node.Import('Http.Client', 'HttpClient'),
|
|
524
|
+
]);
|
|
525
|
+
const core = lowerAst(moduleAst);
|
|
526
|
+
const decl = core.decls[0];
|
|
527
|
+
assert.equal(decl.kind, 'Import');
|
|
528
|
+
assert.equal(decl.name, 'Http.Client');
|
|
529
|
+
assert.equal(decl.asName, 'HttpClient');
|
|
530
|
+
});
|
|
531
|
+
it('Data 字段 CNL 约束应转换为 Core 约束', () => {
|
|
532
|
+
const constraints = [
|
|
533
|
+
{ kind: 'Required', span: freshSpan() },
|
|
534
|
+
{ kind: 'Range', min: 0, max: 100, span: freshSpan() },
|
|
535
|
+
];
|
|
536
|
+
const field = {
|
|
537
|
+
name: 'age',
|
|
538
|
+
type: Node.TypeName('Int'),
|
|
539
|
+
constraints,
|
|
540
|
+
span: freshSpan(),
|
|
541
|
+
};
|
|
542
|
+
const dataDecl = Node.Data('User', [field]);
|
|
543
|
+
const moduleAst = Node.Module('test.lowering.data.constraints', [dataDecl]);
|
|
544
|
+
const core = lowerAst(moduleAst);
|
|
545
|
+
const data = core.decls[0];
|
|
546
|
+
assert.ok(data.fields[0].constraints, '应该存在 constraints');
|
|
547
|
+
assert.equal(data.fields[0].constraints.length, 2);
|
|
548
|
+
const requiredConstraint = data.fields[0].constraints[0];
|
|
549
|
+
const rangeConstraint = data.fields[0].constraints[1];
|
|
550
|
+
assert.equal(requiredConstraint.kind, 'Required');
|
|
551
|
+
assert.equal(rangeConstraint.kind, 'Range');
|
|
552
|
+
if (rangeConstraint.kind === 'Range') {
|
|
553
|
+
assert.equal(rangeConstraint.min, 0);
|
|
554
|
+
assert.equal(rangeConstraint.max, 100);
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
it('多约束字段与无约束字段应分别保留', () => {
|
|
558
|
+
const fieldWithConstraints = {
|
|
559
|
+
name: 'id',
|
|
560
|
+
type: Node.TypeName('Text'),
|
|
561
|
+
constraints: [
|
|
562
|
+
{ kind: 'Required', span: freshSpan() },
|
|
563
|
+
{ kind: 'Pattern', regexp: '^[A-Z]+$', span: freshSpan() },
|
|
564
|
+
],
|
|
565
|
+
span: freshSpan(),
|
|
566
|
+
};
|
|
567
|
+
const fieldWithoutConstraints = {
|
|
568
|
+
name: 'age',
|
|
569
|
+
type: Node.TypeName('Int'),
|
|
570
|
+
span: freshSpan(),
|
|
571
|
+
};
|
|
572
|
+
const dataDecl = Node.Data('Profile', [fieldWithConstraints, fieldWithoutConstraints]);
|
|
573
|
+
const moduleAst = Node.Module('test.lowering.data.multi_constraints', [dataDecl]);
|
|
574
|
+
const core = lowerAst(moduleAst);
|
|
575
|
+
const data = core.decls[0];
|
|
576
|
+
assert.equal(data.fields[0].constraints.length, 2);
|
|
577
|
+
assert.equal(data.fields[1].constraints.length, 0);
|
|
578
|
+
});
|
|
579
|
+
it('Construct 表达式应降级为 Core.Construct', () => {
|
|
580
|
+
const construct = Node.Construct('User', [
|
|
581
|
+
{ name: 'id', expr: Node.Int(1), span: freshSpan() },
|
|
582
|
+
{ name: 'name', expr: Node.String('Alice'), span: freshSpan() },
|
|
583
|
+
]);
|
|
584
|
+
const funcDecl = makeFunc({
|
|
585
|
+
name: 'buildUser',
|
|
586
|
+
retType: Node.TypeName('User'),
|
|
587
|
+
statements: [Node.Return(construct)],
|
|
588
|
+
});
|
|
589
|
+
const moduleAst = Node.Module('test.lowering.construct', [funcDecl]);
|
|
590
|
+
const core = lowerAst(moduleAst);
|
|
591
|
+
const expr = core.decls[0].body.statements[0]
|
|
592
|
+
.expr;
|
|
593
|
+
assert.equal(expr.kind, 'Construct');
|
|
594
|
+
assert.equal(expr.fields.length, 2);
|
|
595
|
+
assert.equal(expr.fields[0]?.name, 'id');
|
|
596
|
+
assert.equal(expr.fields[1]?.expr.kind, 'String');
|
|
597
|
+
});
|
|
598
|
+
it('Long 常量应降级为 Core.Long', () => {
|
|
599
|
+
const funcDecl = makeFunc({
|
|
600
|
+
name: 'longValue',
|
|
601
|
+
retType: Node.TypeName('Long'),
|
|
602
|
+
statements: [Node.Return(Node.Long('1234567890123456789'))],
|
|
603
|
+
});
|
|
604
|
+
const moduleAst = Node.Module('test.lowering.long', [funcDecl]);
|
|
605
|
+
const core = lowerAst(moduleAst);
|
|
606
|
+
const retStmt = core.decls[0].body.statements[0];
|
|
607
|
+
const expr = retStmt.expr;
|
|
608
|
+
assert.equal(expr.kind, 'Long');
|
|
609
|
+
assert.equal(expr.value, '1234567890123456789');
|
|
610
|
+
});
|
|
611
|
+
it('Double 常量应降级为 Core.Double', () => {
|
|
612
|
+
const funcDecl = makeFunc({
|
|
613
|
+
name: 'doubleValue',
|
|
614
|
+
retType: Node.TypeName('Double'),
|
|
615
|
+
statements: [Node.Return(Node.Double(3.14))],
|
|
616
|
+
});
|
|
617
|
+
const moduleAst = Node.Module('test.lowering.double', [funcDecl]);
|
|
618
|
+
const core = lowerAst(moduleAst);
|
|
619
|
+
const retStmt = core.decls[0].body.statements[0];
|
|
620
|
+
const expr = retStmt.expr;
|
|
621
|
+
assert.equal(expr.kind, 'Double');
|
|
622
|
+
assert.equal(expr.value, 3.14);
|
|
623
|
+
});
|
|
624
|
+
});
|
|
625
|
+
//# sourceMappingURL=lowering.test.js.map
|