@aster-cloud/aster-lang-ts 1.5.0 → 2.0.0
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/CHANGELOG.md +48 -0
- package/dist/scripts/aster.js +5 -12
- package/dist/scripts/aster.js.map +1 -1
- package/dist/scripts/emit-classfiles.js +3 -1
- package/dist/scripts/emit-classfiles.js.map +1 -1
- package/dist/scripts/generate-core-ir-types.d.ts +16 -0
- package/dist/scripts/generate-core-ir-types.d.ts.map +1 -0
- package/dist/scripts/generate-core-ir-types.js +116 -0
- package/dist/scripts/generate-core-ir-types.js.map +1 -0
- package/dist/scripts/golden.js +1 -1
- package/dist/scripts/golden.js.map +1 -1
- package/dist/src/ast/ast_visitor.d.ts +27 -27
- package/dist/src/ast/ast_visitor.d.ts.map +1 -1
- package/dist/src/ast/ast_visitor.js.map +1 -1
- package/dist/src/browser.d.ts +7 -0
- package/dist/src/browser.d.ts.map +1 -1
- package/dist/src/browser.js +6 -1
- package/dist/src/browser.js.map +1 -1
- package/dist/src/cli/policy-converter.js +6 -10
- package/dist/src/cli/policy-converter.js.map +1 -1
- package/dist/src/cli/utils/core-ir-file.d.ts +8 -0
- package/dist/src/cli/utils/core-ir-file.d.ts.map +1 -0
- package/dist/src/cli/utils/core-ir-file.js +29 -0
- package/dist/src/cli/utils/core-ir-file.js.map +1 -0
- package/dist/src/cnl-printer.d.ts.map +1 -1
- package/dist/src/cnl-printer.js +13 -3
- package/dist/src/cnl-printer.js.map +1 -1
- package/dist/src/compile-pipeline.js +1 -1
- package/dist/src/compile-pipeline.js.map +1 -1
- package/dist/src/config/lexicons/diagnostic-overlays.generated.d.ts.map +1 -1
- package/dist/src/config/lexicons/diagnostic-overlays.generated.js +18 -6
- package/dist/src/config/lexicons/diagnostic-overlays.generated.js.map +1 -1
- package/dist/src/core/canonical-decimal.d.ts +3 -0
- package/dist/src/core/canonical-decimal.d.ts.map +1 -0
- package/dist/src/core/canonical-decimal.js +19 -0
- package/dist/src/core/canonical-decimal.js.map +1 -0
- package/dist/src/core/canonical-json.d.ts +59 -0
- package/dist/src/core/canonical-json.d.ts.map +1 -0
- package/dist/src/core/canonical-json.js +250 -0
- package/dist/src/core/canonical-json.js.map +1 -0
- package/dist/src/core/core-ir-v2.generated.d.ts +807 -0
- package/dist/src/core/core-ir-v2.generated.d.ts.map +1 -0
- package/dist/src/core/core-ir-v2.generated.js +6 -0
- package/dist/src/core/core-ir-v2.generated.js.map +1 -0
- package/dist/src/core/core-ir-v2.schema.generated.d.ts +6 -0
- package/dist/src/core/core-ir-v2.schema.generated.d.ts.map +1 -0
- package/dist/src/core/core-ir-v2.schema.generated.js +2636 -0
- package/dist/src/core/core-ir-v2.schema.generated.js.map +1 -0
- package/dist/src/core/core_ir.d.ts +27 -11
- package/dist/src/core/core_ir.d.ts.map +1 -1
- package/dist/src/core/core_ir.js +118 -63
- package/dist/src/core/core_ir.js.map +1 -1
- package/dist/src/core/index.d.ts +4 -3
- package/dist/src/core/index.d.ts.map +1 -1
- package/dist/src/core/index.js +3 -2
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/core/inferred_fields.d.ts +9 -11
- package/dist/src/core/inferred_fields.d.ts.map +1 -1
- package/dist/src/core/inferred_fields.js +7 -28
- package/dist/src/core/inferred_fields.js.map +1 -1
- package/dist/src/core/interpreter.js +16 -35
- package/dist/src/core/interpreter.js.map +1 -1
- package/dist/src/core/pretty_core.d.ts.map +1 -1
- package/dist/src/core/pretty_core.js +6 -10
- package/dist/src/core/pretty_core.js.map +1 -1
- package/dist/src/core/read-core-ir.d.ts +15 -0
- package/dist/src/core/read-core-ir.d.ts.map +1 -0
- package/dist/src/core/read-core-ir.js +69 -0
- package/dist/src/core/read-core-ir.js.map +1 -0
- package/dist/src/core/resolution-mark.d.ts +3 -4
- package/dist/src/core/resolution-mark.d.ts.map +1 -1
- package/dist/src/core/resolution-mark.js +2 -3
- package/dist/src/core/resolution-mark.js.map +1 -1
- package/dist/src/core/resolve-typed-references.d.ts.map +1 -1
- package/dist/src/core/resolve-typed-references.js +11 -27
- package/dist/src/core/resolve-typed-references.js.map +1 -1
- package/dist/src/core/serialize-core-ir.d.ts +13 -0
- package/dist/src/core/serialize-core-ir.d.ts.map +1 -0
- package/dist/src/core/serialize-core-ir.js +125 -0
- package/dist/src/core/serialize-core-ir.js.map +1 -0
- package/dist/src/core/visitor.d.ts.map +1 -1
- package/dist/src/core/visitor.js +4 -1
- package/dist/src/core/visitor.js.map +1 -1
- package/dist/src/diagnostics/error_codes.d.ts +2 -0
- package/dist/src/diagnostics/error_codes.d.ts.map +1 -1
- package/dist/src/diagnostics/error_codes.js +16 -0
- package/dist/src/diagnostics/error_codes.js.map +1 -1
- package/dist/src/effects/declared-effects.d.ts +17 -0
- package/dist/src/effects/declared-effects.d.ts.map +1 -0
- package/dist/src/effects/declared-effects.js +27 -0
- package/dist/src/effects/declared-effects.js.map +1 -0
- package/dist/src/effects/effect_inference.d.ts.map +1 -1
- package/dist/src/effects/effect_inference.js +14 -10
- package/dist/src/effects/effect_inference.js.map +1 -1
- package/dist/src/effects/effect_inference_browser.d.ts.map +1 -1
- package/dist/src/effects/effect_inference_browser.js +14 -9
- package/dist/src/effects/effect_inference_browser.js.map +1 -1
- package/dist/src/frontend/keyword-translator.d.ts.map +1 -1
- package/dist/src/frontend/keyword-translator.js +3 -0
- package/dist/src/frontend/keyword-translator.js.map +1 -1
- package/dist/src/frontend/lexer.d.ts.map +1 -1
- package/dist/src/frontend/lexer.js +7 -3
- package/dist/src/frontend/lexer.js.map +1 -1
- package/dist/src/frontend/resolve-declarations.d.ts.map +1 -1
- package/dist/src/frontend/resolve-declarations.js +3 -23
- package/dist/src/frontend/resolve-declarations.js.map +1 -1
- package/dist/src/governance/controls-registry.data.js +2 -2
- package/dist/src/governance/controls-registry.data.js.map +1 -1
- package/dist/src/governance/input-refs.js +5 -8
- package/dist/src/governance/input-refs.js.map +1 -1
- package/dist/src/index.d.ts +5 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/jvm/emitter.d.ts.map +1 -1
- package/dist/src/jvm/emitter.js +20 -29
- package/dist/src/jvm/emitter.js.map +1 -1
- package/dist/src/lower_to_core.d.ts +2 -1
- package/dist/src/lower_to_core.d.ts.map +1 -1
- package/dist/src/lower_to_core.js +150 -300
- package/dist/src/lower_to_core.js.map +1 -1
- package/dist/src/lsp/pii_diagnostics.d.ts.map +1 -1
- package/dist/src/lsp/pii_diagnostics.js +3 -8
- package/dist/src/lsp/pii_diagnostics.js.map +1 -1
- package/dist/src/mapping/mapping-ir.d.ts +3 -3
- package/dist/src/mapping/mapping-ir.js +3 -3
- package/dist/src/nodeid/node-id-map.d.ts +6 -15
- package/dist/src/nodeid/node-id-map.d.ts.map +1 -1
- package/dist/src/nodeid/node-id-map.js +6 -15
- package/dist/src/nodeid/node-id-map.js.map +1 -1
- package/dist/src/parser/constraint-parser.js +25 -6
- package/dist/src/parser/constraint-parser.js.map +1 -1
- package/dist/src/parser/decl-parser.d.ts.map +1 -1
- package/dist/src/parser/decl-parser.js +30 -59
- package/dist/src/parser/decl-parser.js.map +1 -1
- package/dist/src/parser/expr-stmt-parser.d.ts.map +1 -1
- package/dist/src/parser/expr-stmt-parser.js +3 -2
- package/dist/src/parser/expr-stmt-parser.js.map +1 -1
- package/dist/src/parser/field-variant-parser.d.ts.map +1 -1
- package/dist/src/parser/field-variant-parser.js +6 -0
- package/dist/src/parser/field-variant-parser.js.map +1 -1
- package/dist/src/parser/parse-issue.d.ts +2 -0
- package/dist/src/parser/parse-issue.d.ts.map +1 -1
- package/dist/src/parser/parse-issue.js +2 -0
- package/dist/src/parser/parse-issue.js.map +1 -1
- package/dist/src/parser/type-parser.d.ts +1 -1
- package/dist/src/parser/type-parser.d.ts.map +1 -1
- package/dist/src/parser/type-parser.js +19 -2
- package/dist/src/parser/type-parser.js.map +1 -1
- package/dist/src/stability/stability_gate.d.ts +1 -1
- package/dist/src/stability/stability_gate.d.ts.map +1 -1
- package/dist/src/stability/stability_gate.js +2 -26
- package/dist/src/stability/stability_gate.js.map +1 -1
- package/dist/src/typecheck/async.d.ts.map +1 -1
- package/dist/src/typecheck/async.js +4 -1
- package/dist/src/typecheck/async.js.map +1 -1
- package/dist/src/typecheck/browser.d.ts.map +1 -1
- package/dist/src/typecheck/browser.js +4 -3
- package/dist/src/typecheck/browser.js.map +1 -1
- package/dist/src/typecheck/capabilities.d.ts.map +1 -1
- package/dist/src/typecheck/capabilities.js +3 -2
- package/dist/src/typecheck/capabilities.js.map +1 -1
- package/dist/src/typecheck/context.d.ts +5 -5
- package/dist/src/typecheck/context.d.ts.map +1 -1
- package/dist/src/typecheck/context.js.map +1 -1
- package/dist/src/typecheck/diagnostics.d.ts +2 -2
- package/dist/src/typecheck/diagnostics.d.ts.map +1 -1
- package/dist/src/typecheck/diagnostics.js.map +1 -1
- package/dist/src/typecheck/effects.js +7 -7
- package/dist/src/typecheck/effects.js.map +1 -1
- package/dist/src/typecheck/expression.d.ts +4 -4
- package/dist/src/typecheck/expression.d.ts.map +1 -1
- package/dist/src/typecheck/expression.js +1 -1
- package/dist/src/typecheck/expression.js.map +1 -1
- package/dist/src/typecheck/generics.d.ts +2 -2
- package/dist/src/typecheck/generics.d.ts.map +1 -1
- package/dist/src/typecheck/generics.js +23 -12
- package/dist/src/typecheck/generics.js.map +1 -1
- package/dist/src/typecheck/governance.d.ts +1 -1
- package/dist/src/typecheck/governance.d.ts.map +1 -1
- package/dist/src/typecheck/governance.js +1 -1
- package/dist/src/typecheck/governance.js.map +1 -1
- package/dist/src/typecheck/module.d.ts.map +1 -1
- package/dist/src/typecheck/module.js +7 -6
- package/dist/src/typecheck/module.js.map +1 -1
- package/dist/src/typecheck/pattern.d.ts +2 -2
- package/dist/src/typecheck/pattern.d.ts.map +1 -1
- package/dist/src/typecheck/pattern.js +12 -46
- package/dist/src/typecheck/pattern.js.map +1 -1
- package/dist/src/typecheck/pure.d.ts +19 -19
- package/dist/src/typecheck/pure.d.ts.map +1 -1
- package/dist/src/typecheck/pure.js.map +1 -1
- package/dist/src/typecheck/statement.d.ts +6 -6
- package/dist/src/typecheck/statement.d.ts.map +1 -1
- package/dist/src/typecheck/statement.js +17 -20
- package/dist/src/typecheck/statement.js.map +1 -1
- package/dist/src/typecheck/symbol_table.d.ts +2 -2
- package/dist/src/typecheck/symbol_table.d.ts.map +1 -1
- package/dist/src/typecheck/symbol_table.js.map +1 -1
- package/dist/src/typecheck/type_system.d.ts +4 -4
- package/dist/src/typecheck/type_system.d.ts.map +1 -1
- package/dist/src/typecheck/type_system.js +1 -1
- package/dist/src/typecheck/type_system.js.map +1 -1
- package/dist/src/typecheck/workflow.d.ts +3 -3
- package/dist/src/typecheck/workflow.d.ts.map +1 -1
- package/dist/src/typecheck/workflow.js.map +1 -1
- package/dist/src/typecheck-pii.d.ts.map +1 -1
- package/dist/src/typecheck-pii.js +2 -13
- package/dist/src/typecheck-pii.js.map +1 -1
- package/dist/src/types.d.ts +160 -172
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/version.d.ts +3 -3
- package/dist/src/version.js +3 -3
- package/dist/test/helpers/core-ir-v2.d.ts +5 -0
- package/dist/test/helpers/core-ir-v2.d.ts.map +1 -0
- package/dist/test/helpers/core-ir-v2.js +123 -0
- package/dist/test/helpers/core-ir-v2.js.map +1 -0
- package/dist/test/helpers/locales-core-ir.d.ts +7 -0
- package/dist/test/helpers/locales-core-ir.d.ts.map +1 -0
- package/dist/test/helpers/locales-core-ir.js +15 -0
- package/dist/test/helpers/locales-core-ir.js.map +1 -0
- package/dist/test/helpers/test-factories.d.ts +5 -5
- package/dist/test/helpers/test-factories.d.ts.map +1 -1
- package/dist/test/helpers/test-factories.js +9 -8
- package/dist/test/helpers/test-factories.js.map +1 -1
- package/dist/test/integration/pipeline/pipeline.test.js +1 -1
- package/dist/test/integration/pipeline/pipeline.test.js.map +1 -1
- package/dist/test/integration/vocabulary-resolution.test.js +1 -1
- package/dist/test/integration/vocabulary-resolution.test.js.map +1 -1
- package/dist/test/regression/type-checker-golden.test.js +1 -1
- package/dist/test/regression/type-checker-golden.test.js.map +1 -1
- package/dist/test/type-checker/pii-propagation.test.js +7 -6
- package/dist/test/type-checker/pii-propagation.test.js.map +1 -1
- package/dist/test/types/core-ir-v2.test-d.d.ts +28 -0
- package/dist/test/types/core-ir-v2.test-d.d.ts.map +1 -0
- package/dist/test/types/core-ir-v2.test-d.js +5 -0
- package/dist/test/types/core-ir-v2.test-d.js.map +1 -0
- package/dist/test/unit/browser/typecheck-browser-pii-failure.test.js +4 -3
- package/dist/test/unit/browser/typecheck-browser-pii-failure.test.js.map +1 -1
- package/dist/test/unit/canonicalizer/article-declaration-names.test.js +1 -1
- package/dist/test/unit/canonicalizer/article-declaration-names.test.js.map +1 -1
- package/dist/test/unit/canonicalizer/chinese-function-syntax.test.js +2 -1
- package/dist/test/unit/canonicalizer/chinese-function-syntax.test.js.map +1 -1
- package/dist/test/unit/core/canonical-json.test.d.ts +2 -0
- package/dist/test/unit/core/canonical-json.test.d.ts.map +1 -0
- package/dist/test/unit/core/canonical-json.test.js +38 -0
- package/dist/test/unit/core/canonical-json.test.js.map +1 -0
- package/dist/test/unit/core/caseless-pattern-name.test.js +6 -8
- package/dist/test/unit/core/caseless-pattern-name.test.js.map +1 -1
- package/dist/test/unit/core/core-ir-conformance.test.d.ts +2 -0
- package/dist/test/unit/core/core-ir-conformance.test.d.ts.map +1 -0
- package/dist/test/unit/core/core-ir-conformance.test.js +39 -0
- package/dist/test/unit/core/core-ir-conformance.test.js.map +1 -0
- package/dist/test/unit/core/core-ir-schema-parity.test.d.ts +2 -0
- package/dist/test/unit/core/core-ir-schema-parity.test.d.ts.map +1 -0
- package/dist/test/unit/core/core-ir-schema-parity.test.js +25 -0
- package/dist/test/unit/core/core-ir-schema-parity.test.js.map +1 -0
- package/dist/test/unit/core/core-ir-v2-outputs.test.d.ts +2 -0
- package/dist/test/unit/core/core-ir-v2-outputs.test.d.ts.map +1 -0
- package/dist/test/unit/core/core-ir-v2-outputs.test.js +128 -0
- package/dist/test/unit/core/core-ir-v2-outputs.test.js.map +1 -0
- package/dist/test/unit/core/read-core-ir.test.d.ts +2 -0
- package/dist/test/unit/core/read-core-ir.test.d.ts.map +1 -0
- package/dist/test/unit/core/read-core-ir.test.js +129 -0
- package/dist/test/unit/core/read-core-ir.test.js.map +1 -0
- package/dist/test/unit/core/resolve-typed-references.test.js +19 -16
- package/dist/test/unit/core/resolve-typed-references.test.js.map +1 -1
- package/dist/test/unit/diagnostics/lowering-diagnostics-parity.test.js +5 -5
- package/dist/test/unit/diagnostics/lowering-diagnostics-parity.test.js.map +1 -1
- package/dist/test/unit/diagnostics/parse-diagnostics-parity.test.js +3 -2
- package/dist/test/unit/diagnostics/parse-diagnostics-parity.test.js.map +1 -1
- package/dist/test/unit/effect/effect-inference.test.js +17 -13
- package/dist/test/unit/effect/effect-inference.test.js.map +1 -1
- package/dist/test/unit/emitter/emitter.test.js +47 -46
- package/dist/test/unit/emitter/emitter.test.js.map +1 -1
- package/dist/test/unit/formatter-corpus-roundtrip.test.js +5 -1
- package/dist/test/unit/formatter-corpus-roundtrip.test.js.map +1 -1
- package/dist/test/unit/formatter-roundtrip.test.js +5 -4
- package/dist/test/unit/formatter-roundtrip.test.js.map +1 -1
- package/dist/test/unit/frontend/resolve-declarations.test.js +13 -14
- package/dist/test/unit/frontend/resolve-declarations.test.js.map +1 -1
- package/dist/test/unit/governance/governance-check.test.js +1 -1
- package/dist/test/unit/governance/governance-check.test.js.map +1 -1
- package/dist/test/unit/governance/input-refs-parity.test.js +1 -1
- package/dist/test/unit/governance/input-refs-parity.test.js.map +1 -1
- package/dist/test/unit/governance/input-refs.test.js +2 -2
- package/dist/test/unit/governance/input-refs.test.js.map +1 -1
- package/dist/test/unit/governance/no-profile-ir-unchanged.test.js +6 -6
- package/dist/test/unit/governance/no-profile-ir-unchanged.test.js.map +1 -1
- package/dist/test/unit/governance/profile-check.test.js +14 -6
- package/dist/test/unit/governance/profile-check.test.js.map +1 -1
- package/dist/test/unit/interpreter/interpreter.test.js +23 -21
- package/dist/test/unit/interpreter/interpreter.test.js.map +1 -1
- package/dist/test/unit/interpreter/scope-writeback.test.js +28 -27
- package/dist/test/unit/interpreter/scope-writeback.test.js.map +1 -1
- package/dist/test/unit/keyword-aliases.test.js +1 -1
- package/dist/test/unit/lowering/core-ir-v2.test.d.ts +2 -0
- package/dist/test/unit/lowering/core-ir-v2.test.d.ts.map +1 -0
- package/dist/test/unit/lowering/core-ir-v2.test.js +253 -0
- package/dist/test/unit/lowering/core-ir-v2.test.js.map +1 -0
- package/dist/test/unit/lowering/lowering.test.js +19 -14
- package/dist/test/unit/lowering/lowering.test.js.map +1 -1
- package/dist/test/unit/lsp/pii-diagnostics.test.js +33 -30
- package/dist/test/unit/lsp/pii-diagnostics.test.js.map +1 -1
- package/dist/test/unit/lsp/utils.test.js +5 -4
- package/dist/test/unit/lsp/utils.test.js.map +1 -1
- package/dist/test/unit/parser/effect-unknown-name.test.js +7 -7
- package/dist/test/unit/parser/effect-unknown-name.test.js.map +1 -1
- package/dist/test/unit/parser/entry-annotations.test.js +2 -1
- package/dist/test/unit/parser/entry-annotations.test.js.map +1 -1
- package/dist/test/unit/parser/func-type.test.js +3 -3
- package/dist/test/unit/parser/func-type.test.js.map +1 -1
- package/dist/test/unit/parser/governance-sugar.test.js +4 -4
- package/dist/test/unit/parser/governance-sugar.test.js.map +1 -1
- package/dist/test/unit/parser/parser.test.js +5 -4
- package/dist/test/unit/parser/parser.test.js.map +1 -1
- package/dist/test/unit/rule-call-checks.test.js +2 -1
- package/dist/test/unit/rule-call-checks.test.js.map +1 -1
- package/dist/test/unit/typecheck/async-discipline-extended.test.js +11 -10
- package/dist/test/unit/typecheck/async-discipline-extended.test.js.map +1 -1
- package/dist/test/unit/typecheck/effect-prefix-injection.test.js +3 -2
- package/dist/test/unit/typecheck/effect-prefix-injection.test.js.map +1 -1
- package/dist/test/unit/typecheck/function-return-inference.test.js +33 -32
- package/dist/test/unit/typecheck/function-return-inference.test.js.map +1 -1
- package/dist/test/unit/typecheck/pii-cross-runtime-conformance.test.js +5 -4
- package/dist/test/unit/typecheck/pii-cross-runtime-conformance.test.js.map +1 -1
- package/dist/test/unit/typecheck/regression-fixes.test.js +110 -112
- package/dist/test/unit/typecheck/regression-fixes.test.js.map +1 -1
- package/dist/test/unit/typecheck/symbol-table.test.js +3 -2
- package/dist/test/unit/typecheck/symbol-table.test.js.map +1 -1
- package/dist/test/unit/typecheck/type-system-extended.test.js +6 -5
- package/dist/test/unit/typecheck/type-system-extended.test.js.map +1 -1
- package/dist/test/unit/typecheck/type-system.test.js +20 -19
- package/dist/test/unit/typecheck/type-system.test.js.map +1 -1
- package/dist/test/unit/typecheck/typecheck-advanced.test.js +19 -18
- package/dist/test/unit/typecheck/typecheck-advanced.test.js.map +1 -1
- package/dist/test/unit/typecheck/untyped-field-dynamic.test.js +6 -4
- package/dist/test/unit/typecheck/untyped-field-dynamic.test.js.map +1 -1
- package/dist/test/unit/version.test.js +3 -3
- package/package.json +4 -3
- package/dist/src/core/core_ir_json.d.ts +0 -62
- package/dist/src/core/core_ir_json.d.ts.map +0 -1
- package/dist/src/core/core_ir_json.js +0 -81
- package/dist/src/core/core_ir_json.js.map +0 -1
- package/dist/test/unit/core_ir_json/core_ir_json.test.d.ts +0 -2
- package/dist/test/unit/core_ir_json/core_ir_json.test.d.ts.map +0 -1
- package/dist/test/unit/core_ir_json/core_ir_json.test.js +0 -218
- package/dist/test/unit/core_ir_json/core_ir_json.test.js.map +0 -1
|
@@ -0,0 +1,807 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 本文件由 scripts/generate-core-ir-types.ts 从 shared/core-ir.v2.schema.json 生成,请勿手改。
|
|
3
|
+
* Core IR v2 的字段契约(ADR 0055);Core.* 类型须与这里的类型双向可赋值。
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 顶层声明。
|
|
7
|
+
*
|
|
8
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
9
|
+
* via the `definition` "Decl".
|
|
10
|
+
*/
|
|
11
|
+
export type IrDecl = IrImport | IrData | IrEnum | IrFunc;
|
|
12
|
+
/**
|
|
13
|
+
* 所有 JSON 整数的承载类型(ADR 0055 §3):与 Java int / Integer 一致,落在 CanonicalJson 的 safe integer 范围内。
|
|
14
|
+
*
|
|
15
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
16
|
+
* via the `definition` "Int32".
|
|
17
|
+
*/
|
|
18
|
+
export type IrInt32 = number;
|
|
19
|
+
/**
|
|
20
|
+
* 类型表达式。所有类型节点都带 origin(ADR 0055 #17)。
|
|
21
|
+
*
|
|
22
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
23
|
+
* via the `definition` "Type".
|
|
24
|
+
*/
|
|
25
|
+
export type IrType = IrTypeName | IrTypeVar | IrTypeApp | IrResult | IrMaybe | IrOption | IrList | IrMap | IrFuncType | IrPiiType;
|
|
26
|
+
/**
|
|
27
|
+
* 字段 / 形参约束(ADR 0055 #4)。与其它带 kind 的节点一样必带 origin(#17)。
|
|
28
|
+
*
|
|
29
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
30
|
+
* via the `definition` "Constraint".
|
|
31
|
+
*/
|
|
32
|
+
export type IrConstraint = IrRequired | IrRange | IrPattern;
|
|
33
|
+
/**
|
|
34
|
+
* 规范十进制串(ADR 0055 §5):无指数、无前导零、无尾随零,小数部分全零时省略小数点;不存在 "-0"。由 lowering 从源码字面量经任意精度十进制求出。
|
|
35
|
+
*
|
|
36
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
37
|
+
* via the `definition` "CanonicalDecimal".
|
|
38
|
+
*/
|
|
39
|
+
export type IrCanonicalDecimal = string;
|
|
40
|
+
/**
|
|
41
|
+
* 授权型具体效应名(小写)。pure、async 与未知名都不授权任何效应,lowering 不把它们写入 effects。
|
|
42
|
+
*
|
|
43
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
44
|
+
* via the `definition` "BuiltinEffect".
|
|
45
|
+
*/
|
|
46
|
+
export type IrBuiltinEffect = 'io' | 'cpu';
|
|
47
|
+
/**
|
|
48
|
+
* Func.effects 中的效应变量名:任意大小写下都不是保留效应名。它是否已在 effectParams 中声明由不变式检查(undeclared-effect-var)。
|
|
49
|
+
*
|
|
50
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
51
|
+
* via the `definition` "EffectVarName".
|
|
52
|
+
*/
|
|
53
|
+
export type IrEffectVarName = string;
|
|
54
|
+
/**
|
|
55
|
+
* 语句。
|
|
56
|
+
*
|
|
57
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
58
|
+
* via the `definition` "Stmt".
|
|
59
|
+
*/
|
|
60
|
+
export type IrStmt = IrLet | IrSet | IrReturn | IrIf | IrMatch | IrScope | IrBlock | IrStart | IrWait | IrWorkflow;
|
|
61
|
+
/**
|
|
62
|
+
* 表达式。
|
|
63
|
+
*
|
|
64
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
65
|
+
* via the `definition` "Expr".
|
|
66
|
+
*/
|
|
67
|
+
export type IrExpr = IrName | IrBool | IrInt | IrLong | IrDouble | IrDecimal | IrString | IrNull | IrOk | IrErr | IrSome | IrNone | IrConstruct | IrCall | IrLambda | IrAwait | IrIfExpr | IrListLit;
|
|
68
|
+
/**
|
|
69
|
+
* 匹配模式。
|
|
70
|
+
*
|
|
71
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
72
|
+
* via the `definition` "Pat".
|
|
73
|
+
*/
|
|
74
|
+
export type IrPat = IrPatNull | IrPatCtor | IrPatName | IrPatInt;
|
|
75
|
+
/**
|
|
76
|
+
* 匹配分支体:Return 或 Block。
|
|
77
|
+
*
|
|
78
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
79
|
+
* via the `definition` "CaseBody".
|
|
80
|
+
*/
|
|
81
|
+
export type IrCaseBody = IrReturn | IrBlock;
|
|
82
|
+
/**
|
|
83
|
+
* 只用于 Timeout.milliseconds(Java long):safe integer 范围,仍以 JSON number 承载。
|
|
84
|
+
*
|
|
85
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
86
|
+
* via the `definition` "SafeInt".
|
|
87
|
+
*/
|
|
88
|
+
export type IrSafeInt = number;
|
|
89
|
+
/**
|
|
90
|
+
* 保留的效应名:内建效应 io、cpu,以及不授权的 pure、async(core EffectChecker 中 async 是 pure 的废弃别名)。效应参数名按 ASCII 大小写不敏感比较不得落入此集合,由 validateCoreIrInvariants 检查(effect-param-shadows-builtin);EffectVarName 的 pattern 与此集合同步。
|
|
91
|
+
*
|
|
92
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
93
|
+
* via the `definition` "ReservedEffectName".
|
|
94
|
+
*/
|
|
95
|
+
export type IrReservedEffectName = 'io' | 'cpu' | 'pure' | 'async';
|
|
96
|
+
/**
|
|
97
|
+
* 编译单元(根节点)。schemaVersion 是整数 2(ADR 0055 #1、§5);name 在源码没有模块头时为 null;profile 是 ADR 0046 治理档案 id,未声明为 null。
|
|
98
|
+
*/
|
|
99
|
+
export interface IrModule {
|
|
100
|
+
readonly kind: 'Module';
|
|
101
|
+
readonly schemaVersion: 2;
|
|
102
|
+
readonly name: string | null;
|
|
103
|
+
readonly profile: string | null;
|
|
104
|
+
readonly decls: readonly IrDecl[];
|
|
105
|
+
readonly origin: IrOrigin;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* 导入(ADR 0055 #2):path 为点分模块路径,alias 为绑定名(未写别名为 null),version 为钉住的模块版本(未钉住为 null)。
|
|
109
|
+
*
|
|
110
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
111
|
+
* via the `definition` "Import".
|
|
112
|
+
*/
|
|
113
|
+
export interface IrImport {
|
|
114
|
+
readonly kind: 'Import';
|
|
115
|
+
readonly path: string;
|
|
116
|
+
readonly alias: string | null;
|
|
117
|
+
readonly version: IrInt32 | null;
|
|
118
|
+
readonly origin: IrOrigin;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* 源码范围(ADR 0055 #17):每个带 kind 的节点都必带且非 null(含约束元素)。written / role 是 ADR 0051 的原写法与解析角色,未改写时为 null。
|
|
122
|
+
*
|
|
123
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
124
|
+
* via the `definition` "Origin".
|
|
125
|
+
*/
|
|
126
|
+
export interface IrOrigin {
|
|
127
|
+
readonly file: string | null;
|
|
128
|
+
readonly start: IrPosition;
|
|
129
|
+
readonly end: IrPosition;
|
|
130
|
+
readonly written: string | null;
|
|
131
|
+
readonly role: 'TYPE_DECL' | 'FIELD_DECL' | 'MEMBER_DECL' | 'FUNC_DECL' | 'TYPE' | 'FIELD_REF' | 'MEMBER_REF' | 'FUNC_REF' | 'VALUE_REF' | 'LOCAL' | null;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* 源码位置,行列号均从 1 开始(值域只按 Int32 约束)。
|
|
135
|
+
*
|
|
136
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
137
|
+
* via the `definition` "Position".
|
|
138
|
+
*/
|
|
139
|
+
export interface IrPosition {
|
|
140
|
+
readonly line: IrInt32;
|
|
141
|
+
readonly col: IrInt32;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* 数据类型声明。
|
|
145
|
+
*
|
|
146
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
147
|
+
* via the `definition` "Data".
|
|
148
|
+
*/
|
|
149
|
+
export interface IrData {
|
|
150
|
+
readonly kind: 'Data';
|
|
151
|
+
readonly name: string;
|
|
152
|
+
readonly fields: readonly IrField[];
|
|
153
|
+
readonly origin: IrOrigin;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Data 字段。constraints 是源码约束(ADR 0055 #4);typeInferred 为 true 表示 type 只是推断出的占位(#9)。
|
|
157
|
+
*
|
|
158
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
159
|
+
* via the `definition` "Field".
|
|
160
|
+
*/
|
|
161
|
+
export interface IrField {
|
|
162
|
+
readonly name: string;
|
|
163
|
+
readonly type: IrType;
|
|
164
|
+
readonly annotations: readonly IrAnnotation[];
|
|
165
|
+
readonly constraints: readonly IrConstraint[];
|
|
166
|
+
readonly typeInferred: boolean;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* 具名类型。
|
|
170
|
+
*
|
|
171
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
172
|
+
* via the `definition` "TypeName".
|
|
173
|
+
*/
|
|
174
|
+
export interface IrTypeName {
|
|
175
|
+
readonly kind: 'TypeName';
|
|
176
|
+
readonly name: string;
|
|
177
|
+
readonly origin: IrOrigin;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* 类型变量。
|
|
181
|
+
*
|
|
182
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
183
|
+
* via the `definition` "TypeVar".
|
|
184
|
+
*/
|
|
185
|
+
export interface IrTypeVar {
|
|
186
|
+
readonly kind: 'TypeVar';
|
|
187
|
+
readonly name: string;
|
|
188
|
+
readonly origin: IrOrigin;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* 类型应用。
|
|
192
|
+
*
|
|
193
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
194
|
+
* via the `definition` "TypeApp".
|
|
195
|
+
*/
|
|
196
|
+
export interface IrTypeApp {
|
|
197
|
+
readonly kind: 'TypeApp';
|
|
198
|
+
readonly base: string;
|
|
199
|
+
readonly args: readonly IrType[];
|
|
200
|
+
readonly origin: IrOrigin;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* 结果类型。
|
|
204
|
+
*
|
|
205
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
206
|
+
* via the `definition` "Result".
|
|
207
|
+
*/
|
|
208
|
+
export interface IrResult {
|
|
209
|
+
readonly kind: 'Result';
|
|
210
|
+
readonly ok: IrType;
|
|
211
|
+
readonly err: IrType;
|
|
212
|
+
readonly origin: IrOrigin;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* 可空类型。
|
|
216
|
+
*
|
|
217
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
218
|
+
* via the `definition` "Maybe".
|
|
219
|
+
*/
|
|
220
|
+
export interface IrMaybe {
|
|
221
|
+
readonly kind: 'Maybe';
|
|
222
|
+
readonly type: IrType;
|
|
223
|
+
readonly origin: IrOrigin;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* 选项类型。
|
|
227
|
+
*
|
|
228
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
229
|
+
* via the `definition` "Option".
|
|
230
|
+
*/
|
|
231
|
+
export interface IrOption {
|
|
232
|
+
readonly kind: 'Option';
|
|
233
|
+
readonly type: IrType;
|
|
234
|
+
readonly origin: IrOrigin;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* 列表类型。
|
|
238
|
+
*
|
|
239
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
240
|
+
* via the `definition` "List".
|
|
241
|
+
*/
|
|
242
|
+
export interface IrList {
|
|
243
|
+
readonly kind: 'List';
|
|
244
|
+
readonly type: IrType;
|
|
245
|
+
readonly origin: IrOrigin;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* 映射类型。
|
|
249
|
+
*
|
|
250
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
251
|
+
* via the `definition` "Map".
|
|
252
|
+
*/
|
|
253
|
+
export interface IrMap {
|
|
254
|
+
readonly kind: 'Map';
|
|
255
|
+
readonly key: IrType;
|
|
256
|
+
readonly val: IrType;
|
|
257
|
+
readonly origin: IrOrigin;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* 函数类型。
|
|
261
|
+
*
|
|
262
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
263
|
+
* via the `definition` "FuncType".
|
|
264
|
+
*/
|
|
265
|
+
export interface IrFuncType {
|
|
266
|
+
readonly kind: 'FuncType';
|
|
267
|
+
readonly params: readonly IrType[];
|
|
268
|
+
readonly ret: IrType;
|
|
269
|
+
readonly origin: IrOrigin;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* PII 类型包装。
|
|
273
|
+
*
|
|
274
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
275
|
+
* via the `definition` "PiiType".
|
|
276
|
+
*/
|
|
277
|
+
export interface IrPiiType {
|
|
278
|
+
readonly kind: 'PiiType';
|
|
279
|
+
readonly baseType: IrType;
|
|
280
|
+
readonly sensitivity: string;
|
|
281
|
+
readonly category: string;
|
|
282
|
+
readonly origin: IrOrigin;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* 注解(ADR 0055 #3):args 是有序数组,保持源码顺序,无参为 []。同一注解内参数名唯一由不变式检查。
|
|
286
|
+
*
|
|
287
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
288
|
+
* via the `definition` "Annotation".
|
|
289
|
+
*/
|
|
290
|
+
export interface IrAnnotation {
|
|
291
|
+
readonly name: string;
|
|
292
|
+
readonly args: readonly IrAnnotationArg[];
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* 注解参数。位置参数按出现顺序命名为 $0、$1…(序号只在位置参数之间计数),具名参数用其名字;value 只能是 string / Int32 / boolean。
|
|
296
|
+
*
|
|
297
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
298
|
+
* via the `definition` "AnnotationArg".
|
|
299
|
+
*/
|
|
300
|
+
export interface IrAnnotationArg {
|
|
301
|
+
readonly name: string;
|
|
302
|
+
readonly value: string | boolean | IrInt32;
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* 必填约束。
|
|
306
|
+
*
|
|
307
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
308
|
+
* via the `definition` "Required".
|
|
309
|
+
*/
|
|
310
|
+
export interface IrRequired {
|
|
311
|
+
readonly kind: 'Required';
|
|
312
|
+
readonly origin: IrOrigin;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* 范围约束:min / max 是规范十进制串,至少一个非 null。
|
|
316
|
+
*
|
|
317
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
318
|
+
* via the `definition` "Range".
|
|
319
|
+
*/
|
|
320
|
+
export interface IrRange {
|
|
321
|
+
readonly kind: 'Range';
|
|
322
|
+
readonly min: IrCanonicalDecimal | null;
|
|
323
|
+
readonly max: IrCanonicalDecimal | null;
|
|
324
|
+
readonly origin: IrOrigin;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* 正则约束(源码 matching "…")。
|
|
328
|
+
*
|
|
329
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
330
|
+
* via the `definition` "Pattern".
|
|
331
|
+
*/
|
|
332
|
+
export interface IrPattern {
|
|
333
|
+
readonly kind: 'Pattern';
|
|
334
|
+
readonly regexp: string;
|
|
335
|
+
readonly origin: IrOrigin;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* 枚举声明。
|
|
339
|
+
*
|
|
340
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
341
|
+
* via the `definition` "Enum".
|
|
342
|
+
*/
|
|
343
|
+
export interface IrEnum {
|
|
344
|
+
readonly kind: 'Enum';
|
|
345
|
+
readonly name: string;
|
|
346
|
+
readonly variants: readonly string[];
|
|
347
|
+
readonly origin: IrOrigin;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* 函数 / 规则。typeParams 只列源码声明的类型参数(#10);effects 只含授权型具体效应 io / cpu(小写)与已声明的效应变量,按首次声明顺序、不重复;pure、async 与未知名不写入(#5、#6);inputRefs 是 v2 唯一可空的列表,null 表示未计算、[] 表示已计算且不读任何输入,合法状态由不变式检查(#12)。没有 piiLevel / piiCategories(#8)。
|
|
351
|
+
*
|
|
352
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
353
|
+
* via the `definition` "Func".
|
|
354
|
+
*/
|
|
355
|
+
export interface IrFunc {
|
|
356
|
+
readonly kind: 'Func';
|
|
357
|
+
readonly name: string;
|
|
358
|
+
readonly typeParams: readonly string[];
|
|
359
|
+
readonly params: readonly IrParam[];
|
|
360
|
+
readonly ret: IrType;
|
|
361
|
+
readonly retTypeInferred: boolean;
|
|
362
|
+
readonly annotations: readonly IrAnnotation[];
|
|
363
|
+
readonly retAnnotations: readonly IrAnnotation[];
|
|
364
|
+
readonly effects: readonly (IrBuiltinEffect | IrEffectVarName)[];
|
|
365
|
+
readonly effectParams: readonly string[];
|
|
366
|
+
readonly effectCaps: readonly string[];
|
|
367
|
+
readonly effectCapsExplicit: boolean;
|
|
368
|
+
readonly inputRefs: readonly string[] | null;
|
|
369
|
+
readonly body: IrBlock;
|
|
370
|
+
readonly origin: IrOrigin;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* 函数与 Lambda 的形参,字段与 Field 相同。
|
|
374
|
+
*
|
|
375
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
376
|
+
* via the `definition` "Param".
|
|
377
|
+
*/
|
|
378
|
+
export interface IrParam {
|
|
379
|
+
readonly name: string;
|
|
380
|
+
readonly type: IrType;
|
|
381
|
+
readonly annotations: readonly IrAnnotation[];
|
|
382
|
+
readonly constraints: readonly IrConstraint[];
|
|
383
|
+
readonly typeInferred: boolean;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* 代码块。
|
|
387
|
+
*
|
|
388
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
389
|
+
* via the `definition` "Block".
|
|
390
|
+
*/
|
|
391
|
+
export interface IrBlock {
|
|
392
|
+
readonly kind: 'Block';
|
|
393
|
+
readonly statements: readonly IrStmt[];
|
|
394
|
+
readonly origin: IrOrigin;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* 变量绑定。
|
|
398
|
+
*
|
|
399
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
400
|
+
* via the `definition` "Let".
|
|
401
|
+
*/
|
|
402
|
+
export interface IrLet {
|
|
403
|
+
readonly kind: 'Let';
|
|
404
|
+
readonly name: string;
|
|
405
|
+
readonly expr: IrExpr;
|
|
406
|
+
readonly origin: IrOrigin;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* 名称引用。
|
|
410
|
+
*
|
|
411
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
412
|
+
* via the `definition` "Name".
|
|
413
|
+
*/
|
|
414
|
+
export interface IrName {
|
|
415
|
+
readonly kind: 'Name';
|
|
416
|
+
readonly name: string;
|
|
417
|
+
readonly origin: IrOrigin;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* 布尔字面量。
|
|
421
|
+
*
|
|
422
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
423
|
+
* via the `definition` "Bool".
|
|
424
|
+
*/
|
|
425
|
+
export interface IrBool {
|
|
426
|
+
readonly kind: 'Bool';
|
|
427
|
+
readonly value: boolean;
|
|
428
|
+
readonly origin: IrOrigin;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* 32 位整数字面量。
|
|
432
|
+
*
|
|
433
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
434
|
+
* via the `definition` "Int".
|
|
435
|
+
*/
|
|
436
|
+
export interface IrInt {
|
|
437
|
+
readonly kind: 'Int';
|
|
438
|
+
readonly value: IrInt32;
|
|
439
|
+
readonly origin: IrOrigin;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* 64 位整数字面量,以十进制字符串承载。
|
|
443
|
+
*
|
|
444
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
445
|
+
* via the `definition` "Long".
|
|
446
|
+
*/
|
|
447
|
+
export interface IrLong {
|
|
448
|
+
readonly kind: 'Long';
|
|
449
|
+
readonly value: string;
|
|
450
|
+
readonly origin: IrOrigin;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* 浮点字面量(ADR 0055 #18):规范十进制串,不经二进制浮点。
|
|
454
|
+
*
|
|
455
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
456
|
+
* via the `definition` "Double".
|
|
457
|
+
*/
|
|
458
|
+
export interface IrDouble {
|
|
459
|
+
readonly kind: 'Double';
|
|
460
|
+
readonly value: IrCanonicalDecimal;
|
|
461
|
+
readonly origin: IrOrigin;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Decimal 字面量(ADR 0025):canonical 十进制字符串。
|
|
465
|
+
*
|
|
466
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
467
|
+
* via the `definition` "Decimal".
|
|
468
|
+
*/
|
|
469
|
+
export interface IrDecimal {
|
|
470
|
+
readonly kind: 'Decimal';
|
|
471
|
+
readonly value: string;
|
|
472
|
+
readonly origin: IrOrigin;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* 字符串字面量。
|
|
476
|
+
*
|
|
477
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
478
|
+
* via the `definition` "String".
|
|
479
|
+
*/
|
|
480
|
+
export interface IrString {
|
|
481
|
+
readonly kind: 'String';
|
|
482
|
+
readonly value: string;
|
|
483
|
+
readonly origin: IrOrigin;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* null 字面量。
|
|
487
|
+
*
|
|
488
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
489
|
+
* via the `definition` "Null".
|
|
490
|
+
*/
|
|
491
|
+
export interface IrNull {
|
|
492
|
+
readonly kind: 'Null';
|
|
493
|
+
readonly origin: IrOrigin;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Result 成功分支。
|
|
497
|
+
*
|
|
498
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
499
|
+
* via the `definition` "Ok".
|
|
500
|
+
*/
|
|
501
|
+
export interface IrOk {
|
|
502
|
+
readonly kind: 'Ok';
|
|
503
|
+
readonly expr: IrExpr;
|
|
504
|
+
readonly origin: IrOrigin;
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Result 错误分支。
|
|
508
|
+
*
|
|
509
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
510
|
+
* via the `definition` "Err".
|
|
511
|
+
*/
|
|
512
|
+
export interface IrErr {
|
|
513
|
+
readonly kind: 'Err';
|
|
514
|
+
readonly expr: IrExpr;
|
|
515
|
+
readonly origin: IrOrigin;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Option 有值分支。
|
|
519
|
+
*
|
|
520
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
521
|
+
* via the `definition` "Some".
|
|
522
|
+
*/
|
|
523
|
+
export interface IrSome {
|
|
524
|
+
readonly kind: 'Some';
|
|
525
|
+
readonly expr: IrExpr;
|
|
526
|
+
readonly origin: IrOrigin;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Option 无值。
|
|
530
|
+
*
|
|
531
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
532
|
+
* via the `definition` "None".
|
|
533
|
+
*/
|
|
534
|
+
export interface IrNone {
|
|
535
|
+
readonly kind: 'None';
|
|
536
|
+
readonly origin: IrOrigin;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* 构造表达式。
|
|
540
|
+
*
|
|
541
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
542
|
+
* via the `definition` "Construct".
|
|
543
|
+
*/
|
|
544
|
+
export interface IrConstruct {
|
|
545
|
+
readonly kind: 'Construct';
|
|
546
|
+
readonly typeName: string;
|
|
547
|
+
readonly fields: readonly IrFieldInit[];
|
|
548
|
+
readonly origin: IrOrigin;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Construct 的字段初始化。
|
|
552
|
+
*
|
|
553
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
554
|
+
* via the `definition` "FieldInit".
|
|
555
|
+
*/
|
|
556
|
+
export interface IrFieldInit {
|
|
557
|
+
readonly name: string;
|
|
558
|
+
readonly expr: IrExpr;
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* 调用。
|
|
562
|
+
*
|
|
563
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
564
|
+
* via the `definition` "Call".
|
|
565
|
+
*/
|
|
566
|
+
export interface IrCall {
|
|
567
|
+
readonly kind: 'Call';
|
|
568
|
+
readonly target: IrExpr;
|
|
569
|
+
readonly args: readonly IrExpr[];
|
|
570
|
+
readonly origin: IrOrigin;
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Lambda(ADR 0055 #13、#14):返回类型字段名为 ret;captures 恒输出。
|
|
574
|
+
*
|
|
575
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
576
|
+
* via the `definition` "Lambda".
|
|
577
|
+
*/
|
|
578
|
+
export interface IrLambda {
|
|
579
|
+
readonly kind: 'Lambda';
|
|
580
|
+
readonly params: readonly IrParam[];
|
|
581
|
+
readonly ret: IrType;
|
|
582
|
+
readonly body: IrBlock;
|
|
583
|
+
readonly captures: readonly string[];
|
|
584
|
+
readonly origin: IrOrigin;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* 等待异步结果。
|
|
588
|
+
*
|
|
589
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
590
|
+
* via the `definition` "Await".
|
|
591
|
+
*/
|
|
592
|
+
export interface IrAwait {
|
|
593
|
+
readonly kind: 'Await';
|
|
594
|
+
readonly expr: IrExpr;
|
|
595
|
+
readonly origin: IrOrigin;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* 表达式级条件(ADR 0019 G2b)。
|
|
599
|
+
*
|
|
600
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
601
|
+
* via the `definition` "IfExpr".
|
|
602
|
+
*/
|
|
603
|
+
export interface IrIfExpr {
|
|
604
|
+
readonly kind: 'IfExpr';
|
|
605
|
+
readonly cond: IrExpr;
|
|
606
|
+
readonly thenE: IrExpr;
|
|
607
|
+
readonly elseE: IrExpr;
|
|
608
|
+
readonly origin: IrOrigin;
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* 列表字面量。
|
|
612
|
+
*
|
|
613
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
614
|
+
* via the `definition` "ListLit".
|
|
615
|
+
*/
|
|
616
|
+
export interface IrListLit {
|
|
617
|
+
readonly kind: 'ListLit';
|
|
618
|
+
readonly elements: readonly IrExpr[];
|
|
619
|
+
readonly origin: IrOrigin;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* 赋值。
|
|
623
|
+
*
|
|
624
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
625
|
+
* via the `definition` "Set".
|
|
626
|
+
*/
|
|
627
|
+
export interface IrSet {
|
|
628
|
+
readonly kind: 'Set';
|
|
629
|
+
readonly name: string;
|
|
630
|
+
readonly expr: IrExpr;
|
|
631
|
+
readonly origin: IrOrigin;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* 返回。
|
|
635
|
+
*
|
|
636
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
637
|
+
* via the `definition` "Return".
|
|
638
|
+
*/
|
|
639
|
+
export interface IrReturn {
|
|
640
|
+
readonly kind: 'Return';
|
|
641
|
+
readonly expr: IrExpr;
|
|
642
|
+
readonly origin: IrOrigin;
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* 条件语句:没有 else 分支时 elseBlock 为 null。
|
|
646
|
+
*
|
|
647
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
648
|
+
* via the `definition` "If".
|
|
649
|
+
*/
|
|
650
|
+
export interface IrIf {
|
|
651
|
+
readonly kind: 'If';
|
|
652
|
+
readonly cond: IrExpr;
|
|
653
|
+
readonly thenBlock: IrBlock;
|
|
654
|
+
readonly elseBlock: IrBlock | null;
|
|
655
|
+
readonly origin: IrOrigin;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* 模式匹配。
|
|
659
|
+
*
|
|
660
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
661
|
+
* via the `definition` "Match".
|
|
662
|
+
*/
|
|
663
|
+
export interface IrMatch {
|
|
664
|
+
readonly kind: 'Match';
|
|
665
|
+
readonly expr: IrExpr;
|
|
666
|
+
readonly cases: readonly IrCase[];
|
|
667
|
+
readonly origin: IrOrigin;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* 匹配分支。
|
|
671
|
+
*
|
|
672
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
673
|
+
* via the `definition` "Case".
|
|
674
|
+
*/
|
|
675
|
+
export interface IrCase {
|
|
676
|
+
readonly kind: 'Case';
|
|
677
|
+
readonly pattern: IrPat;
|
|
678
|
+
readonly body: IrCaseBody;
|
|
679
|
+
readonly origin: IrOrigin;
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* null 模式。
|
|
683
|
+
*
|
|
684
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
685
|
+
* via the `definition` "PatNull".
|
|
686
|
+
*/
|
|
687
|
+
export interface IrPatNull {
|
|
688
|
+
readonly kind: 'PatNull';
|
|
689
|
+
readonly origin: IrOrigin;
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* 构造器 / 枚举变体模式(ADR 0055 #15、#16):0 参变体为 args:[];没有 names。
|
|
693
|
+
*
|
|
694
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
695
|
+
* via the `definition` "PatCtor".
|
|
696
|
+
*/
|
|
697
|
+
export interface IrPatCtor {
|
|
698
|
+
readonly kind: 'PatCtor';
|
|
699
|
+
readonly typeName: string;
|
|
700
|
+
readonly args: readonly IrPat[];
|
|
701
|
+
readonly origin: IrOrigin;
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* 绑定模式,只用于绑定(#16)。
|
|
705
|
+
*
|
|
706
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
707
|
+
* via the `definition` "PatName".
|
|
708
|
+
*/
|
|
709
|
+
export interface IrPatName {
|
|
710
|
+
readonly kind: 'PatName';
|
|
711
|
+
readonly name: string;
|
|
712
|
+
readonly origin: IrOrigin;
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* 整数模式。
|
|
716
|
+
*
|
|
717
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
718
|
+
* via the `definition` "PatInt".
|
|
719
|
+
*/
|
|
720
|
+
export interface IrPatInt {
|
|
721
|
+
readonly kind: 'PatInt';
|
|
722
|
+
readonly value: IrInt32;
|
|
723
|
+
readonly origin: IrOrigin;
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* 作用域。
|
|
727
|
+
*
|
|
728
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
729
|
+
* via the `definition` "Scope".
|
|
730
|
+
*/
|
|
731
|
+
export interface IrScope {
|
|
732
|
+
readonly kind: 'Scope';
|
|
733
|
+
readonly statements: readonly IrStmt[];
|
|
734
|
+
readonly origin: IrOrigin;
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* 启动异步任务。
|
|
738
|
+
*
|
|
739
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
740
|
+
* via the `definition` "Start".
|
|
741
|
+
*/
|
|
742
|
+
export interface IrStart {
|
|
743
|
+
readonly kind: 'Start';
|
|
744
|
+
readonly name: string;
|
|
745
|
+
readonly expr: IrExpr;
|
|
746
|
+
readonly origin: IrOrigin;
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* 等待异步任务。
|
|
750
|
+
*
|
|
751
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
752
|
+
* via the `definition` "Wait".
|
|
753
|
+
*/
|
|
754
|
+
export interface IrWait {
|
|
755
|
+
readonly kind: 'Wait';
|
|
756
|
+
readonly names: readonly string[];
|
|
757
|
+
readonly origin: IrOrigin;
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* 工作流(kind 为小写 workflow):未声明重试 / 超时时 retry / timeout 为 null。
|
|
761
|
+
*
|
|
762
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
763
|
+
* via the `definition` "Workflow".
|
|
764
|
+
*/
|
|
765
|
+
export interface IrWorkflow {
|
|
766
|
+
readonly kind: 'workflow';
|
|
767
|
+
readonly steps: readonly IrStep[];
|
|
768
|
+
readonly effectCaps: readonly string[];
|
|
769
|
+
readonly retry: IrRetryPolicy | null;
|
|
770
|
+
readonly timeout: IrTimeout | null;
|
|
771
|
+
readonly origin: IrOrigin;
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* 工作流步骤(kind 为小写 step):没有补偿块时 compensate 为 null。
|
|
775
|
+
*
|
|
776
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
777
|
+
* via the `definition` "Step".
|
|
778
|
+
*/
|
|
779
|
+
export interface IrStep {
|
|
780
|
+
readonly kind: 'step';
|
|
781
|
+
readonly name: string;
|
|
782
|
+
readonly body: IrBlock;
|
|
783
|
+
readonly compensate: IrBlock | null;
|
|
784
|
+
readonly dependencies: readonly string[];
|
|
785
|
+
readonly effectCaps: readonly string[];
|
|
786
|
+
readonly origin: IrOrigin;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* 重试策略。
|
|
790
|
+
*
|
|
791
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
792
|
+
* via the `definition` "RetryPolicy".
|
|
793
|
+
*/
|
|
794
|
+
export interface IrRetryPolicy {
|
|
795
|
+
readonly maxAttempts: IrInt32;
|
|
796
|
+
readonly backoff: 'exponential' | 'linear';
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* 超时(毫秒)。
|
|
800
|
+
*
|
|
801
|
+
* This interface was referenced by `IrModule`'s JSON-Schema
|
|
802
|
+
* via the `definition` "Timeout".
|
|
803
|
+
*/
|
|
804
|
+
export interface IrTimeout {
|
|
805
|
+
readonly milliseconds: IrSafeInt;
|
|
806
|
+
}
|
|
807
|
+
//# sourceMappingURL=core-ir-v2.generated.d.ts.map
|