semantifold 0.3.0 → 0.4.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/README.md +58 -15
- package/build/index.d.ts +48 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +57 -8
- package/build/src/artifact-path.d.ts +23 -1
- package/build/src/artifact-path.d.ts.map +1 -1
- package/build/src/artifact-path.js +45 -3
- package/build/src/artifacts.d.ts.map +1 -1
- package/build/src/artifacts.js +66 -1
- package/build/src/backends/c-validation.d.ts.map +1 -1
- package/build/src/backends/c-validation.js +7 -3
- package/build/src/backends/cpp-validation.d.ts.map +1 -1
- package/build/src/backends/cpp-validation.js +7 -3
- package/build/src/backends/csharp.js +7 -1
- package/build/src/backends/dart-runtime.d.ts +2 -0
- package/build/src/backends/dart-runtime.d.ts.map +1 -0
- package/build/src/backends/dart-runtime.js +41 -0
- package/build/src/backends/dart.d.ts +20 -0
- package/build/src/backends/dart.d.ts.map +1 -0
- package/build/src/backends/dart.js +321 -0
- package/build/src/backends/effects.d.ts +60 -0
- package/build/src/backends/effects.d.ts.map +1 -0
- package/build/src/backends/effects.js +746 -0
- package/build/src/backends/go.js +18 -4
- package/build/src/backends/identifiers.d.ts +36 -4
- package/build/src/backends/identifiers.d.ts.map +1 -1
- package/build/src/backends/identifiers.js +154 -10
- package/build/src/backends/index.d.ts.map +1 -1
- package/build/src/backends/index.js +27 -4
- package/build/src/backends/ios.d.ts +68 -0
- package/build/src/backends/ios.d.ts.map +1 -0
- package/build/src/backends/ios.js +1503 -0
- package/build/src/backends/java.d.ts.map +1 -1
- package/build/src/backends/java.js +429 -36
- package/build/src/backends/javascript.d.ts +6 -0
- package/build/src/backends/javascript.d.ts.map +1 -1
- package/build/src/backends/javascript.js +380 -24
- package/build/src/backends/kotlin-runtime.d.ts +3 -0
- package/build/src/backends/kotlin-runtime.d.ts.map +1 -0
- package/build/src/backends/kotlin-runtime.js +29 -0
- package/build/src/backends/kotlin.d.ts +23 -0
- package/build/src/backends/kotlin.d.ts.map +1 -0
- package/build/src/backends/kotlin.js +136 -0
- package/build/src/backends/native-validation.d.ts +2 -2
- package/build/src/backends/native-validation.d.ts.map +1 -1
- package/build/src/backends/native-validation.js +2 -2
- package/build/src/backends/ordered-expressions.d.ts.map +1 -1
- package/build/src/backends/ordered-expressions.js +39 -7
- package/build/src/backends/php-stdlib-support.d.ts +19 -0
- package/build/src/backends/php-stdlib-support.d.ts.map +1 -0
- package/build/src/backends/php-stdlib-support.js +227 -0
- package/build/src/backends/php.d.ts.map +1 -1
- package/build/src/backends/php.js +448 -33
- package/build/src/backends/program.d.ts +81 -0
- package/build/src/backends/program.d.ts.map +1 -0
- package/build/src/backends/program.js +1308 -0
- package/build/src/backends/python.js +7 -1
- package/build/src/backends/ruby.d.ts.map +1 -1
- package/build/src/backends/ruby.js +310 -24
- package/build/src/backends/rust-runtime.d.ts +7 -0
- package/build/src/backends/rust-runtime.d.ts.map +1 -0
- package/build/src/backends/rust-runtime.js +32 -0
- package/build/src/backends/rust-validation.d.ts +9 -0
- package/build/src/backends/rust-validation.d.ts.map +1 -0
- package/build/src/backends/rust-validation.js +78 -0
- package/build/src/backends/rust.d.ts +24 -0
- package/build/src/backends/rust.d.ts.map +1 -0
- package/build/src/backends/rust.js +344 -0
- package/build/src/backends/scalars.d.ts +14 -6
- package/build/src/backends/scalars.d.ts.map +1 -1
- package/build/src/backends/scalars.js +167 -17
- package/build/src/backends/shared.d.ts +23 -4
- package/build/src/backends/shared.d.ts.map +1 -1
- package/build/src/backends/shared.js +2158 -62
- package/build/src/backends/stdlib-support.d.ts +14 -0
- package/build/src/backends/stdlib-support.d.ts.map +1 -0
- package/build/src/backends/stdlib-support.js +237 -0
- package/build/src/backends/swift-runtime.d.ts +3 -0
- package/build/src/backends/swift-runtime.d.ts.map +1 -0
- package/build/src/backends/swift-runtime.js +14 -0
- package/build/src/backends/swift.d.ts +8 -0
- package/build/src/backends/swift.d.ts.map +1 -0
- package/build/src/backends/swift.js +127 -0
- package/build/src/backends/typescript.d.ts.map +1 -1
- package/build/src/backends/typescript.js +344 -24
- package/build/src/backends/wasm.d.ts +43 -0
- package/build/src/backends/wasm.d.ts.map +1 -0
- package/build/src/backends/wasm.js +2164 -0
- package/build/src/backends/writer.d.ts +235 -4
- package/build/src/backends/writer.d.ts.map +1 -1
- package/build/src/backends/writer.js +468 -3
- package/build/src/diagnostic.d.ts +4 -3
- package/build/src/diagnostic.d.ts.map +1 -1
- package/build/src/diagnostic.js +5 -3
- package/build/src/frontends/c.d.ts.map +1 -1
- package/build/src/frontends/c.js +5 -3
- package/build/src/frontends/cpp.d.ts.map +1 -1
- package/build/src/frontends/cpp.js +5 -3
- package/build/src/frontends/csharp.d.ts.map +1 -1
- package/build/src/frontends/csharp.js +7 -3
- package/build/src/frontends/dart.d.ts +10 -0
- package/build/src/frontends/dart.d.ts.map +1 -0
- package/build/src/frontends/dart.js +913 -0
- package/build/src/frontends/index.d.ts +3 -1
- package/build/src/frontends/index.d.ts.map +1 -1
- package/build/src/frontends/index.js +15 -5
- package/build/src/frontends/java.d.ts +110 -1
- package/build/src/frontends/java.d.ts.map +1 -1
- package/build/src/frontends/java.js +1725 -70
- package/build/src/frontends/javascript-typescript.d.ts +69 -1
- package/build/src/frontends/javascript-typescript.d.ts.map +1 -1
- package/build/src/frontends/javascript-typescript.js +1825 -93
- package/build/src/frontends/kotlin.d.ts +10 -0
- package/build/src/frontends/kotlin.d.ts.map +1 -0
- package/build/src/frontends/kotlin.js +685 -0
- package/build/src/frontends/php.d.ts +118 -1
- package/build/src/frontends/php.d.ts.map +1 -1
- package/build/src/frontends/php.js +1583 -76
- package/build/src/frontends/program.d.ts +74 -0
- package/build/src/frontends/program.d.ts.map +1 -0
- package/build/src/frontends/program.js +989 -0
- package/build/src/frontends/ruby.d.ts +68 -1
- package/build/src/frontends/ruby.d.ts.map +1 -1
- package/build/src/frontends/ruby.js +1446 -101
- package/build/src/frontends/rust-parser.d.ts +11 -0
- package/build/src/frontends/rust-parser.d.ts.map +1 -0
- package/build/src/frontends/rust-parser.js +15 -0
- package/build/src/frontends/rust.d.ts +14 -0
- package/build/src/frontends/rust.d.ts.map +1 -0
- package/build/src/frontends/rust.js +715 -0
- package/build/src/frontends/scalars.d.ts +10 -0
- package/build/src/frontends/scalars.d.ts.map +1 -1
- package/build/src/frontends/scalars.js +28 -2
- package/build/src/frontends/swift.d.ts +10 -0
- package/build/src/frontends/swift.d.ts.map +1 -0
- package/build/src/frontends/swift.js +860 -0
- package/build/src/frontends/types.d.ts +186 -0
- package/build/src/frontends/types.d.ts.map +1 -0
- package/build/src/frontends/types.js +634 -0
- package/build/src/language-registry.d.ts +46 -4
- package/build/src/language-registry.d.ts.map +1 -1
- package/build/src/language-registry.js +167 -13
- package/build/src/mapping.d.ts +2 -2
- package/build/src/mapping.d.ts.map +1 -1
- package/build/src/mapping.js +31 -10
- package/build/src/semantic/capabilities.d.ts +66 -0
- package/build/src/semantic/capabilities.d.ts.map +1 -0
- package/build/src/semantic/capabilities.js +649 -0
- package/build/src/semantic/effects.d.ts +26 -0
- package/build/src/semantic/effects.d.ts.map +1 -0
- package/build/src/semantic/effects.js +764 -0
- package/build/src/semantic/generics.d.ts +23 -0
- package/build/src/semantic/generics.d.ts.map +1 -0
- package/build/src/semantic/generics.js +61 -0
- package/build/src/semantic/lifetime.d.ts +37 -0
- package/build/src/semantic/lifetime.d.ts.map +1 -0
- package/build/src/semantic/lifetime.js +527 -0
- package/build/src/semantic/provenance.d.ts +9 -2
- package/build/src/semantic/provenance.d.ts.map +1 -1
- package/build/src/semantic/provenance.js +462 -20
- package/build/src/semantic/scalars.d.ts +11 -0
- package/build/src/semantic/scalars.d.ts.map +1 -1
- package/build/src/semantic/scalars.js +16 -1
- package/build/src/semantic/stdlib.d.ts +254 -0
- package/build/src/semantic/stdlib.d.ts.map +1 -0
- package/build/src/semantic/stdlib.js +880 -0
- package/build/src/semantic/types.d.ts +2952 -202
- package/build/src/semantic/types.d.ts.map +1 -1
- package/build/src/semantic/types.js +688 -15
- package/build/src/semantic/validate.d.ts +85 -5
- package/build/src/semantic/validate.d.ts.map +1 -1
- package/build/src/semantic/validate.js +2576 -98
- package/build/src/stdlib-facades.d.ts +304 -0
- package/build/src/stdlib-facades.d.ts.map +1 -0
- package/build/src/stdlib-facades.js +1167 -0
- package/build/src/stdlib-negotiation.d.ts +69 -0
- package/build/src/stdlib-negotiation.d.ts.map +1 -0
- package/build/src/stdlib-negotiation.js +403 -0
- package/build/src/stdlib-providers.d.ts +72 -0
- package/build/src/stdlib-providers.d.ts.map +1 -0
- package/build/src/stdlib-providers.js +339 -0
- package/build/src/toolchains.d.ts +55 -1
- package/build/src/toolchains.d.ts.map +1 -1
- package/build/src/toolchains.js +15 -4
- package/docs/architecture.md +45 -13
- package/docs/dart.md +60 -0
- package/docs/goals.md +3 -3
- package/docs/ios.md +121 -0
- package/docs/kotlin.md +42 -0
- package/docs/language-support.md +231 -26
- package/docs/multi-file-modules.md +52 -0
- package/docs/parser-qualification.md +121 -8
- package/docs/plans/2026-09-05-standard-library-portability.md +10 -10
- package/docs/rust.md +88 -0
- package/docs/source-maps.md +15 -7
- package/docs/standard-library-portability.md +39 -8
- package/docs/swift.md +44 -0
- package/docs/testing.md +366 -4
- package/docs/webassembly.md +52 -0
- package/index.js +63 -8
- package/node_modules/semantifold-tree-sitter-legacy-internal/README.md +2 -2
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/LICENSE +21 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/README.md +45 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/binding.gyp +30 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/binding.cc +20 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/binding_test.js +9 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/index.d.ts +28 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/index.js +11 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/grammar.js +1630 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/package.json +64 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/darwin-arm64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/darwin-x64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/linux-arm64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/linux-x64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/win32-arm64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/win32-x64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/queries/highlights.scm +159 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/queries/injections.scm +9 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/queries/tags.scm +60 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/grammar.json +9405 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/node-types.json +5399 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/parser.c +192569 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/scanner.c +393 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/tree_sitter/alloc.h +54 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/tree_sitter/array.h +290 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/tree_sitter/parser.h +266 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/tree-sitter-rust.wasm +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/tree-sitter.json +53 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/package.json +3 -2
- package/node_modules/semantifold-tree-sitter-legacy-internal/src/c.js +5 -4
- package/package.json +5 -2
- package/src/artifact-path.js +47 -2
- package/src/artifacts.js +67 -0
- package/src/backends/c-validation.js +6 -1
- package/src/backends/cpp-validation.js +6 -1
- package/src/backends/csharp.js +3 -0
- package/src/backends/dart-runtime.js +41 -0
- package/src/backends/dart.js +326 -0
- package/src/backends/effects.js +705 -0
- package/src/backends/go.js +14 -2
- package/src/backends/identifiers.js +160 -9
- package/src/backends/index.js +27 -2
- package/src/backends/ios.js +1612 -0
- package/src/backends/java.js +454 -36
- package/src/backends/javascript.js +389 -23
- package/src/backends/kotlin-runtime.js +29 -0
- package/src/backends/kotlin.js +141 -0
- package/src/backends/native-validation.js +1 -1
- package/src/backends/ordered-expressions.js +40 -6
- package/src/backends/php-stdlib-support.js +239 -0
- package/src/backends/php.js +469 -32
- package/src/backends/program.js +1407 -0
- package/src/backends/python.js +3 -0
- package/src/backends/ruby.js +326 -23
- package/src/backends/rust-runtime.js +34 -0
- package/src/backends/rust-validation.js +75 -0
- package/src/backends/rust.js +335 -0
- package/src/backends/scalars.js +141 -16
- package/src/backends/shared.js +2304 -124
- package/src/backends/stdlib-support.js +234 -0
- package/src/backends/swift-runtime.js +14 -0
- package/src/backends/swift.js +132 -0
- package/src/backends/typescript.js +349 -23
- package/src/backends/wasm.js +2208 -0
- package/src/backends/writer.js +520 -2
- package/src/diagnostic.js +4 -2
- package/src/frontends/c.js +4 -2
- package/src/frontends/cpp.js +4 -2
- package/src/frontends/csharp.js +4 -2
- package/src/frontends/dart.js +963 -0
- package/src/frontends/index.js +14 -4
- package/src/frontends/java.js +1977 -69
- package/src/frontends/javascript-typescript.js +2046 -102
- package/src/frontends/kotlin.js +713 -0
- package/src/frontends/php.js +1725 -79
- package/src/frontends/program.js +1062 -0
- package/src/frontends/ruby.js +1624 -98
- package/src/frontends/rust-parser.js +18 -0
- package/src/frontends/rust.js +714 -0
- package/src/frontends/scalars.js +31 -1
- package/src/frontends/swift.js +893 -0
- package/src/frontends/types.js +750 -0
- package/src/language-registry.js +172 -12
- package/src/mapping.js +33 -9
- package/src/semantic/capabilities.js +671 -0
- package/src/semantic/effects.js +737 -0
- package/src/semantic/generics.js +58 -0
- package/src/semantic/lifetime.js +517 -0
- package/src/semantic/provenance.js +412 -19
- package/src/semantic/scalars.js +17 -0
- package/src/semantic/stdlib.js +921 -0
- package/src/semantic/types.js +765 -14
- package/src/semantic/validate.js +2934 -209
- package/src/stdlib-facades.js +1211 -0
- package/src/stdlib-negotiation.js +446 -0
- package/src/stdlib-providers.js +377 -0
- package/src/toolchains.js +16 -3
|
@@ -1,11 +1,150 @@
|
|
|
1
|
-
export type SemanticLanguage = "php" | "ruby" | "javascript" | "typescript" | "java" | "python" | "csharp" | "go" | "c" | "cpp";
|
|
1
|
+
export type SemanticLanguage = "php" | "ruby" | "javascript" | "typescript" | "java" | "kotlin" | "python" | "csharp" | "go" | "c" | "cpp" | "rust" | "swift" | "dart";
|
|
2
|
+
export type TextBackendLanguage = SemanticLanguage;
|
|
3
|
+
export type BackendLanguage = TextBackendLanguage | "wasm" | "ios";
|
|
4
|
+
export type GeneratedTextLanguage = SemanticLanguage | "html";
|
|
2
5
|
export type SemanticTypeName = "integer" | "boolean" | "string";
|
|
6
|
+
export type FunctionReturnTypeName = SemanticTypeName | "void";
|
|
3
7
|
export type SemanticUnaryOperation = "IntegerNegate" | "BooleanNot";
|
|
4
8
|
export type SemanticBinaryOperation = "IntegerAdd" | "IntegerSubtract" | "IntegerMultiply" | "BooleanAnd" | "BooleanOr" | "IntegerEqual" | "IntegerNotEqual" | "BooleanEqual" | "BooleanNotEqual" | "StringEqual" | "StringNotEqual" | "IntegerLessThan" | "IntegerLessThanOrEqual" | "IntegerGreaterThan" | "IntegerGreaterThanOrEqual" | "StringConcat";
|
|
5
|
-
export type SemanticSymbolKind = "function" | "parameter" | "local";
|
|
6
|
-
export type
|
|
9
|
+
export type SemanticSymbolKind = "capability" | "resource" | "failure" | "operation" | "record" | "class" | "error" | "field" | "constructor" | "method" | "function" | "typeParameter" | "parameter" | "local" | "iteration" | "catch";
|
|
10
|
+
export type SemanticDeclarationKind = "record" | "class" | "error" | "function";
|
|
11
|
+
export type SemanticSymbolRole = "declaration" | "type" | "construct" | "member" | "read" | "write" | "call";
|
|
7
12
|
export type AcceptanceStage = "parse" | "generate" | "restore" | "compile" | "link" | "validate" | "instantiate" | "execute";
|
|
8
13
|
export type GeneratedArtifactRole = "entry" | "source" | "manifest" | "support" | "mapping" | "resource" | "loader";
|
|
14
|
+
export type IosApplicationConfigurationInput = {
|
|
15
|
+
/**
|
|
16
|
+
* - Safe Xcode product/path identity.
|
|
17
|
+
*/
|
|
18
|
+
productName: string;
|
|
19
|
+
/**
|
|
20
|
+
* - Safe Swift module identity.
|
|
21
|
+
*/
|
|
22
|
+
moduleName: string;
|
|
23
|
+
/**
|
|
24
|
+
* - Caller-supplied reverse-DNS organization prefix.
|
|
25
|
+
*/
|
|
26
|
+
organizationPrefix: string;
|
|
27
|
+
/**
|
|
28
|
+
* - Caller-supplied reverse-DNS application bundle identity.
|
|
29
|
+
*/
|
|
30
|
+
bundleIdentifier: string;
|
|
31
|
+
/**
|
|
32
|
+
* - Caller-supplied major.minor iOS deployment target; never inferred.
|
|
33
|
+
*/
|
|
34
|
+
deploymentTarget: string;
|
|
35
|
+
/**
|
|
36
|
+
* - User-visible application name.
|
|
37
|
+
*/
|
|
38
|
+
displayName: string;
|
|
39
|
+
/**
|
|
40
|
+
* - Fixed generated-source root.
|
|
41
|
+
*/
|
|
42
|
+
sourceRoot?: "Sources";
|
|
43
|
+
/**
|
|
44
|
+
* - Fixed caller-resource root.
|
|
45
|
+
*/
|
|
46
|
+
resourceRoot?: "Assets.xcassets";
|
|
47
|
+
/**
|
|
48
|
+
* - Sole supported lifecycle.
|
|
49
|
+
*/
|
|
50
|
+
lifecycle?: "swiftui";
|
|
51
|
+
/**
|
|
52
|
+
* - Closed baseline caller plist extension; currently empty.
|
|
53
|
+
*/
|
|
54
|
+
infoPlist?: Record<string, never>;
|
|
55
|
+
/**
|
|
56
|
+
* - Validated as the closed empty baseline permissions.
|
|
57
|
+
*/
|
|
58
|
+
permissions?: unknown[];
|
|
59
|
+
/**
|
|
60
|
+
* - Validated as the closed empty baseline entitlements.
|
|
61
|
+
*/
|
|
62
|
+
entitlements?: unknown[];
|
|
63
|
+
/**
|
|
64
|
+
* - Validated as the closed empty baseline privacy declarations.
|
|
65
|
+
*/
|
|
66
|
+
privacyDeclarations?: unknown[];
|
|
67
|
+
/**
|
|
68
|
+
* - Validated as the closed empty baseline Apple capabilities.
|
|
69
|
+
*/
|
|
70
|
+
capabilities?: unknown[];
|
|
71
|
+
};
|
|
72
|
+
export type IosApplicationConfiguration = {
|
|
73
|
+
/**
|
|
74
|
+
* - Validated Xcode product/path identity.
|
|
75
|
+
*/
|
|
76
|
+
productName: string;
|
|
77
|
+
/**
|
|
78
|
+
* - Validated Swift module identity.
|
|
79
|
+
*/
|
|
80
|
+
moduleName: string;
|
|
81
|
+
/**
|
|
82
|
+
* - Validated reverse-DNS organization prefix.
|
|
83
|
+
*/
|
|
84
|
+
organizationPrefix: string;
|
|
85
|
+
/**
|
|
86
|
+
* - Validated reverse-DNS application bundle identity.
|
|
87
|
+
*/
|
|
88
|
+
bundleIdentifier: string;
|
|
89
|
+
/**
|
|
90
|
+
* - Validated caller-supplied deployment target.
|
|
91
|
+
*/
|
|
92
|
+
deploymentTarget: string;
|
|
93
|
+
/**
|
|
94
|
+
* - Validated display name.
|
|
95
|
+
*/
|
|
96
|
+
displayName: string;
|
|
97
|
+
/**
|
|
98
|
+
* - Generated-source root.
|
|
99
|
+
*/
|
|
100
|
+
sourceRoot: "Sources";
|
|
101
|
+
/**
|
|
102
|
+
* - Caller-resource root.
|
|
103
|
+
*/
|
|
104
|
+
resourceRoot: "Assets.xcassets";
|
|
105
|
+
/**
|
|
106
|
+
* - Sole supported lifecycle.
|
|
107
|
+
*/
|
|
108
|
+
lifecycle: "swiftui";
|
|
109
|
+
/**
|
|
110
|
+
* - Empty caller plist extension.
|
|
111
|
+
*/
|
|
112
|
+
infoPlist: Readonly<Record<string, never>>;
|
|
113
|
+
/**
|
|
114
|
+
* - Empty baseline permissions.
|
|
115
|
+
*/
|
|
116
|
+
permissions: readonly never[];
|
|
117
|
+
/**
|
|
118
|
+
* - Empty baseline entitlements.
|
|
119
|
+
*/
|
|
120
|
+
entitlements: readonly never[];
|
|
121
|
+
/**
|
|
122
|
+
* - Empty baseline privacy declarations.
|
|
123
|
+
*/
|
|
124
|
+
privacyDeclarations: readonly never[];
|
|
125
|
+
/**
|
|
126
|
+
* - Empty baseline Apple capabilities.
|
|
127
|
+
*/
|
|
128
|
+
capabilities: readonly never[];
|
|
129
|
+
};
|
|
130
|
+
export type IosApplicationAssetInput = {
|
|
131
|
+
/**
|
|
132
|
+
* - Full safe destination below Assets.xcassets.
|
|
133
|
+
*/
|
|
134
|
+
path: string;
|
|
135
|
+
/**
|
|
136
|
+
* - Exact caller-provided text or bytes.
|
|
137
|
+
*/
|
|
138
|
+
content: string | Uint8Array;
|
|
139
|
+
/**
|
|
140
|
+
* - Explicit artifact media type.
|
|
141
|
+
*/
|
|
142
|
+
mediaType: string;
|
|
143
|
+
/**
|
|
144
|
+
* - Lowercase SHA-256 of exact UTF-8 text or bytes.
|
|
145
|
+
*/
|
|
146
|
+
sha256: string;
|
|
147
|
+
};
|
|
9
148
|
export type LanguageRoleCapabilities = {
|
|
10
149
|
/**
|
|
11
150
|
* - Parser adapter availability.
|
|
@@ -27,6 +166,10 @@ export type LanguageRoleCapabilities = {
|
|
|
27
166
|
* - Interoperability bridge availability.
|
|
28
167
|
*/
|
|
29
168
|
interoperability: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* - Target host stdlib provider/native-binding availability.
|
|
171
|
+
*/
|
|
172
|
+
provider: boolean;
|
|
30
173
|
};
|
|
31
174
|
export type LanguageMappingCapabilities = {
|
|
32
175
|
/**
|
|
@@ -52,6 +195,52 @@ export type LanguageAcceptanceCapabilities = {
|
|
|
52
195
|
*/
|
|
53
196
|
toolchains: readonly string[];
|
|
54
197
|
};
|
|
198
|
+
export type LanguageFeatureCapabilities = {
|
|
199
|
+
/**
|
|
200
|
+
* - Task 005 arbitrary required signatures, resolved direct calls, and void functions.
|
|
201
|
+
*/
|
|
202
|
+
generalFunctionsAndCalls: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* - Task 006 recursive immutable lists/maps, total access, and size.
|
|
205
|
+
*/
|
|
206
|
+
immutableCollections: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* - Task 007 explicit optional values, presence tests, and guarded unwrap.
|
|
209
|
+
*/
|
|
210
|
+
optionalValues: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* - Task 008 ordered immutable-list iteration and nearest-loop control.
|
|
213
|
+
*/
|
|
214
|
+
orderedListIteration: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* - Task 014 insertion-ordered immutable-map pair iteration.
|
|
217
|
+
*/
|
|
218
|
+
orderedMapIteration: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* - Task 032 strict-Boolean pre-condition loops and resolved control.
|
|
221
|
+
*/
|
|
222
|
+
conditionControlledLoops: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* - Task 009 nominal closed immutable records, construction, and member reads.
|
|
225
|
+
*/
|
|
226
|
+
closedRecords: boolean;
|
|
227
|
+
/**
|
|
228
|
+
* - Task 011 nominal unchecked errors, raises, and exact typed catches.
|
|
229
|
+
*/
|
|
230
|
+
typedErrors: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* - Task 012 invariant unbounded type parameters and closed generic applications.
|
|
233
|
+
*/
|
|
234
|
+
typeParametersAndGenerics: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* - Task 033 nominal reference classes, private instance state, exact constructors, and receiver methods.
|
|
237
|
+
*/
|
|
238
|
+
referenceClasses: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* - Task 034 authorized host effects, typed failures, and owned resources.
|
|
241
|
+
*/
|
|
242
|
+
effectfulCapabilitiesAndResources: boolean;
|
|
243
|
+
};
|
|
55
244
|
export type LanguageCapabilities = {
|
|
56
245
|
/**
|
|
57
246
|
* - Stable registry identity.
|
|
@@ -69,6 +258,10 @@ export type LanguageCapabilities = {
|
|
|
69
258
|
* - Whether frontend/backend round-trip acceptance is declared.
|
|
70
259
|
*/
|
|
71
260
|
roundTrip: boolean;
|
|
261
|
+
/**
|
|
262
|
+
* - Semantic feature capabilities.
|
|
263
|
+
*/
|
|
264
|
+
features: Readonly<LanguageFeatureCapabilities>;
|
|
72
265
|
/**
|
|
73
266
|
* - Mapping forms.
|
|
74
267
|
*/
|
|
@@ -123,6 +316,10 @@ export type RegisteredSource = {
|
|
|
123
316
|
* - Parser language when known.
|
|
124
317
|
*/
|
|
125
318
|
language: SemanticLanguage | null;
|
|
319
|
+
/**
|
|
320
|
+
* - Caller or compiler-owned source role for semantic programs.
|
|
321
|
+
*/
|
|
322
|
+
ownership?: "application" | "facade";
|
|
126
323
|
};
|
|
127
324
|
export type SourceOrigin = {
|
|
128
325
|
/**
|
|
@@ -310,6 +507,10 @@ export type SemanticSymbolProvenance = {
|
|
|
310
507
|
* - Declaring node identity.
|
|
311
508
|
*/
|
|
312
509
|
declarationNodeId: string;
|
|
510
|
+
/**
|
|
511
|
+
* - Stable semantic declaration identity for record, field, and function symbols.
|
|
512
|
+
*/
|
|
513
|
+
semanticDeclarationId?: string;
|
|
313
514
|
/**
|
|
314
515
|
* - Exact declaration-name range.
|
|
315
516
|
*/
|
|
@@ -382,9 +583,9 @@ export type GeneratedSource = {
|
|
|
382
583
|
*/
|
|
383
584
|
filename: string;
|
|
384
585
|
/**
|
|
385
|
-
* - Output language.
|
|
586
|
+
* - Output text language.
|
|
386
587
|
*/
|
|
387
|
-
language:
|
|
588
|
+
language: GeneratedTextLanguage;
|
|
388
589
|
/**
|
|
389
590
|
* - Exact generated LF source.
|
|
390
591
|
*/
|
|
@@ -544,6 +745,10 @@ export type GeneratedArtifactSet = {
|
|
|
544
745
|
* - Deterministic artifact order.
|
|
545
746
|
*/
|
|
546
747
|
artifacts: readonly GeneratedSetArtifact[];
|
|
748
|
+
/**
|
|
749
|
+
* - Detached target-specific JSON metadata.
|
|
750
|
+
*/
|
|
751
|
+
metadata?: Readonly<Record<string, unknown>>;
|
|
547
752
|
};
|
|
548
753
|
export type DiscoveredToolchain = {
|
|
549
754
|
/**
|
|
@@ -563,11 +768,11 @@ export type DiscoveredToolchain = {
|
|
|
563
768
|
*/
|
|
564
769
|
source: "override" | "canonical";
|
|
565
770
|
/**
|
|
566
|
-
* - First
|
|
771
|
+
* - First selected-stream version line.
|
|
567
772
|
*/
|
|
568
773
|
version: string;
|
|
569
774
|
/**
|
|
570
|
-
* - Complete
|
|
775
|
+
* - Complete normalized stdout, or normalized stderr when stdout is empty.
|
|
571
776
|
*/
|
|
572
777
|
versionOutput: string;
|
|
573
778
|
/**
|
|
@@ -621,7 +826,7 @@ export type TypeReference = {
|
|
|
621
826
|
*/
|
|
622
827
|
kind: "TypeReference";
|
|
623
828
|
/**
|
|
624
|
-
* - Normalized type name.
|
|
829
|
+
* - Normalized scalar value type name.
|
|
625
830
|
*/
|
|
626
831
|
name: SemanticTypeName;
|
|
627
832
|
/**
|
|
@@ -629,240 +834,273 @@ export type TypeReference = {
|
|
|
629
834
|
*/
|
|
630
835
|
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
631
836
|
};
|
|
632
|
-
export type
|
|
837
|
+
export type TypeParameter = {
|
|
633
838
|
/**
|
|
634
|
-
* -
|
|
839
|
+
* - Declaration-scoped invariant unbounded type parameter.
|
|
635
840
|
*/
|
|
636
|
-
kind: "
|
|
841
|
+
kind: "TypeParameter";
|
|
637
842
|
/**
|
|
638
|
-
* -
|
|
843
|
+
* - Stable declaration-scoped identity, required after validation.
|
|
639
844
|
*/
|
|
640
|
-
|
|
845
|
+
id?: string;
|
|
641
846
|
/**
|
|
642
|
-
* -
|
|
847
|
+
* - Source-visible type parameter name.
|
|
643
848
|
*/
|
|
644
|
-
|
|
849
|
+
name: string;
|
|
645
850
|
/**
|
|
646
|
-
* -
|
|
851
|
+
* - Parser-owned declaration location.
|
|
647
852
|
*/
|
|
648
853
|
location: SourceLocation;
|
|
649
854
|
/**
|
|
650
|
-
* -
|
|
855
|
+
* - Parser-owned declaration-name range.
|
|
651
856
|
*/
|
|
652
857
|
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
653
858
|
};
|
|
654
|
-
export type
|
|
859
|
+
export type TypeVariableReference = {
|
|
655
860
|
/**
|
|
656
|
-
* -
|
|
861
|
+
* - Reference to one declaration-scoped type parameter.
|
|
657
862
|
*/
|
|
658
|
-
kind: "
|
|
863
|
+
kind: "TypeVariableReference";
|
|
659
864
|
/**
|
|
660
|
-
* -
|
|
865
|
+
* - Stable referenced type-parameter identity.
|
|
661
866
|
*/
|
|
662
|
-
|
|
867
|
+
parameterId: string;
|
|
663
868
|
/**
|
|
664
|
-
* -
|
|
869
|
+
* - Parser-owned reference location.
|
|
665
870
|
*/
|
|
666
871
|
location: SourceLocation;
|
|
667
872
|
/**
|
|
668
|
-
* -
|
|
873
|
+
* - Parser-owned type-name range.
|
|
669
874
|
*/
|
|
670
875
|
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
671
876
|
};
|
|
672
|
-
export type
|
|
673
|
-
/**
|
|
674
|
-
* - Node discriminator.
|
|
675
|
-
*/
|
|
676
|
-
kind: "IntegerLiteral";
|
|
877
|
+
export type ListType = {
|
|
677
878
|
/**
|
|
678
|
-
* -
|
|
879
|
+
* - Recursive list-type discriminator.
|
|
679
880
|
*/
|
|
680
|
-
|
|
881
|
+
kind: "ListType";
|
|
681
882
|
/**
|
|
682
|
-
* -
|
|
883
|
+
* - Homogeneous element type.
|
|
683
884
|
*/
|
|
684
|
-
|
|
885
|
+
elementType: SemanticValueType;
|
|
685
886
|
/**
|
|
686
|
-
* -
|
|
887
|
+
* - Parser-owned outer and argument ranges.
|
|
687
888
|
*/
|
|
688
889
|
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
689
890
|
};
|
|
690
|
-
export type
|
|
891
|
+
export type MapType = {
|
|
691
892
|
/**
|
|
692
|
-
* -
|
|
893
|
+
* - Recursive map-type discriminator.
|
|
693
894
|
*/
|
|
694
|
-
kind: "
|
|
895
|
+
kind: "MapType";
|
|
695
896
|
/**
|
|
696
|
-
* -
|
|
897
|
+
* - Exact string key type.
|
|
697
898
|
*/
|
|
698
|
-
|
|
899
|
+
keyType: TypeReference;
|
|
699
900
|
/**
|
|
700
|
-
* -
|
|
901
|
+
* - Homogeneous value type.
|
|
701
902
|
*/
|
|
702
|
-
|
|
903
|
+
valueType: SemanticValueType;
|
|
703
904
|
/**
|
|
704
|
-
* -
|
|
905
|
+
* - Parser-owned outer and argument ranges.
|
|
705
906
|
*/
|
|
706
907
|
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
707
908
|
};
|
|
708
|
-
export type
|
|
709
|
-
/**
|
|
710
|
-
* - Node discriminator.
|
|
711
|
-
*/
|
|
712
|
-
kind: "StringLiteral";
|
|
909
|
+
export type OrderedMapType = {
|
|
713
910
|
/**
|
|
714
|
-
* -
|
|
715
|
-
*/
|
|
716
|
-
value: string;
|
|
717
|
-
/**
|
|
718
|
-
* - Source location.
|
|
911
|
+
* - Distinct insertion-ordered map-type discriminator.
|
|
719
912
|
*/
|
|
720
|
-
|
|
913
|
+
kind: "OrderedMapType";
|
|
721
914
|
/**
|
|
722
|
-
* -
|
|
915
|
+
* - Exact supported string key type.
|
|
723
916
|
*/
|
|
724
|
-
|
|
725
|
-
};
|
|
726
|
-
export type UnaryExpression = {
|
|
917
|
+
keyType: TypeReference;
|
|
727
918
|
/**
|
|
728
|
-
* -
|
|
919
|
+
* - Homogeneous value type.
|
|
729
920
|
*/
|
|
730
|
-
|
|
921
|
+
valueType: SemanticValueType;
|
|
731
922
|
/**
|
|
732
|
-
* -
|
|
923
|
+
* - Canonical first-insertion encounter order.
|
|
733
924
|
*/
|
|
734
|
-
|
|
925
|
+
order: "insertion";
|
|
735
926
|
/**
|
|
736
|
-
* -
|
|
927
|
+
* - Parser-owned outer and argument ranges.
|
|
737
928
|
*/
|
|
738
|
-
|
|
929
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
930
|
+
};
|
|
931
|
+
export type OptionalType = {
|
|
739
932
|
/**
|
|
740
|
-
* - Explicit
|
|
933
|
+
* - Explicit presence/absence type discriminator.
|
|
741
934
|
*/
|
|
742
|
-
|
|
935
|
+
kind: "OptionalType";
|
|
743
936
|
/**
|
|
744
|
-
* -
|
|
937
|
+
* - Exact present-value type.
|
|
745
938
|
*/
|
|
746
|
-
|
|
939
|
+
valueType: SemanticValueType;
|
|
747
940
|
/**
|
|
748
|
-
* -
|
|
941
|
+
* - Parser-owned outer and constituent ranges.
|
|
749
942
|
*/
|
|
750
943
|
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
751
944
|
};
|
|
752
|
-
export type
|
|
945
|
+
export type RecordType = {
|
|
753
946
|
/**
|
|
754
|
-
* -
|
|
947
|
+
* - Nominal record-type discriminator.
|
|
755
948
|
*/
|
|
756
|
-
kind: "
|
|
949
|
+
kind: "RecordType";
|
|
757
950
|
/**
|
|
758
|
-
* -
|
|
951
|
+
* - Stable module-local record declaration identity.
|
|
759
952
|
*/
|
|
760
|
-
|
|
953
|
+
declarationId: string;
|
|
761
954
|
/**
|
|
762
|
-
* -
|
|
955
|
+
* - Exact invariant type arguments; required for generic declarations and absent for non-generic declarations.
|
|
763
956
|
*/
|
|
764
|
-
|
|
957
|
+
arguments?: SemanticValueType[];
|
|
765
958
|
/**
|
|
766
|
-
* -
|
|
959
|
+
* - Parser-owned type-name range.
|
|
767
960
|
*/
|
|
768
|
-
|
|
961
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
962
|
+
};
|
|
963
|
+
export type ErrorType = {
|
|
769
964
|
/**
|
|
770
|
-
* -
|
|
965
|
+
* - Nominal unchecked-error type discriminator.
|
|
771
966
|
*/
|
|
772
|
-
|
|
967
|
+
kind: "ErrorType";
|
|
773
968
|
/**
|
|
774
|
-
* -
|
|
969
|
+
* - Stable error declaration identity.
|
|
775
970
|
*/
|
|
776
|
-
|
|
971
|
+
declarationId: string;
|
|
777
972
|
/**
|
|
778
|
-
* -
|
|
973
|
+
* - Parser-owned type-name range.
|
|
779
974
|
*/
|
|
780
975
|
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
781
976
|
};
|
|
782
|
-
export type
|
|
977
|
+
export type ReferenceType = {
|
|
783
978
|
/**
|
|
784
|
-
* -
|
|
979
|
+
* - Nominal reference-class type discriminator.
|
|
785
980
|
*/
|
|
786
|
-
kind: "
|
|
981
|
+
kind: "ReferenceType";
|
|
787
982
|
/**
|
|
788
|
-
* -
|
|
983
|
+
* - Stable module-local class declaration identity.
|
|
789
984
|
*/
|
|
790
|
-
|
|
985
|
+
declarationId: string;
|
|
791
986
|
/**
|
|
792
|
-
* -
|
|
987
|
+
* - Parser-owned type-name range.
|
|
793
988
|
*/
|
|
794
|
-
|
|
989
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
990
|
+
};
|
|
991
|
+
export type OwnedResourceType = {
|
|
795
992
|
/**
|
|
796
|
-
* -
|
|
993
|
+
* - Compiler-owned linear resource type.
|
|
797
994
|
*/
|
|
798
|
-
|
|
995
|
+
kind: "OwnedResourceType";
|
|
799
996
|
/**
|
|
800
|
-
* -
|
|
997
|
+
* - Exact authority resource declaration identity.
|
|
801
998
|
*/
|
|
802
|
-
|
|
803
|
-
};
|
|
804
|
-
export type Expression = IdentifierExpression | IntegerLiteral | BooleanLiteral | StringLiteral | UnaryExpression | BinaryExpression | CallExpression;
|
|
805
|
-
export type LocalDeclaration = {
|
|
999
|
+
resourceId: string;
|
|
806
1000
|
/**
|
|
807
|
-
* -
|
|
1001
|
+
* - Parser-owned type-name range.
|
|
808
1002
|
*/
|
|
809
|
-
|
|
1003
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1004
|
+
};
|
|
1005
|
+
export type OwnedReferenceType = {
|
|
810
1006
|
/**
|
|
811
|
-
* -
|
|
1007
|
+
* - Linear reference that owns one protected resource.
|
|
812
1008
|
*/
|
|
813
|
-
|
|
1009
|
+
kind: "OwnedReferenceType";
|
|
814
1010
|
/**
|
|
815
|
-
* -
|
|
1011
|
+
* - Exact owned class declaration identity.
|
|
816
1012
|
*/
|
|
817
|
-
|
|
1013
|
+
declarationId: string;
|
|
818
1014
|
/**
|
|
819
|
-
* -
|
|
1015
|
+
* - Parser-owned type-name range.
|
|
820
1016
|
*/
|
|
821
|
-
|
|
1017
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1018
|
+
};
|
|
1019
|
+
export type SemanticValueType = TypeReference | TypeVariableReference | ListType | MapType | OrderedMapType | OptionalType | RecordType | ReferenceType | OwnedResourceType | OwnedReferenceType;
|
|
1020
|
+
export type SemanticBindingType = SemanticValueType | ErrorType;
|
|
1021
|
+
export type FunctionReturnTypeReference = {
|
|
822
1022
|
/**
|
|
823
|
-
* -
|
|
1023
|
+
* - Void return discriminator.
|
|
824
1024
|
*/
|
|
825
|
-
|
|
1025
|
+
kind: "TypeReference";
|
|
826
1026
|
/**
|
|
827
|
-
* -
|
|
1027
|
+
* - Normalized non-value function return.
|
|
828
1028
|
*/
|
|
829
|
-
|
|
1029
|
+
name: "void";
|
|
830
1030
|
/**
|
|
831
|
-
* - Node-associated provenance.
|
|
1031
|
+
* - Node-associated provenance that survives semantic transforms.
|
|
832
1032
|
*/
|
|
833
1033
|
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
834
1034
|
};
|
|
835
|
-
export type
|
|
1035
|
+
export type SemanticFunctionReturnType = SemanticValueType | FunctionReturnTypeReference;
|
|
1036
|
+
export type SemanticTypeIdentity = SemanticTypeName | {
|
|
1037
|
+
kind: "TypeVariableReference";
|
|
1038
|
+
parameterId: string;
|
|
1039
|
+
} | {
|
|
1040
|
+
kind: "ListType";
|
|
1041
|
+
elementType: SemanticTypeIdentity;
|
|
1042
|
+
} | {
|
|
1043
|
+
kind: "MapType";
|
|
1044
|
+
keyType: SemanticTypeIdentity;
|
|
1045
|
+
valueType: SemanticTypeIdentity;
|
|
1046
|
+
} | {
|
|
1047
|
+
kind: "OrderedMapType";
|
|
1048
|
+
keyType: SemanticTypeIdentity;
|
|
1049
|
+
valueType: SemanticTypeIdentity;
|
|
1050
|
+
order: "insertion";
|
|
1051
|
+
} | {
|
|
1052
|
+
kind: "OptionalType";
|
|
1053
|
+
valueType: SemanticTypeIdentity;
|
|
1054
|
+
} | {
|
|
1055
|
+
kind: "RecordType";
|
|
1056
|
+
declarationId: string;
|
|
1057
|
+
arguments?: SemanticTypeIdentity[];
|
|
1058
|
+
} | {
|
|
1059
|
+
kind: "ReferenceType";
|
|
1060
|
+
declarationId: string;
|
|
1061
|
+
} | {
|
|
1062
|
+
kind: "OwnedResourceType";
|
|
1063
|
+
resourceId: string;
|
|
1064
|
+
} | {
|
|
1065
|
+
kind: "OwnedReferenceType";
|
|
1066
|
+
declarationId: string;
|
|
1067
|
+
};
|
|
1068
|
+
export type FunctionReturnTypeIdentity = SemanticTypeIdentity | "void";
|
|
1069
|
+
export type ResolvedFunctionSignature = {
|
|
836
1070
|
/**
|
|
837
|
-
* -
|
|
1071
|
+
* - Resolution discriminator.
|
|
838
1072
|
*/
|
|
839
|
-
kind: "
|
|
1073
|
+
kind: "ResolvedFunctionSignature";
|
|
840
1074
|
/**
|
|
841
|
-
* -
|
|
1075
|
+
* - Deterministic module-local declaration identity.
|
|
842
1076
|
*/
|
|
843
|
-
|
|
1077
|
+
declarationId: string;
|
|
844
1078
|
/**
|
|
845
|
-
* -
|
|
1079
|
+
* - Exact required positional parameter types.
|
|
846
1080
|
*/
|
|
847
|
-
|
|
1081
|
+
parameterTypes: SemanticTypeIdentity[];
|
|
848
1082
|
/**
|
|
849
|
-
* -
|
|
1083
|
+
* - Exact resolved return type.
|
|
850
1084
|
*/
|
|
851
|
-
|
|
1085
|
+
returnType: FunctionReturnTypeIdentity;
|
|
852
1086
|
/**
|
|
853
|
-
* -
|
|
1087
|
+
* - Inferred declaration-order type arguments for a generic call.
|
|
854
1088
|
*/
|
|
855
|
-
|
|
1089
|
+
typeArguments?: SemanticTypeIdentity[];
|
|
856
1090
|
};
|
|
857
|
-
export type
|
|
1091
|
+
export type Parameter = {
|
|
858
1092
|
/**
|
|
859
1093
|
* - Node discriminator.
|
|
860
1094
|
*/
|
|
861
|
-
kind: "
|
|
1095
|
+
kind: "Parameter";
|
|
862
1096
|
/**
|
|
863
|
-
* -
|
|
1097
|
+
* - Parameter name.
|
|
864
1098
|
*/
|
|
865
|
-
|
|
1099
|
+
name: string;
|
|
1100
|
+
/**
|
|
1101
|
+
* - Parameter type.
|
|
1102
|
+
*/
|
|
1103
|
+
type: SemanticValueType;
|
|
866
1104
|
/**
|
|
867
1105
|
* - Source location.
|
|
868
1106
|
*/
|
|
@@ -872,91 +1110,1817 @@ export type ReturnStatement = {
|
|
|
872
1110
|
*/
|
|
873
1111
|
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
874
1112
|
};
|
|
875
|
-
export type
|
|
1113
|
+
export type ResolvedEffectOperationSignature = {
|
|
876
1114
|
/**
|
|
877
|
-
* -
|
|
1115
|
+
* - Resolution discriminator.
|
|
878
1116
|
*/
|
|
879
|
-
kind: "
|
|
1117
|
+
kind: "ResolvedEffectOperationSignature";
|
|
880
1118
|
/**
|
|
881
|
-
* -
|
|
1119
|
+
* - Exact capability declaration identity.
|
|
882
1120
|
*/
|
|
883
|
-
|
|
1121
|
+
capabilityId: string;
|
|
884
1122
|
/**
|
|
885
|
-
* -
|
|
1123
|
+
* - Exact operation declaration identity.
|
|
886
1124
|
*/
|
|
887
|
-
|
|
1125
|
+
operationId: string;
|
|
888
1126
|
/**
|
|
889
|
-
* -
|
|
1127
|
+
* - Exact ordered parameter types.
|
|
890
1128
|
*/
|
|
891
|
-
|
|
1129
|
+
parameterTypes: SemanticTypeIdentity[];
|
|
892
1130
|
/**
|
|
893
|
-
* -
|
|
1131
|
+
* - Exact operation result.
|
|
894
1132
|
*/
|
|
895
|
-
|
|
1133
|
+
returnType: FunctionReturnTypeIdentity;
|
|
896
1134
|
/**
|
|
897
|
-
* -
|
|
1135
|
+
* - Closed initial effect set.
|
|
898
1136
|
*/
|
|
899
|
-
|
|
900
|
-
};
|
|
901
|
-
export type LocalStatement = LocalDeclaration | AssignmentStatement;
|
|
902
|
-
export type Statement = LocalStatement | IfStatement | ReturnStatement | PrintStatement;
|
|
903
|
-
export type Block = {
|
|
1137
|
+
effects: readonly ["host"];
|
|
904
1138
|
/**
|
|
905
|
-
* -
|
|
1139
|
+
* - Exact ordered declared failures.
|
|
906
1140
|
*/
|
|
907
|
-
|
|
1141
|
+
failureIds: string[];
|
|
1142
|
+
/**
|
|
1143
|
+
* - Exact ownership transition.
|
|
1144
|
+
*/
|
|
1145
|
+
resourceFlow: EffectResourceFlow;
|
|
1146
|
+
};
|
|
1147
|
+
export type OwnedMoveExpression = {
|
|
1148
|
+
/**
|
|
1149
|
+
* - Explicit linear ownership transfer.
|
|
1150
|
+
*/
|
|
1151
|
+
kind: "OwnedMoveExpression";
|
|
1152
|
+
/**
|
|
1153
|
+
* - Moved owner.
|
|
1154
|
+
*/
|
|
1155
|
+
expression: IdentifierExpression;
|
|
1156
|
+
/**
|
|
1157
|
+
* - Exact owned type.
|
|
1158
|
+
*/
|
|
1159
|
+
type: OwnedResourceType | OwnedReferenceType;
|
|
1160
|
+
/**
|
|
1161
|
+
* - Exact transfer location.
|
|
1162
|
+
*/
|
|
1163
|
+
location: SourceLocation;
|
|
1164
|
+
/**
|
|
1165
|
+
* - Derived source provenance.
|
|
1166
|
+
*/
|
|
1167
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1168
|
+
};
|
|
1169
|
+
export type OwnedBorrowExpression = {
|
|
1170
|
+
/**
|
|
1171
|
+
* - Immediate nonescaping resource borrow.
|
|
1172
|
+
*/
|
|
1173
|
+
kind: "OwnedBorrowExpression";
|
|
1174
|
+
/**
|
|
1175
|
+
* - Borrow mode.
|
|
1176
|
+
*/
|
|
1177
|
+
mode: "shared" | "exclusive";
|
|
1178
|
+
/**
|
|
1179
|
+
* - Borrowed place.
|
|
1180
|
+
*/
|
|
1181
|
+
expression: IdentifierExpression | ReceiverExpression | PrivateFieldRead;
|
|
1182
|
+
/**
|
|
1183
|
+
* - Exact owned type.
|
|
1184
|
+
*/
|
|
1185
|
+
type: OwnedResourceType | OwnedReferenceType;
|
|
1186
|
+
/**
|
|
1187
|
+
* - Exact borrow location.
|
|
1188
|
+
*/
|
|
1189
|
+
location: SourceLocation;
|
|
1190
|
+
/**
|
|
1191
|
+
* - Derived source provenance.
|
|
1192
|
+
*/
|
|
1193
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1194
|
+
};
|
|
1195
|
+
export type EffectCallExpression = {
|
|
1196
|
+
/**
|
|
1197
|
+
* - Compiler-authorized effect invocation.
|
|
1198
|
+
*/
|
|
1199
|
+
kind: "EffectCallExpression";
|
|
1200
|
+
/**
|
|
1201
|
+
* - Exact operation declaration identity.
|
|
1202
|
+
*/
|
|
1203
|
+
operation: string;
|
|
1204
|
+
/**
|
|
1205
|
+
* - Source-ordered arguments.
|
|
1206
|
+
*/
|
|
1207
|
+
arguments: Expression[];
|
|
1208
|
+
/**
|
|
1209
|
+
* - Deterministic semantic evaluation identity.
|
|
1210
|
+
*/
|
|
1211
|
+
effectSiteId: string;
|
|
1212
|
+
/**
|
|
1213
|
+
* - Complete authority resolution.
|
|
1214
|
+
*/
|
|
1215
|
+
resolution: ResolvedEffectOperationSignature;
|
|
1216
|
+
/**
|
|
1217
|
+
* - Complete call location.
|
|
1218
|
+
*/
|
|
1219
|
+
location: SourceLocation;
|
|
1220
|
+
/**
|
|
1221
|
+
* - Parser-owned operation-name range.
|
|
1222
|
+
*/
|
|
1223
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1224
|
+
};
|
|
1225
|
+
export type EffectParameter = {
|
|
1226
|
+
/**
|
|
1227
|
+
* - Stable parameter name.
|
|
1228
|
+
*/
|
|
1229
|
+
name: string;
|
|
1230
|
+
/**
|
|
1231
|
+
* - Exact ordered parameter type.
|
|
1232
|
+
*/
|
|
1233
|
+
type: SemanticValueType;
|
|
1234
|
+
};
|
|
1235
|
+
export type EffectResourceFlow = {
|
|
1236
|
+
kind: "none";
|
|
1237
|
+
} | {
|
|
1238
|
+
kind: "acquire";
|
|
1239
|
+
resourceId: string;
|
|
1240
|
+
} | {
|
|
1241
|
+
kind: "borrow" | "close";
|
|
1242
|
+
parameterIndex: number;
|
|
1243
|
+
terminalFailureId: string;
|
|
1244
|
+
};
|
|
1245
|
+
export type EffectResourceDeclaration = {
|
|
1246
|
+
/**
|
|
1247
|
+
* - Capability resource declaration.
|
|
1248
|
+
*/
|
|
1249
|
+
kind: "EffectResourceDeclaration";
|
|
1250
|
+
/**
|
|
1251
|
+
* - Deterministic authority-local identity.
|
|
1252
|
+
*/
|
|
1253
|
+
id: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* - Source-visible nominal resource name.
|
|
1256
|
+
*/
|
|
1257
|
+
name: string;
|
|
1258
|
+
};
|
|
1259
|
+
export type EffectFailureDeclaration = {
|
|
1260
|
+
/**
|
|
1261
|
+
* - Capability failure declaration.
|
|
1262
|
+
*/
|
|
1263
|
+
kind: "EffectFailureDeclaration";
|
|
1264
|
+
/**
|
|
1265
|
+
* - Deterministic authority-local identity.
|
|
1266
|
+
*/
|
|
1267
|
+
id: string;
|
|
1268
|
+
/**
|
|
1269
|
+
* - Source-visible nominal failure name.
|
|
1270
|
+
*/
|
|
1271
|
+
name: string;
|
|
1272
|
+
};
|
|
1273
|
+
export type EffectOperationDeclaration = {
|
|
1274
|
+
/**
|
|
1275
|
+
* - Compiler-authorized operation declaration.
|
|
1276
|
+
*/
|
|
1277
|
+
kind: "EffectOperationDeclaration";
|
|
1278
|
+
/**
|
|
1279
|
+
* - Deterministic authority-local identity.
|
|
1280
|
+
*/
|
|
1281
|
+
id: string;
|
|
1282
|
+
/**
|
|
1283
|
+
* - Source-visible operation name.
|
|
1284
|
+
*/
|
|
1285
|
+
name: string;
|
|
1286
|
+
/**
|
|
1287
|
+
* - Exact positional parameters.
|
|
1288
|
+
*/
|
|
1289
|
+
parameters: EffectParameter[];
|
|
1290
|
+
/**
|
|
1291
|
+
* - Exact result type.
|
|
1292
|
+
*/
|
|
1293
|
+
returnType: SemanticFunctionReturnType;
|
|
1294
|
+
/**
|
|
1295
|
+
* - Closed initial effect set.
|
|
1296
|
+
*/
|
|
1297
|
+
effects: readonly ["host"];
|
|
1298
|
+
/**
|
|
1299
|
+
* - Ordered nominal failure identities.
|
|
1300
|
+
*/
|
|
1301
|
+
failureIds: string[];
|
|
1302
|
+
/**
|
|
1303
|
+
* - Exact ownership transition.
|
|
1304
|
+
*/
|
|
1305
|
+
resourceFlow: EffectResourceFlow;
|
|
1306
|
+
};
|
|
1307
|
+
export type EffectCapabilityDeclaration = {
|
|
1308
|
+
/**
|
|
1309
|
+
* - Authorized capability declaration.
|
|
1310
|
+
*/
|
|
1311
|
+
kind: "EffectCapabilityDeclaration";
|
|
1312
|
+
/**
|
|
1313
|
+
* - Deterministic module-local identity.
|
|
1314
|
+
*/
|
|
1315
|
+
id: string;
|
|
1316
|
+
/**
|
|
1317
|
+
* - Opaque authority identity.
|
|
1318
|
+
*/
|
|
1319
|
+
authorityId: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* - Capability name.
|
|
1322
|
+
*/
|
|
1323
|
+
name: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* - Ordered resources.
|
|
1326
|
+
*/
|
|
1327
|
+
resources: EffectResourceDeclaration[];
|
|
1328
|
+
/**
|
|
1329
|
+
* - Ordered failures.
|
|
1330
|
+
*/
|
|
1331
|
+
failures: EffectFailureDeclaration[];
|
|
1332
|
+
/**
|
|
1333
|
+
* - Ordered operations.
|
|
1334
|
+
*/
|
|
1335
|
+
operations: EffectOperationDeclaration[];
|
|
1336
|
+
};
|
|
1337
|
+
export type CapabilityAuthority = {
|
|
1338
|
+
/**
|
|
1339
|
+
* - Authority schema discriminator.
|
|
1340
|
+
*/
|
|
1341
|
+
schema: "SemantifoldCapabilityAuthority";
|
|
1342
|
+
/**
|
|
1343
|
+
* - Authority payload version, not a standard-library contract version.
|
|
1344
|
+
*/
|
|
1345
|
+
schemaVersion: 1 | 2;
|
|
1346
|
+
/**
|
|
1347
|
+
* - Opaque caller-supplied authority identity.
|
|
1348
|
+
*/
|
|
1349
|
+
id: string;
|
|
1350
|
+
/**
|
|
1351
|
+
* - Normalized declarations.
|
|
1352
|
+
*/
|
|
1353
|
+
capabilities: EffectCapabilityDeclaration[];
|
|
1354
|
+
/**
|
|
1355
|
+
* - Declared standard-library contract version, present only when the caller supplied one.
|
|
1356
|
+
*/
|
|
1357
|
+
contractVersion?: string;
|
|
1358
|
+
/**
|
|
1359
|
+
* - Schema-v2 canonical module authorities.
|
|
1360
|
+
*/
|
|
1361
|
+
modules?: {
|
|
1362
|
+
identity: string;
|
|
1363
|
+
contractVersion: string;
|
|
1364
|
+
capabilities: EffectCapabilityDeclaration[];
|
|
1365
|
+
}[];
|
|
1366
|
+
};
|
|
1367
|
+
export type CapabilityDeclarationReferenceInput = {
|
|
1368
|
+
module: string;
|
|
1369
|
+
name: string;
|
|
1370
|
+
};
|
|
1371
|
+
export type CapabilityParameterInput = {
|
|
1372
|
+
name: string;
|
|
1373
|
+
type: SemanticTypeName | {
|
|
1374
|
+
kind: "OwnedResourceType";
|
|
1375
|
+
resource: string | CapabilityDeclarationReferenceInput;
|
|
1376
|
+
} | {
|
|
1377
|
+
kind: "OptionalType";
|
|
1378
|
+
valueType: SemanticTypeName;
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
export type CapabilityNamedInput = {
|
|
1382
|
+
name: string;
|
|
1383
|
+
};
|
|
1384
|
+
export type CapabilityResourceFlowInput = {
|
|
1385
|
+
kind: "none";
|
|
1386
|
+
} | {
|
|
1387
|
+
kind: "acquire";
|
|
1388
|
+
resource: string | CapabilityDeclarationReferenceInput;
|
|
1389
|
+
} | {
|
|
1390
|
+
kind: "borrow" | "close";
|
|
1391
|
+
parameterIndex: number;
|
|
1392
|
+
terminalFailure: string | CapabilityDeclarationReferenceInput;
|
|
1393
|
+
};
|
|
1394
|
+
export type CapabilityOperationInput = {
|
|
1395
|
+
name: string;
|
|
1396
|
+
parameters: CapabilityParameterInput[];
|
|
1397
|
+
returnType: FunctionReturnTypeName | {
|
|
1398
|
+
kind: "OwnedResourceType";
|
|
1399
|
+
resource: string | CapabilityDeclarationReferenceInput;
|
|
1400
|
+
} | {
|
|
1401
|
+
kind: "OptionalType";
|
|
1402
|
+
valueType: SemanticTypeName;
|
|
1403
|
+
};
|
|
1404
|
+
effects: ["host"];
|
|
1405
|
+
failures: (string | CapabilityDeclarationReferenceInput)[];
|
|
1406
|
+
resourceFlow: CapabilityResourceFlowInput;
|
|
1407
|
+
};
|
|
1408
|
+
export type CapabilityDeclarationInput = {
|
|
1409
|
+
name: string;
|
|
1410
|
+
resources: CapabilityNamedInput[];
|
|
1411
|
+
failures: CapabilityNamedInput[];
|
|
1412
|
+
operations: CapabilityOperationInput[];
|
|
1413
|
+
};
|
|
1414
|
+
export type CapabilityAuthorityModuleInput = {
|
|
1415
|
+
identity: string;
|
|
1416
|
+
contractVersion: string;
|
|
1417
|
+
capabilities: CapabilityDeclarationInput[];
|
|
1418
|
+
};
|
|
1419
|
+
export type CapabilityAuthorityInput = {
|
|
1420
|
+
schema: "SemantifoldCapabilityAuthority";
|
|
1421
|
+
schemaVersion: 1;
|
|
1422
|
+
id: string;
|
|
1423
|
+
capabilities: CapabilityDeclarationInput[];
|
|
1424
|
+
contractVersion?: string;
|
|
1425
|
+
} | {
|
|
1426
|
+
schema: "SemantifoldCapabilityAuthority";
|
|
1427
|
+
schemaVersion: 2;
|
|
1428
|
+
id: string;
|
|
1429
|
+
modules: CapabilityAuthorityModuleInput[];
|
|
1430
|
+
};
|
|
1431
|
+
export type ListLiteral = {
|
|
1432
|
+
/**
|
|
1433
|
+
* - Ordered immutable list literal.
|
|
1434
|
+
*/
|
|
1435
|
+
kind: "ListLiteral";
|
|
1436
|
+
/**
|
|
1437
|
+
* - Source-ordered, duplicate-preserving elements.
|
|
1438
|
+
*/
|
|
1439
|
+
elements: Expression[];
|
|
1440
|
+
/**
|
|
1441
|
+
* - Source location.
|
|
1442
|
+
*/
|
|
1443
|
+
location: SourceLocation;
|
|
1444
|
+
/**
|
|
1445
|
+
* - Node-associated provenance.
|
|
1446
|
+
*/
|
|
1447
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1448
|
+
};
|
|
1449
|
+
export type MapEntry = {
|
|
1450
|
+
/**
|
|
1451
|
+
* - Source-ordered map initializer entry.
|
|
1452
|
+
*/
|
|
1453
|
+
kind: "MapEntry";
|
|
1454
|
+
/**
|
|
1455
|
+
* - Literal nonnumeric string key.
|
|
1456
|
+
*/
|
|
1457
|
+
key: StringLiteral;
|
|
1458
|
+
/**
|
|
1459
|
+
* - Entry value.
|
|
1460
|
+
*/
|
|
1461
|
+
value: Expression;
|
|
1462
|
+
/**
|
|
1463
|
+
* - Source location.
|
|
1464
|
+
*/
|
|
1465
|
+
location: SourceLocation;
|
|
1466
|
+
/**
|
|
1467
|
+
* - Node-associated provenance.
|
|
1468
|
+
*/
|
|
1469
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1470
|
+
};
|
|
1471
|
+
export type MapLiteral = {
|
|
1472
|
+
/**
|
|
1473
|
+
* - Immutable map literal; entry order is diagnostic-only.
|
|
1474
|
+
*/
|
|
1475
|
+
kind: "MapLiteral";
|
|
1476
|
+
/**
|
|
1477
|
+
* - Source initializer order.
|
|
1478
|
+
*/
|
|
1479
|
+
entries: MapEntry[];
|
|
1480
|
+
/**
|
|
1481
|
+
* - Source location.
|
|
1482
|
+
*/
|
|
1483
|
+
location: SourceLocation;
|
|
1484
|
+
/**
|
|
1485
|
+
* - Node-associated provenance.
|
|
1486
|
+
*/
|
|
1487
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1488
|
+
};
|
|
1489
|
+
export type OrderedMapLiteral = {
|
|
1490
|
+
/**
|
|
1491
|
+
* - Immutable map literal with observable first-insertion order.
|
|
1492
|
+
*/
|
|
1493
|
+
kind: "OrderedMapLiteral";
|
|
1494
|
+
/**
|
|
1495
|
+
* - Source-ordered unique entries.
|
|
1496
|
+
*/
|
|
1497
|
+
entries: MapEntry[];
|
|
1498
|
+
/**
|
|
1499
|
+
* - Complete ordered construction boundary.
|
|
1500
|
+
*/
|
|
1501
|
+
location: SourceLocation;
|
|
1502
|
+
/**
|
|
1503
|
+
* - Node-associated provenance.
|
|
1504
|
+
*/
|
|
1505
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1506
|
+
};
|
|
1507
|
+
export type ListIndexExpression = {
|
|
1508
|
+
/**
|
|
1509
|
+
* - Total zero-based list index.
|
|
1510
|
+
*/
|
|
1511
|
+
kind: "ListIndexExpression";
|
|
1512
|
+
/**
|
|
1513
|
+
* - List-valued receiver.
|
|
1514
|
+
*/
|
|
1515
|
+
collection: Expression;
|
|
1516
|
+
/**
|
|
1517
|
+
* - Integer index.
|
|
1518
|
+
*/
|
|
1519
|
+
index: Expression;
|
|
1520
|
+
/**
|
|
1521
|
+
* - Admission basis; never optional.
|
|
1522
|
+
*/
|
|
1523
|
+
totality: "proven" | "fail-on-absence";
|
|
1524
|
+
/**
|
|
1525
|
+
* - Source location.
|
|
1526
|
+
*/
|
|
1527
|
+
location: SourceLocation;
|
|
1528
|
+
/**
|
|
1529
|
+
* - Node-associated provenance.
|
|
1530
|
+
*/
|
|
1531
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1532
|
+
};
|
|
1533
|
+
export type MapLookupExpression = {
|
|
1534
|
+
/**
|
|
1535
|
+
* - Total string-key map lookup.
|
|
1536
|
+
*/
|
|
1537
|
+
kind: "MapLookupExpression";
|
|
1538
|
+
/**
|
|
1539
|
+
* - Map-valued receiver.
|
|
1540
|
+
*/
|
|
1541
|
+
collection: Expression;
|
|
1542
|
+
/**
|
|
1543
|
+
* - String key expression.
|
|
1544
|
+
*/
|
|
1545
|
+
key: Expression;
|
|
1546
|
+
/**
|
|
1547
|
+
* - Admission basis; never optional.
|
|
1548
|
+
*/
|
|
1549
|
+
totality: "proven" | "fail-on-absence";
|
|
1550
|
+
/**
|
|
1551
|
+
* - Source location.
|
|
1552
|
+
*/
|
|
1553
|
+
location: SourceLocation;
|
|
1554
|
+
/**
|
|
1555
|
+
* - Node-associated provenance.
|
|
1556
|
+
*/
|
|
1557
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1558
|
+
};
|
|
1559
|
+
export type CollectionSizeExpression = {
|
|
1560
|
+
/**
|
|
1561
|
+
* - Finite collection size.
|
|
1562
|
+
*/
|
|
1563
|
+
kind: "CollectionSizeExpression";
|
|
1564
|
+
/**
|
|
1565
|
+
* - List- or map-valued receiver.
|
|
1566
|
+
*/
|
|
1567
|
+
collection: Expression;
|
|
1568
|
+
/**
|
|
1569
|
+
* - Validated receiver kind for target spelling.
|
|
1570
|
+
*/
|
|
1571
|
+
collectionKind?: "list" | "map";
|
|
1572
|
+
/**
|
|
1573
|
+
* - Source location.
|
|
1574
|
+
*/
|
|
1575
|
+
location: SourceLocation;
|
|
1576
|
+
/**
|
|
1577
|
+
* - Node-associated provenance.
|
|
1578
|
+
*/
|
|
1579
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1580
|
+
};
|
|
1581
|
+
export type IdentifierExpression = {
|
|
1582
|
+
/**
|
|
1583
|
+
* - Node discriminator.
|
|
1584
|
+
*/
|
|
1585
|
+
kind: "IdentifierExpression";
|
|
1586
|
+
/**
|
|
1587
|
+
* - Referenced name.
|
|
1588
|
+
*/
|
|
1589
|
+
name: string;
|
|
1590
|
+
/**
|
|
1591
|
+
* - Source location.
|
|
1592
|
+
*/
|
|
1593
|
+
location: SourceLocation;
|
|
1594
|
+
/**
|
|
1595
|
+
* - Node-associated provenance.
|
|
1596
|
+
*/
|
|
1597
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1598
|
+
};
|
|
1599
|
+
export type IntegerLiteral = {
|
|
1600
|
+
/**
|
|
1601
|
+
* - Node discriminator.
|
|
1602
|
+
*/
|
|
1603
|
+
kind: "IntegerLiteral";
|
|
1604
|
+
/**
|
|
1605
|
+
* - JavaScript-safe integer value.
|
|
1606
|
+
*/
|
|
1607
|
+
value: number;
|
|
1608
|
+
/**
|
|
1609
|
+
* - Source location.
|
|
1610
|
+
*/
|
|
1611
|
+
location: SourceLocation;
|
|
1612
|
+
/**
|
|
1613
|
+
* - Node-associated provenance.
|
|
1614
|
+
*/
|
|
1615
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1616
|
+
};
|
|
1617
|
+
export type BooleanLiteral = {
|
|
1618
|
+
/**
|
|
1619
|
+
* - Node discriminator.
|
|
1620
|
+
*/
|
|
1621
|
+
kind: "BooleanLiteral";
|
|
1622
|
+
/**
|
|
1623
|
+
* - Boolean value.
|
|
1624
|
+
*/
|
|
1625
|
+
value: boolean;
|
|
1626
|
+
/**
|
|
1627
|
+
* - Source location.
|
|
1628
|
+
*/
|
|
1629
|
+
location: SourceLocation;
|
|
1630
|
+
/**
|
|
1631
|
+
* - Node-associated provenance.
|
|
1632
|
+
*/
|
|
1633
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1634
|
+
};
|
|
1635
|
+
export type StringLiteral = {
|
|
1636
|
+
/**
|
|
1637
|
+
* - Node discriminator.
|
|
1638
|
+
*/
|
|
1639
|
+
kind: "StringLiteral";
|
|
1640
|
+
/**
|
|
1641
|
+
* - Unicode string value.
|
|
1642
|
+
*/
|
|
1643
|
+
value: string;
|
|
1644
|
+
/**
|
|
1645
|
+
* - Source location.
|
|
1646
|
+
*/
|
|
1647
|
+
location: SourceLocation;
|
|
1648
|
+
/**
|
|
1649
|
+
* - Node-associated provenance.
|
|
1650
|
+
*/
|
|
1651
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1652
|
+
};
|
|
1653
|
+
export type OptionalNone = {
|
|
1654
|
+
/**
|
|
1655
|
+
* - Contextually typed absence value.
|
|
1656
|
+
*/
|
|
1657
|
+
kind: "OptionalNone";
|
|
1658
|
+
/**
|
|
1659
|
+
* - Source location.
|
|
1660
|
+
*/
|
|
1661
|
+
location: SourceLocation;
|
|
1662
|
+
/**
|
|
1663
|
+
* - Node-associated provenance.
|
|
1664
|
+
*/
|
|
1665
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1666
|
+
};
|
|
1667
|
+
export type OptionalSome = {
|
|
1668
|
+
/**
|
|
1669
|
+
* - Explicit present optional value.
|
|
1670
|
+
*/
|
|
1671
|
+
kind: "OptionalSome";
|
|
1672
|
+
/**
|
|
1673
|
+
* - Exact non-optional present value.
|
|
1674
|
+
*/
|
|
1675
|
+
value: Expression;
|
|
1676
|
+
/**
|
|
1677
|
+
* - Source location.
|
|
1678
|
+
*/
|
|
1679
|
+
location: SourceLocation;
|
|
1680
|
+
/**
|
|
1681
|
+
* - Node-associated provenance.
|
|
1682
|
+
*/
|
|
1683
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1684
|
+
};
|
|
1685
|
+
export type OptionalIsPresent = {
|
|
1686
|
+
/**
|
|
1687
|
+
* - Presence test for one simple identifier.
|
|
1688
|
+
*/
|
|
1689
|
+
kind: "OptionalIsPresent";
|
|
1690
|
+
/**
|
|
1691
|
+
* - Tested optional binding.
|
|
1692
|
+
*/
|
|
1693
|
+
operand: IdentifierExpression;
|
|
1694
|
+
/**
|
|
1695
|
+
* - Source location.
|
|
1696
|
+
*/
|
|
1697
|
+
location: SourceLocation;
|
|
1698
|
+
/**
|
|
1699
|
+
* - Node-associated provenance.
|
|
1700
|
+
*/
|
|
1701
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1702
|
+
};
|
|
1703
|
+
export type OptionalUnwrap = {
|
|
1704
|
+
/**
|
|
1705
|
+
* - Guarded unwrap of one simple identifier.
|
|
1706
|
+
*/
|
|
1707
|
+
kind: "OptionalUnwrap";
|
|
1708
|
+
/**
|
|
1709
|
+
* - Proven-present optional binding.
|
|
1710
|
+
*/
|
|
1711
|
+
operand: IdentifierExpression;
|
|
1712
|
+
/**
|
|
1713
|
+
* - Source location.
|
|
1714
|
+
*/
|
|
1715
|
+
location: SourceLocation;
|
|
1716
|
+
/**
|
|
1717
|
+
* - Node-associated provenance.
|
|
1718
|
+
*/
|
|
1719
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1720
|
+
};
|
|
1721
|
+
export type UnaryExpression = {
|
|
1722
|
+
/**
|
|
1723
|
+
* - Node discriminator.
|
|
1724
|
+
*/
|
|
1725
|
+
kind: "UnaryExpression";
|
|
1726
|
+
/**
|
|
1727
|
+
* - Closed semantic operation.
|
|
1728
|
+
*/
|
|
1729
|
+
operation: SemanticUnaryOperation;
|
|
1730
|
+
/**
|
|
1731
|
+
* - Operand evaluated exactly once.
|
|
1732
|
+
*/
|
|
1733
|
+
operand: Expression;
|
|
1734
|
+
/**
|
|
1735
|
+
* - Explicit operation result type.
|
|
1736
|
+
*/
|
|
1737
|
+
type: SemanticTypeName;
|
|
1738
|
+
/**
|
|
1739
|
+
* - Source location.
|
|
1740
|
+
*/
|
|
1741
|
+
location: SourceLocation;
|
|
1742
|
+
/**
|
|
1743
|
+
* - Node-associated provenance.
|
|
1744
|
+
*/
|
|
1745
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1746
|
+
};
|
|
1747
|
+
export type BinaryExpression = {
|
|
1748
|
+
/**
|
|
1749
|
+
* - Node discriminator.
|
|
1750
|
+
*/
|
|
1751
|
+
kind: "BinaryExpression";
|
|
1752
|
+
/**
|
|
1753
|
+
* - Closed semantic operation.
|
|
1754
|
+
*/
|
|
1755
|
+
operation: SemanticBinaryOperation;
|
|
1756
|
+
/**
|
|
1757
|
+
* - Left operand.
|
|
1758
|
+
*/
|
|
1759
|
+
left: Expression;
|
|
1760
|
+
/**
|
|
1761
|
+
* - Right operand.
|
|
1762
|
+
*/
|
|
1763
|
+
right: Expression;
|
|
1764
|
+
/**
|
|
1765
|
+
* - Explicit operation result type.
|
|
1766
|
+
*/
|
|
1767
|
+
type: SemanticTypeName;
|
|
1768
|
+
/**
|
|
1769
|
+
* - Source location.
|
|
1770
|
+
*/
|
|
1771
|
+
location: SourceLocation;
|
|
1772
|
+
/**
|
|
1773
|
+
* - Node-associated provenance.
|
|
1774
|
+
*/
|
|
1775
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1776
|
+
};
|
|
1777
|
+
export type CallExpression = {
|
|
1778
|
+
/**
|
|
1779
|
+
* - Node discriminator.
|
|
1780
|
+
*/
|
|
1781
|
+
kind: "CallExpression";
|
|
1782
|
+
/**
|
|
1783
|
+
* - Function name.
|
|
1784
|
+
*/
|
|
1785
|
+
callee: string;
|
|
1786
|
+
/**
|
|
1787
|
+
* - Positional arguments.
|
|
1788
|
+
*/
|
|
1789
|
+
arguments: Expression[];
|
|
1790
|
+
/**
|
|
1791
|
+
* - Deterministic declaration and signature binding, required after frontend validation.
|
|
1792
|
+
*/
|
|
1793
|
+
resolution?: ResolvedFunctionSignature;
|
|
1794
|
+
/**
|
|
1795
|
+
* - Deterministic site identity when the resolved function reaches a host effect.
|
|
1796
|
+
*/
|
|
1797
|
+
effectSiteId?: string;
|
|
1798
|
+
/**
|
|
1799
|
+
* - Inferred checked host-effect fact.
|
|
1800
|
+
*/
|
|
1801
|
+
effects?: readonly ["host"];
|
|
1802
|
+
/**
|
|
1803
|
+
* - Ordered capability failures reachable through this call.
|
|
1804
|
+
*/
|
|
1805
|
+
failureIds?: string[];
|
|
1806
|
+
/**
|
|
1807
|
+
* - Source location.
|
|
1808
|
+
*/
|
|
1809
|
+
location: SourceLocation;
|
|
1810
|
+
/**
|
|
1811
|
+
* - Node-associated provenance.
|
|
1812
|
+
*/
|
|
1813
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1814
|
+
};
|
|
1815
|
+
export type ResolvedConstructorSignature = {
|
|
1816
|
+
/**
|
|
1817
|
+
* - Resolution discriminator.
|
|
1818
|
+
*/
|
|
1819
|
+
kind: "ResolvedConstructorSignature";
|
|
1820
|
+
/**
|
|
1821
|
+
* - Exact constructor declaration identity.
|
|
1822
|
+
*/
|
|
1823
|
+
declarationId: string;
|
|
1824
|
+
/**
|
|
1825
|
+
* - Exact constructor parameter types.
|
|
1826
|
+
*/
|
|
1827
|
+
parameterTypes: SemanticTypeIdentity[];
|
|
1828
|
+
};
|
|
1829
|
+
export type ResolvedMethodSignature = {
|
|
1830
|
+
/**
|
|
1831
|
+
* - Resolution discriminator.
|
|
1832
|
+
*/
|
|
1833
|
+
kind: "ResolvedMethodSignature";
|
|
1834
|
+
/**
|
|
1835
|
+
* - Exact resolved method identity.
|
|
1836
|
+
*/
|
|
1837
|
+
declarationId: string;
|
|
1838
|
+
/**
|
|
1839
|
+
* - Exact method parameter types.
|
|
1840
|
+
*/
|
|
1841
|
+
parameterTypes: SemanticTypeIdentity[];
|
|
1842
|
+
/**
|
|
1843
|
+
* - Exact method return type.
|
|
1844
|
+
*/
|
|
1845
|
+
returnType: FunctionReturnTypeIdentity;
|
|
1846
|
+
/**
|
|
1847
|
+
* - Owned receiver transition and declared terminal-use failure when applicable.
|
|
1848
|
+
*/
|
|
1849
|
+
resourceFlow?: {
|
|
1850
|
+
kind: "preserve" | "terminal";
|
|
1851
|
+
terminalFailureId?: string;
|
|
1852
|
+
};
|
|
1853
|
+
};
|
|
1854
|
+
export type ReceiverExpression = {
|
|
1855
|
+
/**
|
|
1856
|
+
* - The declaring class instance receiver.
|
|
1857
|
+
*/
|
|
1858
|
+
kind: "ReceiverExpression";
|
|
1859
|
+
/**
|
|
1860
|
+
* - Stable declaring class identity.
|
|
1861
|
+
*/
|
|
1862
|
+
classId: string;
|
|
1863
|
+
/**
|
|
1864
|
+
* - Source receiver location.
|
|
1865
|
+
*/
|
|
1866
|
+
location: SourceLocation;
|
|
1867
|
+
/**
|
|
1868
|
+
* - Parser-owned receiver range.
|
|
1869
|
+
*/
|
|
1870
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1871
|
+
};
|
|
1872
|
+
export type ReferenceConstruction = {
|
|
1873
|
+
/**
|
|
1874
|
+
* - Fresh nominal reference construction.
|
|
1875
|
+
*/
|
|
1876
|
+
kind: "ReferenceConstruction";
|
|
1877
|
+
/**
|
|
1878
|
+
* - Exact class type.
|
|
1879
|
+
*/
|
|
1880
|
+
reference: ReferenceType | OwnedReferenceType;
|
|
1881
|
+
/**
|
|
1882
|
+
* - Source-ordered constructor arguments.
|
|
1883
|
+
*/
|
|
1884
|
+
arguments: Expression[];
|
|
1885
|
+
/**
|
|
1886
|
+
* - Exact constructor binding, required after validation.
|
|
1887
|
+
*/
|
|
1888
|
+
resolution?: ResolvedConstructorSignature;
|
|
1889
|
+
/**
|
|
1890
|
+
* - Deterministic site identity when construction reaches a host effect.
|
|
1891
|
+
*/
|
|
1892
|
+
effectSiteId?: string;
|
|
1893
|
+
/**
|
|
1894
|
+
* - Inferred checked host-effect fact.
|
|
1895
|
+
*/
|
|
1896
|
+
effects?: readonly ["host"];
|
|
1897
|
+
/**
|
|
1898
|
+
* - Ordered capability failures reachable through construction.
|
|
1899
|
+
*/
|
|
1900
|
+
failureIds?: string[];
|
|
1901
|
+
/**
|
|
1902
|
+
* - Complete construction location.
|
|
1903
|
+
*/
|
|
1904
|
+
location: SourceLocation;
|
|
1905
|
+
/**
|
|
1906
|
+
* - Parser-owned class-name range.
|
|
1907
|
+
*/
|
|
1908
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1909
|
+
};
|
|
1910
|
+
export type MethodCallExpression = {
|
|
1911
|
+
/**
|
|
1912
|
+
* - Resolved receiver-method invocation.
|
|
1913
|
+
*/
|
|
1914
|
+
kind: "MethodCallExpression";
|
|
1915
|
+
/**
|
|
1916
|
+
* - Receiver evaluated once before arguments.
|
|
1917
|
+
*/
|
|
1918
|
+
receiver: Expression;
|
|
1919
|
+
/**
|
|
1920
|
+
* - Stable method identity after validation.
|
|
1921
|
+
*/
|
|
1922
|
+
method: string;
|
|
1923
|
+
/**
|
|
1924
|
+
* - Source-ordered arguments.
|
|
1925
|
+
*/
|
|
1926
|
+
arguments: Expression[];
|
|
1927
|
+
/**
|
|
1928
|
+
* - Exact method binding, required after validation.
|
|
1929
|
+
*/
|
|
1930
|
+
resolution?: ResolvedMethodSignature;
|
|
1931
|
+
/**
|
|
1932
|
+
* - Deterministic site identity when the method reaches a host effect.
|
|
1933
|
+
*/
|
|
1934
|
+
effectSiteId?: string;
|
|
1935
|
+
/**
|
|
1936
|
+
* - Inferred checked host-effect fact.
|
|
1937
|
+
*/
|
|
1938
|
+
effects?: readonly ["host"];
|
|
1939
|
+
/**
|
|
1940
|
+
* - Ordered capability failures reachable through the method.
|
|
1941
|
+
*/
|
|
1942
|
+
failureIds?: string[];
|
|
1943
|
+
/**
|
|
1944
|
+
* - Complete call location.
|
|
1945
|
+
*/
|
|
1946
|
+
location: SourceLocation;
|
|
1947
|
+
/**
|
|
1948
|
+
* - Parser-owned method-name range.
|
|
1949
|
+
*/
|
|
1950
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1951
|
+
};
|
|
1952
|
+
export type PrivateFieldRead = {
|
|
1953
|
+
/**
|
|
1954
|
+
* - Declaring-receiver-only private field read.
|
|
1955
|
+
*/
|
|
1956
|
+
kind: "PrivateFieldRead";
|
|
1957
|
+
/**
|
|
1958
|
+
* - Exact declaring receiver.
|
|
1959
|
+
*/
|
|
1960
|
+
receiver: ReceiverExpression;
|
|
1961
|
+
/**
|
|
1962
|
+
* - Stable private field identity.
|
|
1963
|
+
*/
|
|
1964
|
+
field: string;
|
|
1965
|
+
/**
|
|
1966
|
+
* - Complete read location.
|
|
1967
|
+
*/
|
|
1968
|
+
location: SourceLocation;
|
|
1969
|
+
/**
|
|
1970
|
+
* - Parser-owned field-name range.
|
|
1971
|
+
*/
|
|
1972
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1973
|
+
};
|
|
1974
|
+
export type RecordConstruction = {
|
|
1975
|
+
/**
|
|
1976
|
+
* - Nominal record construction.
|
|
1977
|
+
*/
|
|
1978
|
+
kind: "RecordConstruction";
|
|
1979
|
+
/**
|
|
1980
|
+
* - Resolved record declaration identity.
|
|
1981
|
+
*/
|
|
1982
|
+
record: RecordType;
|
|
1983
|
+
/**
|
|
1984
|
+
* - Complete field-ordered constructor arguments.
|
|
1985
|
+
*/
|
|
1986
|
+
arguments: Expression[];
|
|
1987
|
+
/**
|
|
1988
|
+
* - Complete construction source location.
|
|
1989
|
+
*/
|
|
1990
|
+
location: SourceLocation;
|
|
1991
|
+
/**
|
|
1992
|
+
* - Parser-owned record-name range.
|
|
1993
|
+
*/
|
|
1994
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
1995
|
+
};
|
|
1996
|
+
export type MemberRead = {
|
|
1997
|
+
/**
|
|
1998
|
+
* - Nominal immutable record-field read.
|
|
1999
|
+
*/
|
|
2000
|
+
kind: "MemberRead";
|
|
2001
|
+
/**
|
|
2002
|
+
* - Record-valued receiver.
|
|
2003
|
+
*/
|
|
2004
|
+
receiver: Expression;
|
|
2005
|
+
/**
|
|
2006
|
+
* - Stable resolved field identity after frontend validation.
|
|
2007
|
+
*/
|
|
2008
|
+
field: string;
|
|
2009
|
+
/**
|
|
2010
|
+
* - Complete member-read source location.
|
|
2011
|
+
*/
|
|
2012
|
+
location: SourceLocation;
|
|
2013
|
+
/**
|
|
2014
|
+
* - Parser-owned member-name range.
|
|
2015
|
+
*/
|
|
2016
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2017
|
+
};
|
|
2018
|
+
export type ErrorMessageRead = {
|
|
2019
|
+
/**
|
|
2020
|
+
* - The sole portable error member operation.
|
|
2021
|
+
*/
|
|
2022
|
+
kind: "ErrorMessageRead";
|
|
2023
|
+
/**
|
|
2024
|
+
* - Catch binding whose immutable message is read.
|
|
2025
|
+
*/
|
|
2026
|
+
receiver: IdentifierExpression;
|
|
2027
|
+
/**
|
|
2028
|
+
* - Complete message-read source location.
|
|
2029
|
+
*/
|
|
2030
|
+
location: SourceLocation;
|
|
2031
|
+
/**
|
|
2032
|
+
* - Parser-owned message-member range.
|
|
2033
|
+
*/
|
|
2034
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2035
|
+
};
|
|
2036
|
+
export type Expression = IdentifierExpression | ReceiverExpression | IntegerLiteral | BooleanLiteral | StringLiteral | OptionalNone | OptionalSome | OptionalIsPresent | OptionalUnwrap | ListLiteral | MapLiteral | OrderedMapLiteral | ListIndexExpression | MapLookupExpression | CollectionSizeExpression | UnaryExpression | BinaryExpression | CallExpression | EffectCallExpression | OwnedMoveExpression | OwnedBorrowExpression | MethodCallExpression | ReferenceConstruction | RecordConstruction | MemberRead | PrivateFieldRead | ErrorMessageRead;
|
|
2037
|
+
export type LocalDeclaration = {
|
|
2038
|
+
/**
|
|
2039
|
+
* - Node discriminator.
|
|
2040
|
+
*/
|
|
2041
|
+
kind: "LocalDeclaration";
|
|
2042
|
+
/**
|
|
2043
|
+
* - Declared local name.
|
|
2044
|
+
*/
|
|
2045
|
+
name: string;
|
|
2046
|
+
/**
|
|
2047
|
+
* - Explicit local type.
|
|
2048
|
+
*/
|
|
2049
|
+
type: SemanticValueType;
|
|
2050
|
+
/**
|
|
2051
|
+
* - Whether later assignment is allowed.
|
|
2052
|
+
*/
|
|
2053
|
+
mutable: boolean;
|
|
2054
|
+
/**
|
|
2055
|
+
* - Required initializer expression.
|
|
2056
|
+
*/
|
|
2057
|
+
initializer: Expression;
|
|
2058
|
+
/**
|
|
2059
|
+
* - Declaration source location.
|
|
2060
|
+
*/
|
|
2061
|
+
location: SourceLocation;
|
|
2062
|
+
/**
|
|
2063
|
+
* - Node-associated provenance.
|
|
2064
|
+
*/
|
|
2065
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2066
|
+
};
|
|
2067
|
+
export type AssignmentStatement = {
|
|
2068
|
+
/**
|
|
2069
|
+
* - Node discriminator.
|
|
2070
|
+
*/
|
|
2071
|
+
kind: "AssignmentStatement";
|
|
2072
|
+
/**
|
|
2073
|
+
* - Simple local assignment target.
|
|
2074
|
+
*/
|
|
2075
|
+
target: IdentifierExpression;
|
|
2076
|
+
/**
|
|
2077
|
+
* - Assigned expression.
|
|
2078
|
+
*/
|
|
2079
|
+
expression: Expression;
|
|
2080
|
+
/**
|
|
2081
|
+
* - Assignment source location.
|
|
2082
|
+
*/
|
|
2083
|
+
location: SourceLocation;
|
|
2084
|
+
/**
|
|
2085
|
+
* - Node-associated provenance.
|
|
2086
|
+
*/
|
|
2087
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2088
|
+
};
|
|
2089
|
+
export type PrivateFieldWriteStatement = {
|
|
2090
|
+
/**
|
|
2091
|
+
* - Declaring-receiver-only private field mutation.
|
|
2092
|
+
*/
|
|
2093
|
+
kind: "PrivateFieldWriteStatement";
|
|
2094
|
+
/**
|
|
2095
|
+
* - Exact declaring receiver.
|
|
2096
|
+
*/
|
|
2097
|
+
receiver: ReceiverExpression;
|
|
2098
|
+
/**
|
|
2099
|
+
* - Stable private field identity.
|
|
2100
|
+
*/
|
|
2101
|
+
field: string;
|
|
2102
|
+
/**
|
|
2103
|
+
* - New field value.
|
|
2104
|
+
*/
|
|
2105
|
+
expression: Expression;
|
|
2106
|
+
/**
|
|
2107
|
+
* - Assignment source location.
|
|
2108
|
+
*/
|
|
2109
|
+
location: SourceLocation;
|
|
2110
|
+
/**
|
|
2111
|
+
* - Parser-owned field-name range.
|
|
2112
|
+
*/
|
|
2113
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2114
|
+
};
|
|
2115
|
+
export type ReturnStatement = {
|
|
2116
|
+
/**
|
|
2117
|
+
* - Node discriminator.
|
|
2118
|
+
*/
|
|
2119
|
+
kind: "ReturnStatement";
|
|
2120
|
+
/**
|
|
2121
|
+
* - Returned expression; absent exactly for a bare void return.
|
|
2122
|
+
*/
|
|
2123
|
+
expression?: Expression;
|
|
2124
|
+
/**
|
|
2125
|
+
* - Source location.
|
|
2126
|
+
*/
|
|
2127
|
+
location: SourceLocation;
|
|
2128
|
+
/**
|
|
2129
|
+
* - Node-associated provenance.
|
|
2130
|
+
*/
|
|
2131
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2132
|
+
};
|
|
2133
|
+
export type ExpressionStatement = {
|
|
2134
|
+
/**
|
|
2135
|
+
* - Node discriminator.
|
|
2136
|
+
*/
|
|
2137
|
+
kind: "ExpressionStatement";
|
|
2138
|
+
/**
|
|
2139
|
+
* - A direct, receiver, or authorized call whose resolved return type is void.
|
|
2140
|
+
*/
|
|
2141
|
+
expression: CallExpression | MethodCallExpression | EffectCallExpression;
|
|
2142
|
+
/**
|
|
2143
|
+
* - Source location.
|
|
2144
|
+
*/
|
|
2145
|
+
location: SourceLocation;
|
|
2146
|
+
/**
|
|
2147
|
+
* - Node-associated provenance.
|
|
2148
|
+
*/
|
|
2149
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2150
|
+
};
|
|
2151
|
+
export type IfStatement = {
|
|
2152
|
+
/**
|
|
2153
|
+
* - Node discriminator.
|
|
2154
|
+
*/
|
|
2155
|
+
kind: "IfStatement";
|
|
2156
|
+
/**
|
|
2157
|
+
* - Branch condition.
|
|
2158
|
+
*/
|
|
2159
|
+
condition: Expression;
|
|
2160
|
+
/**
|
|
2161
|
+
* - True branch.
|
|
2162
|
+
*/
|
|
2163
|
+
consequent: Block;
|
|
2164
|
+
/**
|
|
2165
|
+
* - False branch, absent when execution falls through.
|
|
2166
|
+
*/
|
|
2167
|
+
alternate?: Block;
|
|
2168
|
+
/**
|
|
2169
|
+
* - Source location.
|
|
2170
|
+
*/
|
|
2171
|
+
location: SourceLocation;
|
|
2172
|
+
/**
|
|
2173
|
+
* - Node-associated provenance.
|
|
2174
|
+
*/
|
|
2175
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2176
|
+
};
|
|
2177
|
+
export type ValueBinding = {
|
|
2178
|
+
/**
|
|
2179
|
+
* - Iteration-binding discriminator.
|
|
2180
|
+
*/
|
|
2181
|
+
kind: "ValueBinding";
|
|
2182
|
+
/**
|
|
2183
|
+
* - Body-local binding name.
|
|
2184
|
+
*/
|
|
2185
|
+
name: string;
|
|
2186
|
+
/**
|
|
2187
|
+
* - Exact list element type.
|
|
2188
|
+
*/
|
|
2189
|
+
type: SemanticValueType;
|
|
2190
|
+
/**
|
|
2191
|
+
* - Iteration bindings are always immutable.
|
|
2192
|
+
*/
|
|
2193
|
+
mutable: false;
|
|
2194
|
+
/**
|
|
2195
|
+
* - Binding source location.
|
|
2196
|
+
*/
|
|
2197
|
+
location: SourceLocation;
|
|
2198
|
+
/**
|
|
2199
|
+
* - Node-associated provenance.
|
|
2200
|
+
*/
|
|
2201
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2202
|
+
};
|
|
2203
|
+
export type ForEachStatement = {
|
|
2204
|
+
/**
|
|
2205
|
+
* - Ordered list-iteration discriminator.
|
|
2206
|
+
*/
|
|
2207
|
+
kind: "ForEachStatement";
|
|
2208
|
+
/**
|
|
2209
|
+
* - Deterministic module-local loop identity, required after frontend validation.
|
|
2210
|
+
*/
|
|
2211
|
+
id?: string;
|
|
2212
|
+
/**
|
|
2213
|
+
* - List expression evaluated exactly once before traversal.
|
|
2214
|
+
*/
|
|
2215
|
+
list: Expression;
|
|
2216
|
+
/**
|
|
2217
|
+
* - Immutable binding scoped to the body.
|
|
2218
|
+
*/
|
|
2219
|
+
valueBinding: ValueBinding;
|
|
2220
|
+
/**
|
|
2221
|
+
* - Loop body.
|
|
2222
|
+
*/
|
|
2223
|
+
body: Block;
|
|
2224
|
+
/**
|
|
2225
|
+
* - Complete loop source location.
|
|
2226
|
+
*/
|
|
2227
|
+
location: SourceLocation;
|
|
2228
|
+
/**
|
|
2229
|
+
* - Node-associated provenance.
|
|
2230
|
+
*/
|
|
2231
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2232
|
+
};
|
|
2233
|
+
export type ForEachMapStatement = {
|
|
2234
|
+
/**
|
|
2235
|
+
* - Insertion-ordered map pair-iteration discriminator.
|
|
2236
|
+
*/
|
|
2237
|
+
kind: "ForEachMapStatement";
|
|
2238
|
+
/**
|
|
2239
|
+
* - Deterministic module-local loop identity, required after frontend validation.
|
|
2240
|
+
*/
|
|
2241
|
+
id?: string;
|
|
2242
|
+
/**
|
|
2243
|
+
* - Ordered-map expression evaluated exactly once before traversal.
|
|
2244
|
+
*/
|
|
2245
|
+
map: Expression;
|
|
2246
|
+
/**
|
|
2247
|
+
* - Immutable string-key binding scoped to the body.
|
|
2248
|
+
*/
|
|
2249
|
+
keyBinding: ValueBinding;
|
|
2250
|
+
/**
|
|
2251
|
+
* - Immutable homogeneous value binding scoped to the body.
|
|
2252
|
+
*/
|
|
2253
|
+
valueBinding: ValueBinding;
|
|
2254
|
+
/**
|
|
2255
|
+
* - Loop body.
|
|
2256
|
+
*/
|
|
2257
|
+
body: Block;
|
|
2258
|
+
/**
|
|
2259
|
+
* - Complete loop source location.
|
|
2260
|
+
*/
|
|
2261
|
+
location: SourceLocation;
|
|
2262
|
+
/**
|
|
2263
|
+
* - Node-associated provenance.
|
|
2264
|
+
*/
|
|
2265
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2266
|
+
};
|
|
2267
|
+
export type WhileStatement = {
|
|
2268
|
+
/**
|
|
2269
|
+
* - Strict-Boolean pre-condition loop discriminator.
|
|
2270
|
+
*/
|
|
2271
|
+
kind: "WhileStatement";
|
|
2272
|
+
/**
|
|
2273
|
+
* - Deterministic module-local loop identity, required after frontend validation.
|
|
2274
|
+
*/
|
|
2275
|
+
id?: string;
|
|
2276
|
+
/**
|
|
2277
|
+
* - Boolean expression evaluated before every iteration.
|
|
2278
|
+
*/
|
|
2279
|
+
condition: Expression;
|
|
2280
|
+
/**
|
|
2281
|
+
* - Ordered loop body.
|
|
2282
|
+
*/
|
|
2283
|
+
body: Block;
|
|
2284
|
+
/**
|
|
2285
|
+
* - Complete loop source location.
|
|
2286
|
+
*/
|
|
2287
|
+
location: SourceLocation;
|
|
2288
|
+
/**
|
|
2289
|
+
* - Node-associated provenance.
|
|
2290
|
+
*/
|
|
2291
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2292
|
+
};
|
|
2293
|
+
export type BreakStatement = {
|
|
2294
|
+
/**
|
|
2295
|
+
* - Nearest-loop break discriminator.
|
|
2296
|
+
*/
|
|
2297
|
+
kind: "BreakStatement";
|
|
2298
|
+
/**
|
|
2299
|
+
* - Resolved nearest-loop identity, required after frontend validation in loop context.
|
|
2300
|
+
*/
|
|
2301
|
+
targetLoopId?: string;
|
|
2302
|
+
/**
|
|
2303
|
+
* - Keyword source location.
|
|
2304
|
+
*/
|
|
2305
|
+
location: SourceLocation;
|
|
2306
|
+
/**
|
|
2307
|
+
* - Node-associated provenance.
|
|
2308
|
+
*/
|
|
2309
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2310
|
+
};
|
|
2311
|
+
export type ContinueStatement = {
|
|
2312
|
+
/**
|
|
2313
|
+
* - Nearest-loop continue discriminator.
|
|
2314
|
+
*/
|
|
2315
|
+
kind: "ContinueStatement";
|
|
2316
|
+
/**
|
|
2317
|
+
* - Resolved nearest-loop identity, required after frontend validation in loop context.
|
|
2318
|
+
*/
|
|
2319
|
+
targetLoopId?: string;
|
|
2320
|
+
/**
|
|
2321
|
+
* - Keyword source location.
|
|
2322
|
+
*/
|
|
2323
|
+
location: SourceLocation;
|
|
2324
|
+
/**
|
|
2325
|
+
* - Node-associated provenance.
|
|
2326
|
+
*/
|
|
2327
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2328
|
+
};
|
|
2329
|
+
export type ErrorConstruction = {
|
|
2330
|
+
/**
|
|
2331
|
+
* - Construction of one declared unchecked error.
|
|
2332
|
+
*/
|
|
2333
|
+
kind: "ErrorConstruction";
|
|
2334
|
+
/**
|
|
2335
|
+
* - Exact nominal error type.
|
|
2336
|
+
*/
|
|
2337
|
+
error: ErrorType;
|
|
2338
|
+
/**
|
|
2339
|
+
* - Sole immutable string payload.
|
|
2340
|
+
*/
|
|
2341
|
+
message: Expression;
|
|
2342
|
+
/**
|
|
2343
|
+
* - Complete construction source location.
|
|
2344
|
+
*/
|
|
2345
|
+
location: SourceLocation;
|
|
2346
|
+
/**
|
|
2347
|
+
* - Parser-owned type and message ranges.
|
|
2348
|
+
*/
|
|
2349
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2350
|
+
};
|
|
2351
|
+
export type RaiseStatement = {
|
|
2352
|
+
/**
|
|
2353
|
+
* - Abrupt unchecked-error propagation.
|
|
2354
|
+
*/
|
|
2355
|
+
kind: "RaiseStatement";
|
|
2356
|
+
/**
|
|
2357
|
+
* - Exact constructed semantic error.
|
|
2358
|
+
*/
|
|
2359
|
+
error: ErrorConstruction;
|
|
2360
|
+
/**
|
|
2361
|
+
* - Complete raise source location.
|
|
2362
|
+
*/
|
|
2363
|
+
location: SourceLocation;
|
|
2364
|
+
/**
|
|
2365
|
+
* - Parser-owned raise range.
|
|
2366
|
+
*/
|
|
2367
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2368
|
+
};
|
|
2369
|
+
export type CatchBinding = {
|
|
2370
|
+
/**
|
|
2371
|
+
* - Exact-handler binding discriminator.
|
|
2372
|
+
*/
|
|
2373
|
+
kind: "CatchBinding";
|
|
2374
|
+
/**
|
|
2375
|
+
* - Handler-local binding name.
|
|
2376
|
+
*/
|
|
2377
|
+
name: string;
|
|
2378
|
+
/**
|
|
2379
|
+
* - Exact caught nominal error type.
|
|
2380
|
+
*/
|
|
2381
|
+
type: ErrorType;
|
|
2382
|
+
/**
|
|
2383
|
+
* - Catch bindings are immutable.
|
|
2384
|
+
*/
|
|
2385
|
+
mutable: false;
|
|
2386
|
+
/**
|
|
2387
|
+
* - Binding source location.
|
|
2388
|
+
*/
|
|
2389
|
+
location: SourceLocation;
|
|
2390
|
+
/**
|
|
2391
|
+
* - Parser-owned binding range.
|
|
2392
|
+
*/
|
|
2393
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2394
|
+
};
|
|
2395
|
+
export type TryStatement = {
|
|
2396
|
+
/**
|
|
2397
|
+
* - One body and one exact typed handler.
|
|
2398
|
+
*/
|
|
2399
|
+
kind: "TryStatement";
|
|
2400
|
+
/**
|
|
2401
|
+
* - Protected body.
|
|
2402
|
+
*/
|
|
2403
|
+
body: Block;
|
|
2404
|
+
/**
|
|
2405
|
+
* - Exact caught nominal error type.
|
|
2406
|
+
*/
|
|
2407
|
+
catchType: ErrorType;
|
|
2408
|
+
/**
|
|
2409
|
+
* - Immutable handler-local binding.
|
|
2410
|
+
*/
|
|
2411
|
+
catchBinding: CatchBinding;
|
|
2412
|
+
/**
|
|
2413
|
+
* - Handler body.
|
|
2414
|
+
*/
|
|
2415
|
+
catchBody: Block;
|
|
2416
|
+
/**
|
|
2417
|
+
* - Complete try/handler source location.
|
|
2418
|
+
*/
|
|
2419
|
+
location: SourceLocation;
|
|
2420
|
+
/**
|
|
2421
|
+
* - Parser-owned try/catch ranges.
|
|
2422
|
+
*/
|
|
2423
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2424
|
+
};
|
|
2425
|
+
export type LocalStatement = LocalDeclaration | AssignmentStatement;
|
|
2426
|
+
export type Statement = LocalStatement | PrivateFieldWriteStatement | ExpressionStatement | IfStatement | ForEachStatement | ForEachMapStatement | WhileStatement | BreakStatement | ContinueStatement | ReturnStatement | PrintStatement | RaiseStatement | TryStatement;
|
|
2427
|
+
export type Block = {
|
|
2428
|
+
/**
|
|
2429
|
+
* - Node discriminator.
|
|
2430
|
+
*/
|
|
2431
|
+
kind: "Block";
|
|
908
2432
|
/**
|
|
909
2433
|
* - Ordered statements in one lexical scope.
|
|
910
2434
|
*/
|
|
911
|
-
statements: Statement[];
|
|
2435
|
+
statements: Statement[];
|
|
2436
|
+
/**
|
|
2437
|
+
* - Source location.
|
|
2438
|
+
*/
|
|
2439
|
+
location: SourceLocation;
|
|
2440
|
+
/**
|
|
2441
|
+
* - Node-associated provenance.
|
|
2442
|
+
*/
|
|
2443
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2444
|
+
};
|
|
2445
|
+
export type FunctionDeclaration = {
|
|
2446
|
+
/**
|
|
2447
|
+
* - Node discriminator.
|
|
2448
|
+
*/
|
|
2449
|
+
kind: "FunctionDeclaration";
|
|
2450
|
+
/**
|
|
2451
|
+
* - Deterministic module-local declaration identity, required after frontend validation.
|
|
2452
|
+
*/
|
|
2453
|
+
id?: string;
|
|
2454
|
+
/**
|
|
2455
|
+
* - Function name.
|
|
2456
|
+
*/
|
|
2457
|
+
name: string;
|
|
2458
|
+
/**
|
|
2459
|
+
* - Ordered declaration-scoped invariant unbounded parameters.
|
|
2460
|
+
*/
|
|
2461
|
+
typeParameters?: TypeParameter[];
|
|
2462
|
+
/**
|
|
2463
|
+
* - Function parameters.
|
|
2464
|
+
*/
|
|
2465
|
+
parameters: Parameter[];
|
|
2466
|
+
/**
|
|
2467
|
+
* - Return type.
|
|
2468
|
+
*/
|
|
2469
|
+
returnType: SemanticFunctionReturnType;
|
|
2470
|
+
/**
|
|
2471
|
+
* - Function body.
|
|
2472
|
+
*/
|
|
2473
|
+
body: Block;
|
|
2474
|
+
/**
|
|
2475
|
+
* - Source location.
|
|
2476
|
+
*/
|
|
2477
|
+
location: SourceLocation;
|
|
2478
|
+
/**
|
|
2479
|
+
* - Node-associated provenance.
|
|
2480
|
+
*/
|
|
2481
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2482
|
+
};
|
|
2483
|
+
export type RecordField = {
|
|
2484
|
+
/**
|
|
2485
|
+
* - Closed record-field discriminator.
|
|
2486
|
+
*/
|
|
2487
|
+
kind: "RecordField";
|
|
2488
|
+
/**
|
|
2489
|
+
* - Stable module-local field identity, required after frontend validation.
|
|
2490
|
+
*/
|
|
2491
|
+
id?: string;
|
|
2492
|
+
/**
|
|
2493
|
+
* - Field name.
|
|
2494
|
+
*/
|
|
2495
|
+
name: string;
|
|
2496
|
+
/**
|
|
2497
|
+
* - Exact field type.
|
|
2498
|
+
*/
|
|
2499
|
+
type: SemanticValueType;
|
|
2500
|
+
/**
|
|
2501
|
+
* - Field declaration source location.
|
|
2502
|
+
*/
|
|
2503
|
+
location: SourceLocation;
|
|
2504
|
+
/**
|
|
2505
|
+
* - Parser-owned name/type ranges.
|
|
2506
|
+
*/
|
|
2507
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2508
|
+
};
|
|
2509
|
+
export type RecordDeclaration = {
|
|
2510
|
+
/**
|
|
2511
|
+
* - Nominal closed immutable record declaration.
|
|
2512
|
+
*/
|
|
2513
|
+
kind: "RecordDeclaration";
|
|
2514
|
+
/**
|
|
2515
|
+
* - Stable module-local declaration identity, required after frontend validation.
|
|
2516
|
+
*/
|
|
2517
|
+
id?: string;
|
|
2518
|
+
/**
|
|
2519
|
+
* - Record name.
|
|
2520
|
+
*/
|
|
2521
|
+
name: string;
|
|
2522
|
+
/**
|
|
2523
|
+
* - Ordered declaration-scoped invariant unbounded parameters.
|
|
2524
|
+
*/
|
|
2525
|
+
typeParameters?: TypeParameter[];
|
|
2526
|
+
/**
|
|
2527
|
+
* - Ordered unique visible fields.
|
|
2528
|
+
*/
|
|
2529
|
+
fields: RecordField[];
|
|
2530
|
+
/**
|
|
2531
|
+
* - Complete declaration source location.
|
|
2532
|
+
*/
|
|
2533
|
+
location: SourceLocation;
|
|
2534
|
+
/**
|
|
2535
|
+
* - Parser-owned declaration-name range.
|
|
2536
|
+
*/
|
|
2537
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2538
|
+
};
|
|
2539
|
+
export type PrivateField = {
|
|
2540
|
+
/**
|
|
2541
|
+
* - Declaring-class-private mutable instance field.
|
|
2542
|
+
*/
|
|
2543
|
+
kind: "PrivateField";
|
|
2544
|
+
/**
|
|
2545
|
+
* - Stable class-scoped field identity, required after validation.
|
|
2546
|
+
*/
|
|
2547
|
+
id?: string;
|
|
2548
|
+
/**
|
|
2549
|
+
* - Source-visible field name inside the declaring class only.
|
|
2550
|
+
*/
|
|
2551
|
+
name: string;
|
|
2552
|
+
/**
|
|
2553
|
+
* - Exact field type.
|
|
2554
|
+
*/
|
|
2555
|
+
type: SemanticValueType;
|
|
2556
|
+
/**
|
|
2557
|
+
* - Field declaration location.
|
|
2558
|
+
*/
|
|
2559
|
+
location: SourceLocation;
|
|
2560
|
+
/**
|
|
2561
|
+
* - Parser-owned name/type ranges.
|
|
2562
|
+
*/
|
|
2563
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2564
|
+
};
|
|
2565
|
+
export type ConstructorDeclaration = {
|
|
2566
|
+
/**
|
|
2567
|
+
* - Exact complete private-state initializer.
|
|
2568
|
+
*/
|
|
2569
|
+
kind: "ConstructorDeclaration";
|
|
2570
|
+
/**
|
|
2571
|
+
* - Stable class-scoped constructor identity, required after validation.
|
|
2572
|
+
*/
|
|
2573
|
+
id?: string;
|
|
2574
|
+
/**
|
|
2575
|
+
* - Exact positional constructor signature.
|
|
2576
|
+
*/
|
|
2577
|
+
parameters: Parameter[];
|
|
2578
|
+
/**
|
|
2579
|
+
* - Field-order initialization body.
|
|
2580
|
+
*/
|
|
2581
|
+
body: Block;
|
|
2582
|
+
/**
|
|
2583
|
+
* - Inferred checked host-effect fact.
|
|
2584
|
+
*/
|
|
2585
|
+
effects?: readonly ["host"];
|
|
2586
|
+
/**
|
|
2587
|
+
* - Ordered capability failures reachable through construction.
|
|
2588
|
+
*/
|
|
2589
|
+
failureIds?: string[];
|
|
2590
|
+
/**
|
|
2591
|
+
* - Complete constructor location.
|
|
2592
|
+
*/
|
|
2593
|
+
location: SourceLocation;
|
|
2594
|
+
/**
|
|
2595
|
+
* - Parser-owned constructor range.
|
|
2596
|
+
*/
|
|
2597
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2598
|
+
};
|
|
2599
|
+
export type MethodDeclaration = {
|
|
2600
|
+
/**
|
|
2601
|
+
* - Receiver-bound class method.
|
|
2602
|
+
*/
|
|
2603
|
+
kind: "MethodDeclaration";
|
|
2604
|
+
/**
|
|
2605
|
+
* - Stable class-scoped method identity, required after validation.
|
|
2606
|
+
*/
|
|
2607
|
+
id?: string;
|
|
2608
|
+
/**
|
|
2609
|
+
* - Source-visible method name.
|
|
2610
|
+
*/
|
|
2611
|
+
name: string;
|
|
2612
|
+
/**
|
|
2613
|
+
* - Exact positional method signature.
|
|
2614
|
+
*/
|
|
2615
|
+
parameters: Parameter[];
|
|
2616
|
+
/**
|
|
2617
|
+
* - Exact return type.
|
|
2618
|
+
*/
|
|
2619
|
+
returnType: SemanticFunctionReturnType;
|
|
2620
|
+
/**
|
|
2621
|
+
* - Method body.
|
|
2622
|
+
*/
|
|
2623
|
+
body: Block;
|
|
2624
|
+
/**
|
|
2625
|
+
* - Inferred checked host-effect fact.
|
|
2626
|
+
*/
|
|
2627
|
+
effects?: readonly ["host"];
|
|
2628
|
+
/**
|
|
2629
|
+
* - Ordered capability failures reachable through the method.
|
|
2630
|
+
*/
|
|
2631
|
+
failureIds?: string[];
|
|
2632
|
+
/**
|
|
2633
|
+
* - Complete method location.
|
|
2634
|
+
*/
|
|
2635
|
+
location: SourceLocation;
|
|
2636
|
+
/**
|
|
2637
|
+
* - Parser-owned method-name range.
|
|
2638
|
+
*/
|
|
2639
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2640
|
+
};
|
|
2641
|
+
export type ClassDeclaration = {
|
|
2642
|
+
/**
|
|
2643
|
+
* - Nominal reference class with private mutable state.
|
|
2644
|
+
*/
|
|
2645
|
+
kind: "ClassDeclaration";
|
|
2646
|
+
/**
|
|
2647
|
+
* - Stable module-local class identity, required after validation.
|
|
2648
|
+
*/
|
|
2649
|
+
id?: string;
|
|
2650
|
+
/**
|
|
2651
|
+
* - Source-visible class name.
|
|
2652
|
+
*/
|
|
2653
|
+
name: string;
|
|
2654
|
+
/**
|
|
2655
|
+
* - Ordered private instance state.
|
|
2656
|
+
*/
|
|
2657
|
+
fields: PrivateField[];
|
|
2658
|
+
/**
|
|
2659
|
+
* - Sole exact constructor.
|
|
2660
|
+
*/
|
|
2661
|
+
constructor: ConstructorDeclaration;
|
|
2662
|
+
/**
|
|
2663
|
+
* - Ordered receiver methods.
|
|
2664
|
+
*/
|
|
2665
|
+
methods: MethodDeclaration[];
|
|
2666
|
+
/**
|
|
2667
|
+
* - Explicit class ownership profile.
|
|
2668
|
+
*/
|
|
2669
|
+
ownership?: {
|
|
2670
|
+
kind: "ordinary";
|
|
2671
|
+
} | {
|
|
2672
|
+
kind: "ownedResource";
|
|
2673
|
+
fieldId: string;
|
|
2674
|
+
resourceId: string;
|
|
2675
|
+
};
|
|
2676
|
+
/**
|
|
2677
|
+
* - Complete class location.
|
|
2678
|
+
*/
|
|
2679
|
+
location: SourceLocation;
|
|
2680
|
+
/**
|
|
2681
|
+
* - Parser-owned class-name range.
|
|
2682
|
+
*/
|
|
2683
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2684
|
+
};
|
|
2685
|
+
export type ErrorDeclaration = {
|
|
2686
|
+
/**
|
|
2687
|
+
* - Nominal unchecked error with one immutable string message.
|
|
2688
|
+
*/
|
|
2689
|
+
kind: "ErrorDeclaration";
|
|
2690
|
+
/**
|
|
2691
|
+
* - Stable module-local declaration identity, required after frontend validation.
|
|
2692
|
+
*/
|
|
2693
|
+
id?: string;
|
|
2694
|
+
/**
|
|
2695
|
+
* - Error type name.
|
|
2696
|
+
*/
|
|
2697
|
+
name: string;
|
|
2698
|
+
/**
|
|
2699
|
+
* - Complete declaration source location.
|
|
2700
|
+
*/
|
|
2701
|
+
location: SourceLocation;
|
|
2702
|
+
/**
|
|
2703
|
+
* - Parser-owned declaration-name range.
|
|
2704
|
+
*/
|
|
2705
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2706
|
+
};
|
|
2707
|
+
export type PrintStatement = {
|
|
2708
|
+
/**
|
|
2709
|
+
* - Node discriminator.
|
|
2710
|
+
*/
|
|
2711
|
+
kind: "PrintStatement";
|
|
2712
|
+
/**
|
|
2713
|
+
* - Printed expression.
|
|
2714
|
+
*/
|
|
2715
|
+
expression: Expression;
|
|
2716
|
+
/**
|
|
2717
|
+
* - Source location.
|
|
2718
|
+
*/
|
|
2719
|
+
location: SourceLocation;
|
|
2720
|
+
/**
|
|
2721
|
+
* - Node-associated provenance.
|
|
2722
|
+
*/
|
|
2723
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2724
|
+
};
|
|
2725
|
+
export type EntryPoint = {
|
|
2726
|
+
/**
|
|
2727
|
+
* - Node discriminator.
|
|
2728
|
+
*/
|
|
2729
|
+
kind: "EntryPoint";
|
|
2730
|
+
/**
|
|
2731
|
+
* - Entry-point body.
|
|
2732
|
+
*/
|
|
2733
|
+
body: Block;
|
|
2734
|
+
/**
|
|
2735
|
+
* - Source location.
|
|
2736
|
+
*/
|
|
2737
|
+
location: SourceLocation;
|
|
2738
|
+
/**
|
|
2739
|
+
* - Node-associated provenance.
|
|
2740
|
+
*/
|
|
2741
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2742
|
+
};
|
|
2743
|
+
export type SemanticModule = {
|
|
2744
|
+
/**
|
|
2745
|
+
* - Node discriminator.
|
|
2746
|
+
*/
|
|
2747
|
+
kind: "Module";
|
|
2748
|
+
/**
|
|
2749
|
+
* - Top-level nominal record declarations in source order; omitted when empty.
|
|
2750
|
+
*/
|
|
2751
|
+
records?: RecordDeclaration[];
|
|
2752
|
+
/**
|
|
2753
|
+
* - Top-level nominal reference classes in source order; omitted when empty.
|
|
2754
|
+
*/
|
|
2755
|
+
classes?: ClassDeclaration[];
|
|
2756
|
+
/**
|
|
2757
|
+
* - Top-level nominal unchecked error declarations in source order; omitted when empty.
|
|
2758
|
+
*/
|
|
2759
|
+
errors?: ErrorDeclaration[];
|
|
2760
|
+
/**
|
|
2761
|
+
* - Compiler-authorized Task 034 declarations; omission is the legacy empty set.
|
|
2762
|
+
*/
|
|
2763
|
+
capabilities?: EffectCapabilityDeclaration[];
|
|
2764
|
+
/**
|
|
2765
|
+
* - Top-level functions.
|
|
2766
|
+
*/
|
|
2767
|
+
functions: FunctionDeclaration[];
|
|
2768
|
+
/**
|
|
2769
|
+
* - Executable entry point.
|
|
2770
|
+
*/
|
|
2771
|
+
entryPoint: EntryPoint;
|
|
2772
|
+
/**
|
|
2773
|
+
* - Source location.
|
|
2774
|
+
*/
|
|
2775
|
+
location: SourceLocation;
|
|
2776
|
+
/**
|
|
2777
|
+
* - Node-associated provenance.
|
|
2778
|
+
*/
|
|
2779
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2780
|
+
/**
|
|
2781
|
+
* - Parser-authored source and identity index; optional for legacy caller-authored modules.
|
|
2782
|
+
*/
|
|
2783
|
+
provenance?: SemanticProvenance;
|
|
2784
|
+
};
|
|
2785
|
+
export type SemanticImport = {
|
|
2786
|
+
/**
|
|
2787
|
+
* - Node discriminator.
|
|
2788
|
+
*/
|
|
2789
|
+
kind: "Import";
|
|
2790
|
+
/**
|
|
2791
|
+
* - Stable imported semantic module identity.
|
|
2792
|
+
*/
|
|
2793
|
+
moduleId: string;
|
|
2794
|
+
/**
|
|
2795
|
+
* - Exported declaration name in the source module.
|
|
2796
|
+
*/
|
|
2797
|
+
importedName: string;
|
|
2798
|
+
/**
|
|
2799
|
+
* - Binding name visible in the importing module.
|
|
2800
|
+
*/
|
|
2801
|
+
localName: string;
|
|
2802
|
+
/**
|
|
2803
|
+
* - Imported declaration namespace.
|
|
2804
|
+
*/
|
|
2805
|
+
symbolKind: SemanticDeclarationKind;
|
|
2806
|
+
/**
|
|
2807
|
+
* - Stable resolved declaration identity.
|
|
2808
|
+
*/
|
|
2809
|
+
declarationId: string;
|
|
2810
|
+
/**
|
|
2811
|
+
* - Whether source syntax admitted only type-position use.
|
|
2812
|
+
*/
|
|
2813
|
+
typeOnly: boolean;
|
|
2814
|
+
/**
|
|
2815
|
+
* - Complete import declaration/specifier location.
|
|
2816
|
+
*/
|
|
2817
|
+
location: SourceLocation;
|
|
2818
|
+
/**
|
|
2819
|
+
* - Parser-owned import ranges.
|
|
2820
|
+
*/
|
|
2821
|
+
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2822
|
+
/**
|
|
2823
|
+
* - Exact parser-proved native facade identity evidence.
|
|
2824
|
+
*/
|
|
2825
|
+
stdlibFacade?: StdlibFacadeResolutionEvidence;
|
|
2826
|
+
};
|
|
2827
|
+
export type StdlibFacadeResolutionEvidence = {
|
|
2828
|
+
/**
|
|
2829
|
+
* - Evidence schema.
|
|
2830
|
+
*/
|
|
2831
|
+
schema: "SemantifoldStdlibFacadeResolution";
|
|
2832
|
+
/**
|
|
2833
|
+
* - Evidence version.
|
|
2834
|
+
*/
|
|
2835
|
+
version: 1;
|
|
2836
|
+
/**
|
|
2837
|
+
* - Selected facade identity.
|
|
2838
|
+
*/
|
|
2839
|
+
facadeIdentity: string;
|
|
2840
|
+
/**
|
|
2841
|
+
* - Selected exact facade version.
|
|
2842
|
+
*/
|
|
2843
|
+
facadeVersion: string;
|
|
2844
|
+
/**
|
|
2845
|
+
* - Parser-proved source stdlib module identity.
|
|
2846
|
+
*/
|
|
2847
|
+
nativeModule: string;
|
|
2848
|
+
/**
|
|
2849
|
+
* - Parser-proved source stdlib symbol identity.
|
|
2850
|
+
*/
|
|
2851
|
+
nativeSymbol: string;
|
|
2852
|
+
};
|
|
2853
|
+
export type SemanticExport = {
|
|
2854
|
+
/**
|
|
2855
|
+
* - Node discriminator.
|
|
2856
|
+
*/
|
|
2857
|
+
kind: "Export";
|
|
912
2858
|
/**
|
|
913
|
-
* -
|
|
2859
|
+
* - Name visible to importing modules.
|
|
2860
|
+
*/
|
|
2861
|
+
exportedName: string;
|
|
2862
|
+
/**
|
|
2863
|
+
* - Exported declaration namespace.
|
|
2864
|
+
*/
|
|
2865
|
+
symbolKind: SemanticDeclarationKind;
|
|
2866
|
+
/**
|
|
2867
|
+
* - Stable exported declaration identity.
|
|
2868
|
+
*/
|
|
2869
|
+
declarationId: string;
|
|
2870
|
+
/**
|
|
2871
|
+
* - Complete export declaration/specifier location.
|
|
914
2872
|
*/
|
|
915
2873
|
location: SourceLocation;
|
|
916
2874
|
/**
|
|
917
|
-
* -
|
|
2875
|
+
* - Parser-owned export ranges.
|
|
918
2876
|
*/
|
|
919
2877
|
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
920
2878
|
};
|
|
921
|
-
export type
|
|
2879
|
+
export type SemanticProgramModule = {
|
|
922
2880
|
/**
|
|
923
2881
|
* - Node discriminator.
|
|
924
2882
|
*/
|
|
925
|
-
kind: "
|
|
2883
|
+
kind: "Module";
|
|
926
2884
|
/**
|
|
927
|
-
* -
|
|
2885
|
+
* - Stable caller-supplied logical module identity.
|
|
928
2886
|
*/
|
|
929
|
-
|
|
2887
|
+
id: string;
|
|
930
2888
|
/**
|
|
931
|
-
* -
|
|
2889
|
+
* - Explicit source filename; never an implicit read request.
|
|
932
2890
|
*/
|
|
933
|
-
|
|
2891
|
+
sourceFilename: string;
|
|
934
2892
|
/**
|
|
935
|
-
* -
|
|
2893
|
+
* - Top-level nominal record declarations.
|
|
936
2894
|
*/
|
|
937
|
-
|
|
2895
|
+
records?: RecordDeclaration[];
|
|
938
2896
|
/**
|
|
939
|
-
* -
|
|
2897
|
+
* - Compiler-owned facade reference classes.
|
|
940
2898
|
*/
|
|
941
|
-
|
|
2899
|
+
classes?: ClassDeclaration[];
|
|
942
2900
|
/**
|
|
943
|
-
* -
|
|
2901
|
+
* - Top-level nominal unchecked error declarations.
|
|
944
2902
|
*/
|
|
945
|
-
|
|
2903
|
+
errors?: ErrorDeclaration[];
|
|
946
2904
|
/**
|
|
947
|
-
* -
|
|
2905
|
+
* - Top-level functions.
|
|
948
2906
|
*/
|
|
949
|
-
|
|
950
|
-
};
|
|
951
|
-
export type PrintStatement = {
|
|
2907
|
+
functions: FunctionDeclaration[];
|
|
952
2908
|
/**
|
|
953
|
-
* -
|
|
2909
|
+
* - Resolved imports in source order.
|
|
954
2910
|
*/
|
|
955
|
-
|
|
2911
|
+
imports: SemanticImport[];
|
|
956
2912
|
/**
|
|
957
|
-
* -
|
|
2913
|
+
* - Resolved exports in source order.
|
|
958
2914
|
*/
|
|
959
|
-
|
|
2915
|
+
exports: SemanticExport[];
|
|
2916
|
+
/**
|
|
2917
|
+
* - Authority declarations shared by reference when the program declares a standard-library contract.
|
|
2918
|
+
*/
|
|
2919
|
+
capabilities?: EffectCapabilityDeclaration[];
|
|
2920
|
+
/**
|
|
2921
|
+
* - Sole executable entry point, present only on the selected module.
|
|
2922
|
+
*/
|
|
2923
|
+
entryPoint?: EntryPoint;
|
|
960
2924
|
/**
|
|
961
2925
|
* - Source location.
|
|
962
2926
|
*/
|
|
@@ -965,61 +2929,220 @@ export type PrintStatement = {
|
|
|
965
2929
|
* - Node-associated provenance.
|
|
966
2930
|
*/
|
|
967
2931
|
sourceProvenance?: SemanticNodeSourceProvenance;
|
|
2932
|
+
/**
|
|
2933
|
+
* - Parser-authored source and identity index.
|
|
2934
|
+
*/
|
|
2935
|
+
provenance?: SemanticProvenance;
|
|
2936
|
+
/**
|
|
2937
|
+
* - Selected compiler-owned facade module identity.
|
|
2938
|
+
*/
|
|
2939
|
+
stdlibFacade?: {
|
|
2940
|
+
identity: string;
|
|
2941
|
+
version: string;
|
|
2942
|
+
};
|
|
968
2943
|
};
|
|
969
|
-
export type
|
|
2944
|
+
export type StdlibFacadeProgramModuleDescriptor = {
|
|
2945
|
+
/**
|
|
2946
|
+
* - Versioned facade dependencies.
|
|
2947
|
+
*/
|
|
2948
|
+
dependencies: {
|
|
2949
|
+
identity: string;
|
|
2950
|
+
range: string;
|
|
2951
|
+
}[];
|
|
2952
|
+
/**
|
|
2953
|
+
* - Facade identity.
|
|
2954
|
+
*/
|
|
2955
|
+
identity: string;
|
|
2956
|
+
/**
|
|
2957
|
+
* - Exact native source identities.
|
|
2958
|
+
*/
|
|
2959
|
+
nativeModules: ({
|
|
2960
|
+
identity: string;
|
|
2961
|
+
kind: "module";
|
|
2962
|
+
symbols: string[];
|
|
2963
|
+
} | {
|
|
2964
|
+
forms: ("unqualified-call" | "receiver-call")[];
|
|
2965
|
+
identity: string;
|
|
2966
|
+
kind: "builtin";
|
|
2967
|
+
symbols: string[];
|
|
2968
|
+
})[];
|
|
2969
|
+
/**
|
|
2970
|
+
* - Public source declarations.
|
|
2971
|
+
*/
|
|
2972
|
+
publicDeclarations: ({
|
|
2973
|
+
effects: string[];
|
|
2974
|
+
failures: string[];
|
|
2975
|
+
forms: ("direct-call" | "unqualified-call" | "receiver-call")[];
|
|
2976
|
+
kind: "function";
|
|
2977
|
+
name: string;
|
|
2978
|
+
ownership: "not-applicable";
|
|
2979
|
+
parameters: {
|
|
2980
|
+
name: string;
|
|
2981
|
+
type: string;
|
|
2982
|
+
}[];
|
|
2983
|
+
returnType: string;
|
|
2984
|
+
} | {
|
|
2985
|
+
constructor: {
|
|
2986
|
+
effects: string[];
|
|
2987
|
+
failures: string[];
|
|
2988
|
+
ownership: "acquired";
|
|
2989
|
+
parameters: {
|
|
2990
|
+
name: string;
|
|
2991
|
+
type: string;
|
|
2992
|
+
}[];
|
|
2993
|
+
};
|
|
2994
|
+
forms: ["constructor-call"];
|
|
2995
|
+
kind: "class";
|
|
2996
|
+
methods: {
|
|
2997
|
+
effects: string[];
|
|
2998
|
+
failures: string[];
|
|
2999
|
+
forms: ["receiver-call"];
|
|
3000
|
+
name: string;
|
|
3001
|
+
ownership: "borrowed" | "consumed";
|
|
3002
|
+
parameters: {
|
|
3003
|
+
name: string;
|
|
3004
|
+
type: string;
|
|
3005
|
+
}[];
|
|
3006
|
+
returnType: string;
|
|
3007
|
+
}[];
|
|
3008
|
+
name: string;
|
|
3009
|
+
ownership: "owned-reference";
|
|
3010
|
+
})[];
|
|
3011
|
+
/**
|
|
3012
|
+
* - Canonical capability requirements.
|
|
3013
|
+
*/
|
|
3014
|
+
requirements: {
|
|
3015
|
+
module: string;
|
|
3016
|
+
operations: string[];
|
|
3017
|
+
range: string;
|
|
3018
|
+
}[];
|
|
3019
|
+
/**
|
|
3020
|
+
* - Exact source runtime profile.
|
|
3021
|
+
*/
|
|
3022
|
+
runtimeProfile: string;
|
|
3023
|
+
/**
|
|
3024
|
+
* - Compiler-owned semantic module identity.
|
|
3025
|
+
*/
|
|
3026
|
+
sourceModule: string;
|
|
3027
|
+
/**
|
|
3028
|
+
* - Exact facade version.
|
|
3029
|
+
*/
|
|
3030
|
+
version: string;
|
|
970
3031
|
/**
|
|
971
|
-
* -
|
|
3032
|
+
* - Native-selectable visibility.
|
|
972
3033
|
*/
|
|
973
|
-
|
|
3034
|
+
visibility: "internal" | "public";
|
|
3035
|
+
};
|
|
3036
|
+
export type StdlibFacadeProgramDescriptor = {
|
|
974
3037
|
/**
|
|
975
|
-
* -
|
|
3038
|
+
* - Facade descriptor schema.
|
|
976
3039
|
*/
|
|
977
|
-
|
|
3040
|
+
schema: "SemantifoldStdlibFacades";
|
|
978
3041
|
/**
|
|
979
|
-
* -
|
|
3042
|
+
* - Facade descriptor version.
|
|
980
3043
|
*/
|
|
981
|
-
|
|
3044
|
+
version: 1;
|
|
982
3045
|
/**
|
|
983
|
-
* -
|
|
3046
|
+
* - Source-language compatibility profile.
|
|
984
3047
|
*/
|
|
985
|
-
|
|
3048
|
+
language: SemanticLanguage;
|
|
3049
|
+
/**
|
|
3050
|
+
* - Dependency-first selected executable closure.
|
|
3051
|
+
*/
|
|
3052
|
+
modules: StdlibFacadeProgramModuleDescriptor[];
|
|
986
3053
|
};
|
|
987
|
-
export type
|
|
3054
|
+
export type SemanticProgram = {
|
|
988
3055
|
/**
|
|
989
3056
|
* - Node discriminator.
|
|
990
3057
|
*/
|
|
991
|
-
kind: "
|
|
3058
|
+
kind: "Program";
|
|
992
3059
|
/**
|
|
993
|
-
* -
|
|
3060
|
+
* - Dependency-first deterministic module order.
|
|
994
3061
|
*/
|
|
995
|
-
|
|
3062
|
+
modules: SemanticProgramModule[];
|
|
996
3063
|
/**
|
|
997
|
-
* -
|
|
3064
|
+
* - Stable identity of the sole entry module.
|
|
998
3065
|
*/
|
|
999
|
-
|
|
3066
|
+
entryModule: string;
|
|
1000
3067
|
/**
|
|
1001
|
-
* -
|
|
3068
|
+
* - Caller-order complete source registry.
|
|
1002
3069
|
*/
|
|
1003
|
-
|
|
3070
|
+
sources: RegisteredSource[];
|
|
1004
3071
|
/**
|
|
1005
|
-
* -
|
|
3072
|
+
* - Declared standard-library contract; plain, never frozen.
|
|
1006
3073
|
*/
|
|
1007
|
-
|
|
3074
|
+
stdlibContract?: {
|
|
3075
|
+
contractVersion?: string;
|
|
3076
|
+
identity: string;
|
|
3077
|
+
};
|
|
1008
3078
|
/**
|
|
1009
|
-
* -
|
|
3079
|
+
* - Ordered declared standard-library contracts; plain, never frozen.
|
|
1010
3080
|
*/
|
|
1011
|
-
|
|
3081
|
+
stdlibContracts?: {
|
|
3082
|
+
contractVersion?: string;
|
|
3083
|
+
identity: string;
|
|
3084
|
+
}[];
|
|
3085
|
+
/**
|
|
3086
|
+
* - Complete selected source-language facade closure.
|
|
3087
|
+
*/
|
|
3088
|
+
stdlibFacades?: StdlibFacadeProgramDescriptor;
|
|
1012
3089
|
};
|
|
1013
|
-
export type SemanticNode = SemanticModule | FunctionDeclaration | Parameter | Block | Statement | EntryPoint | Expression |
|
|
3090
|
+
export type SemanticNode = SemanticModule | SemanticProgramModule | SemanticImport | SemanticExport | RecordDeclaration | ClassDeclaration | ErrorDeclaration | EffectCapabilityDeclaration | EffectResourceDeclaration | EffectFailureDeclaration | EffectOperationDeclaration | RecordField | PrivateField | ConstructorDeclaration | MethodDeclaration | FunctionDeclaration | TypeParameter | Parameter | ValueBinding | CatchBinding | Block | Statement | EntryPoint | Expression | ErrorConstruction | ErrorType | MapEntry | SemanticValueType | FunctionReturnTypeReference;
|
|
1014
3091
|
export type SemanticNodeWithoutLocations = SemanticNode;
|
|
1015
|
-
/** @typedef {"php" | "ruby" | "javascript" | "typescript" | "java" | "python" | "csharp" | "go" | "c" | "cpp"} SemanticLanguage */
|
|
3092
|
+
/** @typedef {"php" | "ruby" | "javascript" | "typescript" | "java" | "kotlin" | "python" | "csharp" | "go" | "c" | "cpp" | "rust" | "swift" | "dart"} SemanticLanguage */
|
|
3093
|
+
/** @typedef {SemanticLanguage} TextBackendLanguage */
|
|
3094
|
+
/** @typedef {TextBackendLanguage | "wasm" | "ios"} BackendLanguage */
|
|
3095
|
+
/** @typedef {SemanticLanguage | "html"} GeneratedTextLanguage */
|
|
1016
3096
|
/** @typedef {"integer" | "boolean" | "string"} SemanticTypeName */
|
|
3097
|
+
/** @typedef {SemanticTypeName | "void"} FunctionReturnTypeName */
|
|
1017
3098
|
/** @typedef {"IntegerNegate" | "BooleanNot"} SemanticUnaryOperation */
|
|
1018
3099
|
/** @typedef {"IntegerAdd" | "IntegerSubtract" | "IntegerMultiply" | "BooleanAnd" | "BooleanOr" | "IntegerEqual" | "IntegerNotEqual" | "BooleanEqual" | "BooleanNotEqual" | "StringEqual" | "StringNotEqual" | "IntegerLessThan" | "IntegerLessThanOrEqual" | "IntegerGreaterThan" | "IntegerGreaterThanOrEqual" | "StringConcat"} SemanticBinaryOperation */
|
|
1019
|
-
/** @typedef {"function" | "parameter" | "local"} SemanticSymbolKind */
|
|
1020
|
-
/** @typedef {"
|
|
3100
|
+
/** @typedef {"capability" | "resource" | "failure" | "operation" | "record" | "class" | "error" | "field" | "constructor" | "method" | "function" | "typeParameter" | "parameter" | "local" | "iteration" | "catch"} SemanticSymbolKind */
|
|
3101
|
+
/** @typedef {"record" | "class" | "error" | "function"} SemanticDeclarationKind */
|
|
3102
|
+
/** @typedef {"declaration" | "type" | "construct" | "member" | "read" | "write" | "call"} SemanticSymbolRole */
|
|
1021
3103
|
/** @typedef {"parse" | "generate" | "restore" | "compile" | "link" | "validate" | "instantiate" | "execute"} AcceptanceStage */
|
|
1022
3104
|
/** @typedef {"entry" | "source" | "manifest" | "support" | "mapping" | "resource" | "loader"} GeneratedArtifactRole */
|
|
3105
|
+
/**
|
|
3106
|
+
* @typedef IosApplicationConfigurationInput
|
|
3107
|
+
* @property {string} productName - Safe Xcode product/path identity.
|
|
3108
|
+
* @property {string} moduleName - Safe Swift module identity.
|
|
3109
|
+
* @property {string} organizationPrefix - Caller-supplied reverse-DNS organization prefix.
|
|
3110
|
+
* @property {string} bundleIdentifier - Caller-supplied reverse-DNS application bundle identity.
|
|
3111
|
+
* @property {string} deploymentTarget - Caller-supplied major.minor iOS deployment target; never inferred.
|
|
3112
|
+
* @property {string} displayName - User-visible application name.
|
|
3113
|
+
* @property {"Sources"} [sourceRoot] - Fixed generated-source root.
|
|
3114
|
+
* @property {"Assets.xcassets"} [resourceRoot] - Fixed caller-resource root.
|
|
3115
|
+
* @property {"swiftui"} [lifecycle] - Sole supported lifecycle.
|
|
3116
|
+
* @property {Record<string, never>} [infoPlist] - Closed baseline caller plist extension; currently empty.
|
|
3117
|
+
* @property {unknown[]} [permissions] - Validated as the closed empty baseline permissions.
|
|
3118
|
+
* @property {unknown[]} [entitlements] - Validated as the closed empty baseline entitlements.
|
|
3119
|
+
* @property {unknown[]} [privacyDeclarations] - Validated as the closed empty baseline privacy declarations.
|
|
3120
|
+
* @property {unknown[]} [capabilities] - Validated as the closed empty baseline Apple capabilities.
|
|
3121
|
+
*/
|
|
3122
|
+
/**
|
|
3123
|
+
* @typedef IosApplicationConfiguration
|
|
3124
|
+
* @property {string} productName - Validated Xcode product/path identity.
|
|
3125
|
+
* @property {string} moduleName - Validated Swift module identity.
|
|
3126
|
+
* @property {string} organizationPrefix - Validated reverse-DNS organization prefix.
|
|
3127
|
+
* @property {string} bundleIdentifier - Validated reverse-DNS application bundle identity.
|
|
3128
|
+
* @property {string} deploymentTarget - Validated caller-supplied deployment target.
|
|
3129
|
+
* @property {string} displayName - Validated display name.
|
|
3130
|
+
* @property {"Sources"} sourceRoot - Generated-source root.
|
|
3131
|
+
* @property {"Assets.xcassets"} resourceRoot - Caller-resource root.
|
|
3132
|
+
* @property {"swiftui"} lifecycle - Sole supported lifecycle.
|
|
3133
|
+
* @property {Readonly<Record<string, never>>} infoPlist - Empty caller plist extension.
|
|
3134
|
+
* @property {readonly never[]} permissions - Empty baseline permissions.
|
|
3135
|
+
* @property {readonly never[]} entitlements - Empty baseline entitlements.
|
|
3136
|
+
* @property {readonly never[]} privacyDeclarations - Empty baseline privacy declarations.
|
|
3137
|
+
* @property {readonly never[]} capabilities - Empty baseline Apple capabilities.
|
|
3138
|
+
*/
|
|
3139
|
+
/**
|
|
3140
|
+
* @typedef IosApplicationAssetInput
|
|
3141
|
+
* @property {string} path - Full safe destination below Assets.xcassets.
|
|
3142
|
+
* @property {string | Uint8Array} content - Exact caller-provided text or bytes.
|
|
3143
|
+
* @property {string} mediaType - Explicit artifact media type.
|
|
3144
|
+
* @property {string} sha256 - Lowercase SHA-256 of exact UTF-8 text or bytes.
|
|
3145
|
+
*/
|
|
1023
3146
|
/**
|
|
1024
3147
|
* @typedef LanguageRoleCapabilities
|
|
1025
3148
|
* @property {boolean} frontend - Parser adapter availability.
|
|
@@ -1027,6 +3150,7 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1027
3150
|
* @property {boolean} binaryBackend - Binary backend availability.
|
|
1028
3151
|
* @property {boolean} applicationBackend - Application-artifact backend availability.
|
|
1029
3152
|
* @property {boolean} interoperability - Interoperability bridge availability.
|
|
3153
|
+
* @property {boolean} provider - Target host stdlib provider/native-binding availability.
|
|
1030
3154
|
*/
|
|
1031
3155
|
/**
|
|
1032
3156
|
* @typedef LanguageMappingCapabilities
|
|
@@ -1039,12 +3163,27 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1039
3163
|
* @property {readonly AcceptanceStage[]} stages - Applicable ordered acceptance stages.
|
|
1040
3164
|
* @property {readonly string[]} toolchains - Required canonical toolchain IDs.
|
|
1041
3165
|
*/
|
|
3166
|
+
/**
|
|
3167
|
+
* @typedef LanguageFeatureCapabilities
|
|
3168
|
+
* @property {boolean} generalFunctionsAndCalls - Task 005 arbitrary required signatures, resolved direct calls, and void functions.
|
|
3169
|
+
* @property {boolean} immutableCollections - Task 006 recursive immutable lists/maps, total access, and size.
|
|
3170
|
+
* @property {boolean} optionalValues - Task 007 explicit optional values, presence tests, and guarded unwrap.
|
|
3171
|
+
* @property {boolean} orderedListIteration - Task 008 ordered immutable-list iteration and nearest-loop control.
|
|
3172
|
+
* @property {boolean} orderedMapIteration - Task 014 insertion-ordered immutable-map pair iteration.
|
|
3173
|
+
* @property {boolean} conditionControlledLoops - Task 032 strict-Boolean pre-condition loops and resolved control.
|
|
3174
|
+
* @property {boolean} closedRecords - Task 009 nominal closed immutable records, construction, and member reads.
|
|
3175
|
+
* @property {boolean} typedErrors - Task 011 nominal unchecked errors, raises, and exact typed catches.
|
|
3176
|
+
* @property {boolean} typeParametersAndGenerics - Task 012 invariant unbounded type parameters and closed generic applications.
|
|
3177
|
+
* @property {boolean} referenceClasses - Task 033 nominal reference classes, private instance state, exact constructors, and receiver methods.
|
|
3178
|
+
* @property {boolean} effectfulCapabilitiesAndResources - Task 034 authorized host effects, typed failures, and owned resources.
|
|
3179
|
+
*/
|
|
1042
3180
|
/**
|
|
1043
3181
|
* @typedef LanguageCapabilities
|
|
1044
3182
|
* @property {string} id - Stable registry identity.
|
|
1045
3183
|
* @property {Readonly<LanguageRoleCapabilities>} roles - Independently registered roles.
|
|
1046
3184
|
* @property {"single" | "multiple"} artifactMultiplicity - Target artifact multiplicity.
|
|
1047
3185
|
* @property {boolean} roundTrip - Whether frontend/backend round-trip acceptance is declared.
|
|
3186
|
+
* @property {Readonly<LanguageFeatureCapabilities>} features - Semantic feature capabilities.
|
|
1048
3187
|
* @property {Readonly<LanguageMappingCapabilities>} mapping - Mapping forms.
|
|
1049
3188
|
* @property {Readonly<LanguageAcceptanceCapabilities>} acceptance - Stages and toolchains.
|
|
1050
3189
|
*/
|
|
@@ -1066,6 +3205,7 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1066
3205
|
* @property {string} filename - Original filename, preserved verbatim.
|
|
1067
3206
|
* @property {string | null} content - Original source content, preserved verbatim when available.
|
|
1068
3207
|
* @property {SemanticLanguage | null} language - Parser language when known.
|
|
3208
|
+
* @property {"application" | "facade"} [ownership] - Caller or compiler-owned source role for semantic programs.
|
|
1069
3209
|
*/
|
|
1070
3210
|
/**
|
|
1071
3211
|
* @typedef SourceOrigin
|
|
@@ -1137,6 +3277,7 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1137
3277
|
* @property {string} name - Semantic symbol name.
|
|
1138
3278
|
* @property {SemanticSymbolKind} kind - Symbol category.
|
|
1139
3279
|
* @property {string} declarationNodeId - Declaring node identity.
|
|
3280
|
+
* @property {string} [semanticDeclarationId] - Stable semantic declaration identity for record, field, and function symbols.
|
|
1140
3281
|
* @property {SourceLocation} location - Exact declaration-name range.
|
|
1141
3282
|
* @property {SemanticSymbolReference[]} references - Ordered resolved references.
|
|
1142
3283
|
*/
|
|
@@ -1163,7 +3304,7 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1163
3304
|
/**
|
|
1164
3305
|
* @typedef GeneratedSource
|
|
1165
3306
|
* @property {string} filename - Output filename.
|
|
1166
|
-
* @property {
|
|
3307
|
+
* @property {GeneratedTextLanguage} language - Output text language.
|
|
1167
3308
|
* @property {string} content - Exact generated LF source.
|
|
1168
3309
|
*/
|
|
1169
3310
|
/**
|
|
@@ -1222,6 +3363,7 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1222
3363
|
* @property {string} target - Stable language or target ID.
|
|
1223
3364
|
* @property {string} entry - Path of the sole declared entry artifact.
|
|
1224
3365
|
* @property {readonly GeneratedSetArtifact[]} artifacts - Deterministic artifact order.
|
|
3366
|
+
* @property {Readonly<Record<string, unknown>>} [metadata] - Detached target-specific JSON metadata.
|
|
1225
3367
|
*/
|
|
1226
3368
|
/**
|
|
1227
3369
|
* @typedef DiscoveredToolchain
|
|
@@ -1229,8 +3371,8 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1229
3371
|
* @property {string} command - Documented canonical command.
|
|
1230
3372
|
* @property {string} executable - Exact absolute executable path.
|
|
1231
3373
|
* @property {"override" | "canonical"} source - Resolution route.
|
|
1232
|
-
* @property {string} version - First
|
|
1233
|
-
* @property {string} versionOutput - Complete
|
|
3374
|
+
* @property {string} version - First selected-stream version line.
|
|
3375
|
+
* @property {string} versionOutput - Complete normalized stdout, or normalized stderr when stdout is empty.
|
|
1234
3376
|
* @property {readonly string[]} versionArguments - Exact version argument array.
|
|
1235
3377
|
*/
|
|
1236
3378
|
/**
|
|
@@ -1251,14 +3393,255 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1251
3393
|
/**
|
|
1252
3394
|
* @typedef TypeReference
|
|
1253
3395
|
* @property {"TypeReference"} kind - Node discriminator.
|
|
1254
|
-
* @property {SemanticTypeName} name - Normalized type name.
|
|
3396
|
+
* @property {SemanticTypeName} name - Normalized scalar value type name.
|
|
3397
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance that survives semantic transforms.
|
|
3398
|
+
*/
|
|
3399
|
+
/**
|
|
3400
|
+
* @typedef TypeParameter
|
|
3401
|
+
* @property {"TypeParameter"} kind - Declaration-scoped invariant unbounded type parameter.
|
|
3402
|
+
* @property {string} [id] - Stable declaration-scoped identity, required after validation.
|
|
3403
|
+
* @property {string} name - Source-visible type parameter name.
|
|
3404
|
+
* @property {SourceLocation} location - Parser-owned declaration location.
|
|
3405
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned declaration-name range.
|
|
3406
|
+
*/
|
|
3407
|
+
/**
|
|
3408
|
+
* @typedef TypeVariableReference
|
|
3409
|
+
* @property {"TypeVariableReference"} kind - Reference to one declaration-scoped type parameter.
|
|
3410
|
+
* @property {string} parameterId - Stable referenced type-parameter identity.
|
|
3411
|
+
* @property {SourceLocation} location - Parser-owned reference location.
|
|
3412
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
3413
|
+
*/
|
|
3414
|
+
/**
|
|
3415
|
+
* @typedef ListType
|
|
3416
|
+
* @property {"ListType"} kind - Recursive list-type discriminator.
|
|
3417
|
+
* @property {SemanticValueType} elementType - Homogeneous element type.
|
|
3418
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and argument ranges.
|
|
3419
|
+
*/
|
|
3420
|
+
/**
|
|
3421
|
+
* @typedef MapType
|
|
3422
|
+
* @property {"MapType"} kind - Recursive map-type discriminator.
|
|
3423
|
+
* @property {TypeReference} keyType - Exact string key type.
|
|
3424
|
+
* @property {SemanticValueType} valueType - Homogeneous value type.
|
|
3425
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and argument ranges.
|
|
3426
|
+
*/
|
|
3427
|
+
/**
|
|
3428
|
+
* @typedef OrderedMapType
|
|
3429
|
+
* @property {"OrderedMapType"} kind - Distinct insertion-ordered map-type discriminator.
|
|
3430
|
+
* @property {TypeReference} keyType - Exact supported string key type.
|
|
3431
|
+
* @property {SemanticValueType} valueType - Homogeneous value type.
|
|
3432
|
+
* @property {"insertion"} order - Canonical first-insertion encounter order.
|
|
3433
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and argument ranges.
|
|
3434
|
+
*/
|
|
3435
|
+
/**
|
|
3436
|
+
* @typedef OptionalType
|
|
3437
|
+
* @property {"OptionalType"} kind - Explicit presence/absence type discriminator.
|
|
3438
|
+
* @property {SemanticValueType} valueType - Exact present-value type.
|
|
3439
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and constituent ranges.
|
|
3440
|
+
*/
|
|
3441
|
+
/**
|
|
3442
|
+
* @typedef RecordType
|
|
3443
|
+
* @property {"RecordType"} kind - Nominal record-type discriminator.
|
|
3444
|
+
* @property {string} declarationId - Stable module-local record declaration identity.
|
|
3445
|
+
* @property {SemanticValueType[]} [arguments] - Exact invariant type arguments; required for generic declarations and absent for non-generic declarations.
|
|
3446
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
3447
|
+
*/
|
|
3448
|
+
/**
|
|
3449
|
+
* @typedef ErrorType
|
|
3450
|
+
* @property {"ErrorType"} kind - Nominal unchecked-error type discriminator.
|
|
3451
|
+
* @property {string} declarationId - Stable error declaration identity.
|
|
3452
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
3453
|
+
*/
|
|
3454
|
+
/**
|
|
3455
|
+
* @typedef ReferenceType
|
|
3456
|
+
* @property {"ReferenceType"} kind - Nominal reference-class type discriminator.
|
|
3457
|
+
* @property {string} declarationId - Stable module-local class declaration identity.
|
|
3458
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
3459
|
+
*/
|
|
3460
|
+
/**
|
|
3461
|
+
* @typedef OwnedResourceType
|
|
3462
|
+
* @property {"OwnedResourceType"} kind - Compiler-owned linear resource type.
|
|
3463
|
+
* @property {string} resourceId - Exact authority resource declaration identity.
|
|
3464
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
3465
|
+
*/
|
|
3466
|
+
/**
|
|
3467
|
+
* @typedef OwnedReferenceType
|
|
3468
|
+
* @property {"OwnedReferenceType"} kind - Linear reference that owns one protected resource.
|
|
3469
|
+
* @property {string} declarationId - Exact owned class declaration identity.
|
|
3470
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
3471
|
+
*/
|
|
3472
|
+
/** @typedef {TypeReference | TypeVariableReference | ListType | MapType | OrderedMapType | OptionalType | RecordType | ReferenceType | OwnedResourceType | OwnedReferenceType} SemanticValueType */
|
|
3473
|
+
/** @typedef {SemanticValueType | ErrorType} SemanticBindingType */
|
|
3474
|
+
/**
|
|
3475
|
+
* @typedef FunctionReturnTypeReference
|
|
3476
|
+
* @property {"TypeReference"} kind - Void return discriminator.
|
|
3477
|
+
* @property {"void"} name - Normalized non-value function return.
|
|
1255
3478
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance that survives semantic transforms.
|
|
1256
3479
|
*/
|
|
3480
|
+
/** @typedef {SemanticValueType | FunctionReturnTypeReference} SemanticFunctionReturnType */
|
|
3481
|
+
/** @typedef {SemanticTypeName | {kind: "TypeVariableReference", parameterId: string} | {kind: "ListType", elementType: SemanticTypeIdentity} | {kind: "MapType", keyType: SemanticTypeIdentity, valueType: SemanticTypeIdentity} | {kind: "OrderedMapType", keyType: SemanticTypeIdentity, valueType: SemanticTypeIdentity, order: "insertion"} | {kind: "OptionalType", valueType: SemanticTypeIdentity} | {kind: "RecordType", declarationId: string, arguments?: SemanticTypeIdentity[]} | {kind: "ReferenceType", declarationId: string} | {kind: "OwnedResourceType", resourceId: string} | {kind: "OwnedReferenceType", declarationId: string}} SemanticTypeIdentity */
|
|
3482
|
+
/** @typedef {SemanticTypeIdentity | "void"} FunctionReturnTypeIdentity */
|
|
3483
|
+
/**
|
|
3484
|
+
* @typedef ResolvedFunctionSignature
|
|
3485
|
+
* @property {"ResolvedFunctionSignature"} kind - Resolution discriminator.
|
|
3486
|
+
* @property {string} declarationId - Deterministic module-local declaration identity.
|
|
3487
|
+
* @property {SemanticTypeIdentity[]} parameterTypes - Exact required positional parameter types.
|
|
3488
|
+
* @property {FunctionReturnTypeIdentity} returnType - Exact resolved return type.
|
|
3489
|
+
* @property {SemanticTypeIdentity[]} [typeArguments] - Inferred declaration-order type arguments for a generic call.
|
|
3490
|
+
*/
|
|
1257
3491
|
/**
|
|
1258
3492
|
* @typedef Parameter
|
|
1259
3493
|
* @property {"Parameter"} kind - Node discriminator.
|
|
1260
3494
|
* @property {string} name - Parameter name.
|
|
1261
|
-
* @property {
|
|
3495
|
+
* @property {SemanticValueType} type - Parameter type.
|
|
3496
|
+
* @property {SourceLocation} location - Source location.
|
|
3497
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3498
|
+
*/
|
|
3499
|
+
/**
|
|
3500
|
+
* @typedef ResolvedEffectOperationSignature
|
|
3501
|
+
* @property {"ResolvedEffectOperationSignature"} kind - Resolution discriminator.
|
|
3502
|
+
* @property {string} capabilityId - Exact capability declaration identity.
|
|
3503
|
+
* @property {string} operationId - Exact operation declaration identity.
|
|
3504
|
+
* @property {SemanticTypeIdentity[]} parameterTypes - Exact ordered parameter types.
|
|
3505
|
+
* @property {FunctionReturnTypeIdentity} returnType - Exact operation result.
|
|
3506
|
+
* @property {readonly ["host"]} effects - Closed initial effect set.
|
|
3507
|
+
* @property {string[]} failureIds - Exact ordered declared failures.
|
|
3508
|
+
* @property {EffectResourceFlow} resourceFlow - Exact ownership transition.
|
|
3509
|
+
*/
|
|
3510
|
+
/**
|
|
3511
|
+
* @typedef OwnedMoveExpression
|
|
3512
|
+
* @property {"OwnedMoveExpression"} kind - Explicit linear ownership transfer.
|
|
3513
|
+
* @property {IdentifierExpression} expression - Moved owner.
|
|
3514
|
+
* @property {OwnedResourceType | OwnedReferenceType} type - Exact owned type.
|
|
3515
|
+
* @property {SourceLocation} location - Exact transfer location.
|
|
3516
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Derived source provenance.
|
|
3517
|
+
*/
|
|
3518
|
+
/**
|
|
3519
|
+
* @typedef OwnedBorrowExpression
|
|
3520
|
+
* @property {"OwnedBorrowExpression"} kind - Immediate nonescaping resource borrow.
|
|
3521
|
+
* @property {"shared" | "exclusive"} mode - Borrow mode.
|
|
3522
|
+
* @property {IdentifierExpression | ReceiverExpression | PrivateFieldRead} expression - Borrowed place.
|
|
3523
|
+
* @property {OwnedResourceType | OwnedReferenceType} type - Exact owned type.
|
|
3524
|
+
* @property {SourceLocation} location - Exact borrow location.
|
|
3525
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Derived source provenance.
|
|
3526
|
+
*/
|
|
3527
|
+
/**
|
|
3528
|
+
* @typedef EffectCallExpression
|
|
3529
|
+
* @property {"EffectCallExpression"} kind - Compiler-authorized effect invocation.
|
|
3530
|
+
* @property {string} operation - Exact operation declaration identity.
|
|
3531
|
+
* @property {Expression[]} arguments - Source-ordered arguments.
|
|
3532
|
+
* @property {string} effectSiteId - Deterministic semantic evaluation identity.
|
|
3533
|
+
* @property {ResolvedEffectOperationSignature} resolution - Complete authority resolution.
|
|
3534
|
+
* @property {SourceLocation} location - Complete call location.
|
|
3535
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned operation-name range.
|
|
3536
|
+
*/
|
|
3537
|
+
/**
|
|
3538
|
+
* @typedef EffectParameter
|
|
3539
|
+
* @property {string} name - Stable parameter name.
|
|
3540
|
+
* @property {SemanticValueType} type - Exact ordered parameter type.
|
|
3541
|
+
*/
|
|
3542
|
+
/** @typedef {{kind: "none"} | {kind: "acquire", resourceId: string} | {kind: "borrow" | "close", parameterIndex: number, terminalFailureId: string}} EffectResourceFlow */
|
|
3543
|
+
/**
|
|
3544
|
+
* @typedef EffectResourceDeclaration
|
|
3545
|
+
* @property {"EffectResourceDeclaration"} kind - Capability resource declaration.
|
|
3546
|
+
* @property {string} id - Deterministic authority-local identity.
|
|
3547
|
+
* @property {string} name - Source-visible nominal resource name.
|
|
3548
|
+
*/
|
|
3549
|
+
/**
|
|
3550
|
+
* @typedef EffectFailureDeclaration
|
|
3551
|
+
* @property {"EffectFailureDeclaration"} kind - Capability failure declaration.
|
|
3552
|
+
* @property {string} id - Deterministic authority-local identity.
|
|
3553
|
+
* @property {string} name - Source-visible nominal failure name.
|
|
3554
|
+
*/
|
|
3555
|
+
/**
|
|
3556
|
+
* @typedef EffectOperationDeclaration
|
|
3557
|
+
* @property {"EffectOperationDeclaration"} kind - Compiler-authorized operation declaration.
|
|
3558
|
+
* @property {string} id - Deterministic authority-local identity.
|
|
3559
|
+
* @property {string} name - Source-visible operation name.
|
|
3560
|
+
* @property {EffectParameter[]} parameters - Exact positional parameters.
|
|
3561
|
+
* @property {SemanticFunctionReturnType} returnType - Exact result type.
|
|
3562
|
+
* @property {readonly ["host"]} effects - Closed initial effect set.
|
|
3563
|
+
* @property {string[]} failureIds - Ordered nominal failure identities.
|
|
3564
|
+
* @property {EffectResourceFlow} resourceFlow - Exact ownership transition.
|
|
3565
|
+
*/
|
|
3566
|
+
/**
|
|
3567
|
+
* @typedef EffectCapabilityDeclaration
|
|
3568
|
+
* @property {"EffectCapabilityDeclaration"} kind - Authorized capability declaration.
|
|
3569
|
+
* @property {string} id - Deterministic module-local identity.
|
|
3570
|
+
* @property {string} authorityId - Opaque authority identity.
|
|
3571
|
+
* @property {string} name - Capability name.
|
|
3572
|
+
* @property {EffectResourceDeclaration[]} resources - Ordered resources.
|
|
3573
|
+
* @property {EffectFailureDeclaration[]} failures - Ordered failures.
|
|
3574
|
+
* @property {EffectOperationDeclaration[]} operations - Ordered operations.
|
|
3575
|
+
*/
|
|
3576
|
+
/**
|
|
3577
|
+
* @typedef CapabilityAuthority
|
|
3578
|
+
* @property {"SemantifoldCapabilityAuthority"} schema - Authority schema discriminator.
|
|
3579
|
+
* @property {1 | 2} schemaVersion - Authority payload version, not a standard-library contract version.
|
|
3580
|
+
* @property {string} id - Opaque caller-supplied authority identity.
|
|
3581
|
+
* @property {EffectCapabilityDeclaration[]} capabilities - Normalized declarations.
|
|
3582
|
+
* @property {string} [contractVersion] - Declared standard-library contract version, present only when the caller supplied one.
|
|
3583
|
+
* @property {{identity: string, contractVersion: string, capabilities: EffectCapabilityDeclaration[]}[]} [modules] - Schema-v2 canonical module authorities.
|
|
3584
|
+
*/
|
|
3585
|
+
/** @typedef {{module: string, name: string}} CapabilityDeclarationReferenceInput */
|
|
3586
|
+
/** @typedef {{name: string, type: SemanticTypeName | {kind: "OwnedResourceType", resource: string | CapabilityDeclarationReferenceInput} | {kind: "OptionalType", valueType: SemanticTypeName}}} CapabilityParameterInput */
|
|
3587
|
+
/** @typedef {{name: string}} CapabilityNamedInput */
|
|
3588
|
+
/** @typedef {{kind: "none"} | {kind: "acquire", resource: string | CapabilityDeclarationReferenceInput} | {kind: "borrow" | "close", parameterIndex: number, terminalFailure: string | CapabilityDeclarationReferenceInput}} CapabilityResourceFlowInput */
|
|
3589
|
+
/** @typedef {{name: string, parameters: CapabilityParameterInput[], returnType: FunctionReturnTypeName | {kind: "OwnedResourceType", resource: string | CapabilityDeclarationReferenceInput} | {kind: "OptionalType", valueType: SemanticTypeName}, effects: ["host"], failures: (string | CapabilityDeclarationReferenceInput)[], resourceFlow: CapabilityResourceFlowInput}} CapabilityOperationInput */
|
|
3590
|
+
/** @typedef {{name: string, resources: CapabilityNamedInput[], failures: CapabilityNamedInput[], operations: CapabilityOperationInput[]}} CapabilityDeclarationInput */
|
|
3591
|
+
/** @typedef {{identity: string, contractVersion: string, capabilities: CapabilityDeclarationInput[]}} CapabilityAuthorityModuleInput */
|
|
3592
|
+
/** @typedef {{schema: "SemantifoldCapabilityAuthority", schemaVersion: 1, id: string, capabilities: CapabilityDeclarationInput[], contractVersion?: string} | {schema: "SemantifoldCapabilityAuthority", schemaVersion: 2, id: string, modules: CapabilityAuthorityModuleInput[]}} CapabilityAuthorityInput */
|
|
3593
|
+
/**
|
|
3594
|
+
* @typedef ListLiteral
|
|
3595
|
+
* @property {"ListLiteral"} kind - Ordered immutable list literal.
|
|
3596
|
+
* @property {Expression[]} elements - Source-ordered, duplicate-preserving elements.
|
|
3597
|
+
* @property {SourceLocation} location - Source location.
|
|
3598
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3599
|
+
*/
|
|
3600
|
+
/**
|
|
3601
|
+
* @typedef MapEntry
|
|
3602
|
+
* @property {"MapEntry"} kind - Source-ordered map initializer entry.
|
|
3603
|
+
* @property {StringLiteral} key - Literal nonnumeric string key.
|
|
3604
|
+
* @property {Expression} value - Entry value.
|
|
3605
|
+
* @property {SourceLocation} location - Source location.
|
|
3606
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3607
|
+
*/
|
|
3608
|
+
/**
|
|
3609
|
+
* @typedef MapLiteral
|
|
3610
|
+
* @property {"MapLiteral"} kind - Immutable map literal; entry order is diagnostic-only.
|
|
3611
|
+
* @property {MapEntry[]} entries - Source initializer order.
|
|
3612
|
+
* @property {SourceLocation} location - Source location.
|
|
3613
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3614
|
+
*/
|
|
3615
|
+
/**
|
|
3616
|
+
* @typedef OrderedMapLiteral
|
|
3617
|
+
* @property {"OrderedMapLiteral"} kind - Immutable map literal with observable first-insertion order.
|
|
3618
|
+
* @property {MapEntry[]} entries - Source-ordered unique entries.
|
|
3619
|
+
* @property {SourceLocation} location - Complete ordered construction boundary.
|
|
3620
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3621
|
+
*/
|
|
3622
|
+
/**
|
|
3623
|
+
* @typedef ListIndexExpression
|
|
3624
|
+
* @property {"ListIndexExpression"} kind - Total zero-based list index.
|
|
3625
|
+
* @property {Expression} collection - List-valued receiver.
|
|
3626
|
+
* @property {Expression} index - Integer index.
|
|
3627
|
+
* @property {"proven" | "fail-on-absence"} totality - Admission basis; never optional.
|
|
3628
|
+
* @property {SourceLocation} location - Source location.
|
|
3629
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3630
|
+
*/
|
|
3631
|
+
/**
|
|
3632
|
+
* @typedef MapLookupExpression
|
|
3633
|
+
* @property {"MapLookupExpression"} kind - Total string-key map lookup.
|
|
3634
|
+
* @property {Expression} collection - Map-valued receiver.
|
|
3635
|
+
* @property {Expression} key - String key expression.
|
|
3636
|
+
* @property {"proven" | "fail-on-absence"} totality - Admission basis; never optional.
|
|
3637
|
+
* @property {SourceLocation} location - Source location.
|
|
3638
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3639
|
+
*/
|
|
3640
|
+
/**
|
|
3641
|
+
* @typedef CollectionSizeExpression
|
|
3642
|
+
* @property {"CollectionSizeExpression"} kind - Finite collection size.
|
|
3643
|
+
* @property {Expression} collection - List- or map-valued receiver.
|
|
3644
|
+
* @property {"list" | "map"} [collectionKind] - Validated receiver kind for target spelling.
|
|
1262
3645
|
* @property {SourceLocation} location - Source location.
|
|
1263
3646
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
1264
3647
|
*/
|
|
@@ -1290,6 +3673,33 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1290
3673
|
* @property {SourceLocation} location - Source location.
|
|
1291
3674
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
1292
3675
|
*/
|
|
3676
|
+
/**
|
|
3677
|
+
* @typedef OptionalNone
|
|
3678
|
+
* @property {"OptionalNone"} kind - Contextually typed absence value.
|
|
3679
|
+
* @property {SourceLocation} location - Source location.
|
|
3680
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3681
|
+
*/
|
|
3682
|
+
/**
|
|
3683
|
+
* @typedef OptionalSome
|
|
3684
|
+
* @property {"OptionalSome"} kind - Explicit present optional value.
|
|
3685
|
+
* @property {Expression} value - Exact non-optional present value.
|
|
3686
|
+
* @property {SourceLocation} location - Source location.
|
|
3687
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3688
|
+
*/
|
|
3689
|
+
/**
|
|
3690
|
+
* @typedef OptionalIsPresent
|
|
3691
|
+
* @property {"OptionalIsPresent"} kind - Presence test for one simple identifier.
|
|
3692
|
+
* @property {IdentifierExpression} operand - Tested optional binding.
|
|
3693
|
+
* @property {SourceLocation} location - Source location.
|
|
3694
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3695
|
+
*/
|
|
3696
|
+
/**
|
|
3697
|
+
* @typedef OptionalUnwrap
|
|
3698
|
+
* @property {"OptionalUnwrap"} kind - Guarded unwrap of one simple identifier.
|
|
3699
|
+
* @property {IdentifierExpression} operand - Proven-present optional binding.
|
|
3700
|
+
* @property {SourceLocation} location - Source location.
|
|
3701
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3702
|
+
*/
|
|
1293
3703
|
/**
|
|
1294
3704
|
* @typedef UnaryExpression
|
|
1295
3705
|
* @property {"UnaryExpression"} kind - Node discriminator.
|
|
@@ -1314,15 +3724,96 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1314
3724
|
* @property {"CallExpression"} kind - Node discriminator.
|
|
1315
3725
|
* @property {string} callee - Function name.
|
|
1316
3726
|
* @property {Expression[]} arguments - Positional arguments.
|
|
3727
|
+
* @property {ResolvedFunctionSignature} [resolution] - Deterministic declaration and signature binding, required after frontend validation.
|
|
3728
|
+
* @property {string} [effectSiteId] - Deterministic site identity when the resolved function reaches a host effect.
|
|
3729
|
+
* @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
|
|
3730
|
+
* @property {string[]} [failureIds] - Ordered capability failures reachable through this call.
|
|
1317
3731
|
* @property {SourceLocation} location - Source location.
|
|
1318
3732
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
1319
3733
|
*/
|
|
1320
|
-
/**
|
|
3734
|
+
/**
|
|
3735
|
+
* @typedef ResolvedConstructorSignature
|
|
3736
|
+
* @property {"ResolvedConstructorSignature"} kind - Resolution discriminator.
|
|
3737
|
+
* @property {string} declarationId - Exact constructor declaration identity.
|
|
3738
|
+
* @property {SemanticTypeIdentity[]} parameterTypes - Exact constructor parameter types.
|
|
3739
|
+
*/
|
|
3740
|
+
/**
|
|
3741
|
+
* @typedef ResolvedMethodSignature
|
|
3742
|
+
* @property {"ResolvedMethodSignature"} kind - Resolution discriminator.
|
|
3743
|
+
* @property {string} declarationId - Exact resolved method identity.
|
|
3744
|
+
* @property {SemanticTypeIdentity[]} parameterTypes - Exact method parameter types.
|
|
3745
|
+
* @property {FunctionReturnTypeIdentity} returnType - Exact method return type.
|
|
3746
|
+
* @property {{kind: "preserve" | "terminal", terminalFailureId?: string}} [resourceFlow] - Owned receiver transition and declared terminal-use failure when applicable.
|
|
3747
|
+
*/
|
|
3748
|
+
/**
|
|
3749
|
+
* @typedef ReceiverExpression
|
|
3750
|
+
* @property {"ReceiverExpression"} kind - The declaring class instance receiver.
|
|
3751
|
+
* @property {string} classId - Stable declaring class identity.
|
|
3752
|
+
* @property {SourceLocation} location - Source receiver location.
|
|
3753
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned receiver range.
|
|
3754
|
+
*/
|
|
3755
|
+
/**
|
|
3756
|
+
* @typedef ReferenceConstruction
|
|
3757
|
+
* @property {"ReferenceConstruction"} kind - Fresh nominal reference construction.
|
|
3758
|
+
* @property {ReferenceType | OwnedReferenceType} reference - Exact class type.
|
|
3759
|
+
* @property {Expression[]} arguments - Source-ordered constructor arguments.
|
|
3760
|
+
* @property {ResolvedConstructorSignature} [resolution] - Exact constructor binding, required after validation.
|
|
3761
|
+
* @property {string} [effectSiteId] - Deterministic site identity when construction reaches a host effect.
|
|
3762
|
+
* @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
|
|
3763
|
+
* @property {string[]} [failureIds] - Ordered capability failures reachable through construction.
|
|
3764
|
+
* @property {SourceLocation} location - Complete construction location.
|
|
3765
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned class-name range.
|
|
3766
|
+
*/
|
|
3767
|
+
/**
|
|
3768
|
+
* @typedef MethodCallExpression
|
|
3769
|
+
* @property {"MethodCallExpression"} kind - Resolved receiver-method invocation.
|
|
3770
|
+
* @property {Expression} receiver - Receiver evaluated once before arguments.
|
|
3771
|
+
* @property {string} method - Stable method identity after validation.
|
|
3772
|
+
* @property {Expression[]} arguments - Source-ordered arguments.
|
|
3773
|
+
* @property {ResolvedMethodSignature} [resolution] - Exact method binding, required after validation.
|
|
3774
|
+
* @property {string} [effectSiteId] - Deterministic site identity when the method reaches a host effect.
|
|
3775
|
+
* @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
|
|
3776
|
+
* @property {string[]} [failureIds] - Ordered capability failures reachable through the method.
|
|
3777
|
+
* @property {SourceLocation} location - Complete call location.
|
|
3778
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned method-name range.
|
|
3779
|
+
*/
|
|
3780
|
+
/**
|
|
3781
|
+
* @typedef PrivateFieldRead
|
|
3782
|
+
* @property {"PrivateFieldRead"} kind - Declaring-receiver-only private field read.
|
|
3783
|
+
* @property {ReceiverExpression} receiver - Exact declaring receiver.
|
|
3784
|
+
* @property {string} field - Stable private field identity.
|
|
3785
|
+
* @property {SourceLocation} location - Complete read location.
|
|
3786
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned field-name range.
|
|
3787
|
+
*/
|
|
3788
|
+
/**
|
|
3789
|
+
* @typedef RecordConstruction
|
|
3790
|
+
* @property {"RecordConstruction"} kind - Nominal record construction.
|
|
3791
|
+
* @property {RecordType} record - Resolved record declaration identity.
|
|
3792
|
+
* @property {Expression[]} arguments - Complete field-ordered constructor arguments.
|
|
3793
|
+
* @property {SourceLocation} location - Complete construction source location.
|
|
3794
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned record-name range.
|
|
3795
|
+
*/
|
|
3796
|
+
/**
|
|
3797
|
+
* @typedef MemberRead
|
|
3798
|
+
* @property {"MemberRead"} kind - Nominal immutable record-field read.
|
|
3799
|
+
* @property {Expression} receiver - Record-valued receiver.
|
|
3800
|
+
* @property {string} field - Stable resolved field identity after frontend validation.
|
|
3801
|
+
* @property {SourceLocation} location - Complete member-read source location.
|
|
3802
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned member-name range.
|
|
3803
|
+
*/
|
|
3804
|
+
/**
|
|
3805
|
+
* @typedef ErrorMessageRead
|
|
3806
|
+
* @property {"ErrorMessageRead"} kind - The sole portable error member operation.
|
|
3807
|
+
* @property {IdentifierExpression} receiver - Catch binding whose immutable message is read.
|
|
3808
|
+
* @property {SourceLocation} location - Complete message-read source location.
|
|
3809
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned message-member range.
|
|
3810
|
+
*/
|
|
3811
|
+
/** @typedef {IdentifierExpression | ReceiverExpression | IntegerLiteral | BooleanLiteral | StringLiteral | OptionalNone | OptionalSome | OptionalIsPresent | OptionalUnwrap | ListLiteral | MapLiteral | OrderedMapLiteral | ListIndexExpression | MapLookupExpression | CollectionSizeExpression | UnaryExpression | BinaryExpression | CallExpression | EffectCallExpression | OwnedMoveExpression | OwnedBorrowExpression | MethodCallExpression | ReferenceConstruction | RecordConstruction | MemberRead | PrivateFieldRead | ErrorMessageRead} Expression */
|
|
1321
3812
|
/**
|
|
1322
3813
|
* @typedef LocalDeclaration
|
|
1323
3814
|
* @property {"LocalDeclaration"} kind - Node discriminator.
|
|
1324
3815
|
* @property {string} name - Declared local name.
|
|
1325
|
-
* @property {
|
|
3816
|
+
* @property {SemanticValueType} type - Explicit local type.
|
|
1326
3817
|
* @property {boolean} mutable - Whether later assignment is allowed.
|
|
1327
3818
|
* @property {Expression} initializer - Required initializer expression.
|
|
1328
3819
|
* @property {SourceLocation} location - Declaration source location.
|
|
@@ -1336,10 +3827,26 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1336
3827
|
* @property {SourceLocation} location - Assignment source location.
|
|
1337
3828
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
1338
3829
|
*/
|
|
3830
|
+
/**
|
|
3831
|
+
* @typedef PrivateFieldWriteStatement
|
|
3832
|
+
* @property {"PrivateFieldWriteStatement"} kind - Declaring-receiver-only private field mutation.
|
|
3833
|
+
* @property {ReceiverExpression} receiver - Exact declaring receiver.
|
|
3834
|
+
* @property {string} field - Stable private field identity.
|
|
3835
|
+
* @property {Expression} expression - New field value.
|
|
3836
|
+
* @property {SourceLocation} location - Assignment source location.
|
|
3837
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned field-name range.
|
|
3838
|
+
*/
|
|
1339
3839
|
/**
|
|
1340
3840
|
* @typedef ReturnStatement
|
|
1341
3841
|
* @property {"ReturnStatement"} kind - Node discriminator.
|
|
1342
|
-
* @property {Expression} expression - Returned expression.
|
|
3842
|
+
* @property {Expression} [expression] - Returned expression; absent exactly for a bare void return.
|
|
3843
|
+
* @property {SourceLocation} location - Source location.
|
|
3844
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3845
|
+
*/
|
|
3846
|
+
/**
|
|
3847
|
+
* @typedef ExpressionStatement
|
|
3848
|
+
* @property {"ExpressionStatement"} kind - Node discriminator.
|
|
3849
|
+
* @property {CallExpression | MethodCallExpression | EffectCallExpression} expression - A direct, receiver, or authorized call whose resolved return type is void.
|
|
1343
3850
|
* @property {SourceLocation} location - Source location.
|
|
1344
3851
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
1345
3852
|
*/
|
|
@@ -1352,8 +3859,95 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1352
3859
|
* @property {SourceLocation} location - Source location.
|
|
1353
3860
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
1354
3861
|
*/
|
|
3862
|
+
/**
|
|
3863
|
+
* @typedef ValueBinding
|
|
3864
|
+
* @property {"ValueBinding"} kind - Iteration-binding discriminator.
|
|
3865
|
+
* @property {string} name - Body-local binding name.
|
|
3866
|
+
* @property {SemanticValueType} type - Exact list element type.
|
|
3867
|
+
* @property {false} mutable - Iteration bindings are always immutable.
|
|
3868
|
+
* @property {SourceLocation} location - Binding source location.
|
|
3869
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3870
|
+
*/
|
|
3871
|
+
/**
|
|
3872
|
+
* @typedef ForEachStatement
|
|
3873
|
+
* @property {"ForEachStatement"} kind - Ordered list-iteration discriminator.
|
|
3874
|
+
* @property {string} [id] - Deterministic module-local loop identity, required after frontend validation.
|
|
3875
|
+
* @property {Expression} list - List expression evaluated exactly once before traversal.
|
|
3876
|
+
* @property {ValueBinding} valueBinding - Immutable binding scoped to the body.
|
|
3877
|
+
* @property {Block} body - Loop body.
|
|
3878
|
+
* @property {SourceLocation} location - Complete loop source location.
|
|
3879
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3880
|
+
*/
|
|
3881
|
+
/**
|
|
3882
|
+
* @typedef ForEachMapStatement
|
|
3883
|
+
* @property {"ForEachMapStatement"} kind - Insertion-ordered map pair-iteration discriminator.
|
|
3884
|
+
* @property {string} [id] - Deterministic module-local loop identity, required after frontend validation.
|
|
3885
|
+
* @property {Expression} map - Ordered-map expression evaluated exactly once before traversal.
|
|
3886
|
+
* @property {ValueBinding} keyBinding - Immutable string-key binding scoped to the body.
|
|
3887
|
+
* @property {ValueBinding} valueBinding - Immutable homogeneous value binding scoped to the body.
|
|
3888
|
+
* @property {Block} body - Loop body.
|
|
3889
|
+
* @property {SourceLocation} location - Complete loop source location.
|
|
3890
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3891
|
+
*/
|
|
3892
|
+
/**
|
|
3893
|
+
* @typedef WhileStatement
|
|
3894
|
+
* @property {"WhileStatement"} kind - Strict-Boolean pre-condition loop discriminator.
|
|
3895
|
+
* @property {string} [id] - Deterministic module-local loop identity, required after frontend validation.
|
|
3896
|
+
* @property {Expression} condition - Boolean expression evaluated before every iteration.
|
|
3897
|
+
* @property {Block} body - Ordered loop body.
|
|
3898
|
+
* @property {SourceLocation} location - Complete loop source location.
|
|
3899
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3900
|
+
*/
|
|
3901
|
+
/**
|
|
3902
|
+
* @typedef BreakStatement
|
|
3903
|
+
* @property {"BreakStatement"} kind - Nearest-loop break discriminator.
|
|
3904
|
+
* @property {string} [targetLoopId] - Resolved nearest-loop identity, required after frontend validation in loop context.
|
|
3905
|
+
* @property {SourceLocation} location - Keyword source location.
|
|
3906
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3907
|
+
*/
|
|
3908
|
+
/**
|
|
3909
|
+
* @typedef ContinueStatement
|
|
3910
|
+
* @property {"ContinueStatement"} kind - Nearest-loop continue discriminator.
|
|
3911
|
+
* @property {string} [targetLoopId] - Resolved nearest-loop identity, required after frontend validation in loop context.
|
|
3912
|
+
* @property {SourceLocation} location - Keyword source location.
|
|
3913
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
3914
|
+
*/
|
|
3915
|
+
/**
|
|
3916
|
+
* @typedef ErrorConstruction
|
|
3917
|
+
* @property {"ErrorConstruction"} kind - Construction of one declared unchecked error.
|
|
3918
|
+
* @property {ErrorType} error - Exact nominal error type.
|
|
3919
|
+
* @property {Expression} message - Sole immutable string payload.
|
|
3920
|
+
* @property {SourceLocation} location - Complete construction source location.
|
|
3921
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type and message ranges.
|
|
3922
|
+
*/
|
|
3923
|
+
/**
|
|
3924
|
+
* @typedef RaiseStatement
|
|
3925
|
+
* @property {"RaiseStatement"} kind - Abrupt unchecked-error propagation.
|
|
3926
|
+
* @property {ErrorConstruction} error - Exact constructed semantic error.
|
|
3927
|
+
* @property {SourceLocation} location - Complete raise source location.
|
|
3928
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned raise range.
|
|
3929
|
+
*/
|
|
3930
|
+
/**
|
|
3931
|
+
* @typedef CatchBinding
|
|
3932
|
+
* @property {"CatchBinding"} kind - Exact-handler binding discriminator.
|
|
3933
|
+
* @property {string} name - Handler-local binding name.
|
|
3934
|
+
* @property {ErrorType} type - Exact caught nominal error type.
|
|
3935
|
+
* @property {false} mutable - Catch bindings are immutable.
|
|
3936
|
+
* @property {SourceLocation} location - Binding source location.
|
|
3937
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned binding range.
|
|
3938
|
+
*/
|
|
3939
|
+
/**
|
|
3940
|
+
* @typedef TryStatement
|
|
3941
|
+
* @property {"TryStatement"} kind - One body and one exact typed handler.
|
|
3942
|
+
* @property {Block} body - Protected body.
|
|
3943
|
+
* @property {ErrorType} catchType - Exact caught nominal error type.
|
|
3944
|
+
* @property {CatchBinding} catchBinding - Immutable handler-local binding.
|
|
3945
|
+
* @property {Block} catchBody - Handler body.
|
|
3946
|
+
* @property {SourceLocation} location - Complete try/handler source location.
|
|
3947
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned try/catch ranges.
|
|
3948
|
+
*/
|
|
1355
3949
|
/** @typedef {LocalDeclaration | AssignmentStatement} LocalStatement */
|
|
1356
|
-
/** @typedef {LocalStatement | IfStatement | ReturnStatement | PrintStatement} Statement */
|
|
3950
|
+
/** @typedef {LocalStatement | PrivateFieldWriteStatement | ExpressionStatement | IfStatement | ForEachStatement | ForEachMapStatement | WhileStatement | BreakStatement | ContinueStatement | ReturnStatement | PrintStatement | RaiseStatement | TryStatement} Statement */
|
|
1357
3951
|
/**
|
|
1358
3952
|
* @typedef Block
|
|
1359
3953
|
* @property {"Block"} kind - Node discriminator.
|
|
@@ -1364,13 +3958,87 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1364
3958
|
/**
|
|
1365
3959
|
* @typedef FunctionDeclaration
|
|
1366
3960
|
* @property {"FunctionDeclaration"} kind - Node discriminator.
|
|
3961
|
+
* @property {string} [id] - Deterministic module-local declaration identity, required after frontend validation.
|
|
1367
3962
|
* @property {string} name - Function name.
|
|
3963
|
+
* @property {TypeParameter[]} [typeParameters] - Ordered declaration-scoped invariant unbounded parameters.
|
|
1368
3964
|
* @property {Parameter[]} parameters - Function parameters.
|
|
1369
|
-
* @property {
|
|
3965
|
+
* @property {SemanticFunctionReturnType} returnType - Return type.
|
|
1370
3966
|
* @property {Block} body - Function body.
|
|
1371
3967
|
* @property {SourceLocation} location - Source location.
|
|
1372
3968
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
1373
3969
|
*/
|
|
3970
|
+
/**
|
|
3971
|
+
* @typedef RecordField
|
|
3972
|
+
* @property {"RecordField"} kind - Closed record-field discriminator.
|
|
3973
|
+
* @property {string} [id] - Stable module-local field identity, required after frontend validation.
|
|
3974
|
+
* @property {string} name - Field name.
|
|
3975
|
+
* @property {SemanticValueType} type - Exact field type.
|
|
3976
|
+
* @property {SourceLocation} location - Field declaration source location.
|
|
3977
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned name/type ranges.
|
|
3978
|
+
*/
|
|
3979
|
+
/**
|
|
3980
|
+
* @typedef RecordDeclaration
|
|
3981
|
+
* @property {"RecordDeclaration"} kind - Nominal closed immutable record declaration.
|
|
3982
|
+
* @property {string} [id] - Stable module-local declaration identity, required after frontend validation.
|
|
3983
|
+
* @property {string} name - Record name.
|
|
3984
|
+
* @property {TypeParameter[]} [typeParameters] - Ordered declaration-scoped invariant unbounded parameters.
|
|
3985
|
+
* @property {RecordField[]} fields - Ordered unique visible fields.
|
|
3986
|
+
* @property {SourceLocation} location - Complete declaration source location.
|
|
3987
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned declaration-name range.
|
|
3988
|
+
*/
|
|
3989
|
+
/**
|
|
3990
|
+
* @typedef PrivateField
|
|
3991
|
+
* @property {"PrivateField"} kind - Declaring-class-private mutable instance field.
|
|
3992
|
+
* @property {string} [id] - Stable class-scoped field identity, required after validation.
|
|
3993
|
+
* @property {string} name - Source-visible field name inside the declaring class only.
|
|
3994
|
+
* @property {SemanticValueType} type - Exact field type.
|
|
3995
|
+
* @property {SourceLocation} location - Field declaration location.
|
|
3996
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned name/type ranges.
|
|
3997
|
+
*/
|
|
3998
|
+
/**
|
|
3999
|
+
* @typedef ConstructorDeclaration
|
|
4000
|
+
* @property {"ConstructorDeclaration"} kind - Exact complete private-state initializer.
|
|
4001
|
+
* @property {string} [id] - Stable class-scoped constructor identity, required after validation.
|
|
4002
|
+
* @property {Parameter[]} parameters - Exact positional constructor signature.
|
|
4003
|
+
* @property {Block} body - Field-order initialization body.
|
|
4004
|
+
* @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
|
|
4005
|
+
* @property {string[]} [failureIds] - Ordered capability failures reachable through construction.
|
|
4006
|
+
* @property {SourceLocation} location - Complete constructor location.
|
|
4007
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned constructor range.
|
|
4008
|
+
*/
|
|
4009
|
+
/**
|
|
4010
|
+
* @typedef MethodDeclaration
|
|
4011
|
+
* @property {"MethodDeclaration"} kind - Receiver-bound class method.
|
|
4012
|
+
* @property {string} [id] - Stable class-scoped method identity, required after validation.
|
|
4013
|
+
* @property {string} name - Source-visible method name.
|
|
4014
|
+
* @property {Parameter[]} parameters - Exact positional method signature.
|
|
4015
|
+
* @property {SemanticFunctionReturnType} returnType - Exact return type.
|
|
4016
|
+
* @property {Block} body - Method body.
|
|
4017
|
+
* @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
|
|
4018
|
+
* @property {string[]} [failureIds] - Ordered capability failures reachable through the method.
|
|
4019
|
+
* @property {SourceLocation} location - Complete method location.
|
|
4020
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned method-name range.
|
|
4021
|
+
*/
|
|
4022
|
+
/**
|
|
4023
|
+
* @typedef ClassDeclaration
|
|
4024
|
+
* @property {"ClassDeclaration"} kind - Nominal reference class with private mutable state.
|
|
4025
|
+
* @property {string} [id] - Stable module-local class identity, required after validation.
|
|
4026
|
+
* @property {string} name - Source-visible class name.
|
|
4027
|
+
* @property {PrivateField[]} fields - Ordered private instance state.
|
|
4028
|
+
* @property {ConstructorDeclaration} constructor - Sole exact constructor.
|
|
4029
|
+
* @property {MethodDeclaration[]} methods - Ordered receiver methods.
|
|
4030
|
+
* @property {{kind: "ordinary"} | {kind: "ownedResource", fieldId: string, resourceId: string}} [ownership] - Explicit class ownership profile.
|
|
4031
|
+
* @property {SourceLocation} location - Complete class location.
|
|
4032
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned class-name range.
|
|
4033
|
+
*/
|
|
4034
|
+
/**
|
|
4035
|
+
* @typedef ErrorDeclaration
|
|
4036
|
+
* @property {"ErrorDeclaration"} kind - Nominal unchecked error with one immutable string message.
|
|
4037
|
+
* @property {string} [id] - Stable module-local declaration identity, required after frontend validation.
|
|
4038
|
+
* @property {string} name - Error type name.
|
|
4039
|
+
* @property {SourceLocation} location - Complete declaration source location.
|
|
4040
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned declaration-name range.
|
|
4041
|
+
*/
|
|
1374
4042
|
/**
|
|
1375
4043
|
* @typedef PrintStatement
|
|
1376
4044
|
* @property {"PrintStatement"} kind - Node discriminator.
|
|
@@ -1388,13 +4056,95 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
1388
4056
|
/**
|
|
1389
4057
|
* @typedef SemanticModule
|
|
1390
4058
|
* @property {"Module"} kind - Node discriminator.
|
|
4059
|
+
* @property {RecordDeclaration[]} [records] - Top-level nominal record declarations in source order; omitted when empty.
|
|
4060
|
+
* @property {ClassDeclaration[]} [classes] - Top-level nominal reference classes in source order; omitted when empty.
|
|
4061
|
+
* @property {ErrorDeclaration[]} [errors] - Top-level nominal unchecked error declarations in source order; omitted when empty.
|
|
4062
|
+
* @property {EffectCapabilityDeclaration[]} [capabilities] - Compiler-authorized Task 034 declarations; omission is the legacy empty set.
|
|
1391
4063
|
* @property {FunctionDeclaration[]} functions - Top-level functions.
|
|
1392
4064
|
* @property {EntryPoint} entryPoint - Executable entry point.
|
|
1393
4065
|
* @property {SourceLocation} location - Source location.
|
|
1394
4066
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
1395
4067
|
* @property {SemanticProvenance} [provenance] - Parser-authored source and identity index; optional for legacy caller-authored modules.
|
|
1396
4068
|
*/
|
|
1397
|
-
/**
|
|
4069
|
+
/**
|
|
4070
|
+
* @typedef SemanticImport
|
|
4071
|
+
* @property {"Import"} kind - Node discriminator.
|
|
4072
|
+
* @property {string} moduleId - Stable imported semantic module identity.
|
|
4073
|
+
* @property {string} importedName - Exported declaration name in the source module.
|
|
4074
|
+
* @property {string} localName - Binding name visible in the importing module.
|
|
4075
|
+
* @property {SemanticDeclarationKind} symbolKind - Imported declaration namespace.
|
|
4076
|
+
* @property {string} declarationId - Stable resolved declaration identity.
|
|
4077
|
+
* @property {boolean} typeOnly - Whether source syntax admitted only type-position use.
|
|
4078
|
+
* @property {SourceLocation} location - Complete import declaration/specifier location.
|
|
4079
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned import ranges.
|
|
4080
|
+
* @property {StdlibFacadeResolutionEvidence} [stdlibFacade] - Exact parser-proved native facade identity evidence.
|
|
4081
|
+
*/
|
|
4082
|
+
/**
|
|
4083
|
+
* @typedef StdlibFacadeResolutionEvidence
|
|
4084
|
+
* @property {"SemantifoldStdlibFacadeResolution"} schema - Evidence schema.
|
|
4085
|
+
* @property {1} version - Evidence version.
|
|
4086
|
+
* @property {string} facadeIdentity - Selected facade identity.
|
|
4087
|
+
* @property {string} facadeVersion - Selected exact facade version.
|
|
4088
|
+
* @property {string} nativeModule - Parser-proved source stdlib module identity.
|
|
4089
|
+
* @property {string} nativeSymbol - Parser-proved source stdlib symbol identity.
|
|
4090
|
+
*/
|
|
4091
|
+
/**
|
|
4092
|
+
* @typedef SemanticExport
|
|
4093
|
+
* @property {"Export"} kind - Node discriminator.
|
|
4094
|
+
* @property {string} exportedName - Name visible to importing modules.
|
|
4095
|
+
* @property {SemanticDeclarationKind} symbolKind - Exported declaration namespace.
|
|
4096
|
+
* @property {string} declarationId - Stable exported declaration identity.
|
|
4097
|
+
* @property {SourceLocation} location - Complete export declaration/specifier location.
|
|
4098
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned export ranges.
|
|
4099
|
+
*/
|
|
4100
|
+
/**
|
|
4101
|
+
* @typedef SemanticProgramModule
|
|
4102
|
+
* @property {"Module"} kind - Node discriminator.
|
|
4103
|
+
* @property {string} id - Stable caller-supplied logical module identity.
|
|
4104
|
+
* @property {string} sourceFilename - Explicit source filename; never an implicit read request.
|
|
4105
|
+
* @property {RecordDeclaration[]} [records] - Top-level nominal record declarations.
|
|
4106
|
+
* @property {ClassDeclaration[]} [classes] - Compiler-owned facade reference classes.
|
|
4107
|
+
* @property {ErrorDeclaration[]} [errors] - Top-level nominal unchecked error declarations.
|
|
4108
|
+
* @property {FunctionDeclaration[]} functions - Top-level functions.
|
|
4109
|
+
* @property {SemanticImport[]} imports - Resolved imports in source order.
|
|
4110
|
+
* @property {SemanticExport[]} exports - Resolved exports in source order.
|
|
4111
|
+
* @property {EffectCapabilityDeclaration[]} [capabilities] - Authority declarations shared by reference when the program declares a standard-library contract.
|
|
4112
|
+
* @property {EntryPoint} [entryPoint] - Sole executable entry point, present only on the selected module.
|
|
4113
|
+
* @property {SourceLocation} location - Source location.
|
|
4114
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
4115
|
+
* @property {SemanticProvenance} [provenance] - Parser-authored source and identity index.
|
|
4116
|
+
* @property {{identity: string, version: string}} [stdlibFacade] - Selected compiler-owned facade module identity.
|
|
4117
|
+
*/
|
|
4118
|
+
/**
|
|
4119
|
+
* @typedef StdlibFacadeProgramModuleDescriptor
|
|
4120
|
+
* @property {{identity: string, range: string}[]} dependencies - Versioned facade dependencies.
|
|
4121
|
+
* @property {string} identity - Facade identity.
|
|
4122
|
+
* @property {({identity: string, kind: "module", symbols: string[]} | {forms: ("unqualified-call" | "receiver-call")[], identity: string, kind: "builtin", symbols: string[]})[]} nativeModules - Exact native source identities.
|
|
4123
|
+
* @property {({effects: string[], failures: string[], forms: ("direct-call" | "unqualified-call" | "receiver-call")[], kind: "function", name: string, ownership: "not-applicable", parameters: {name: string, type: string}[], returnType: string} | {constructor: {effects: string[], failures: string[], ownership: "acquired", parameters: {name: string, type: string}[]}, forms: ["constructor-call"], kind: "class", methods: {effects: string[], failures: string[], forms: ["receiver-call"], name: string, ownership: "borrowed" | "consumed", parameters: {name: string, type: string}[], returnType: string}[], name: string, ownership: "owned-reference"})[]} publicDeclarations - Public source declarations.
|
|
4124
|
+
* @property {{module: string, operations: string[], range: string}[]} requirements - Canonical capability requirements.
|
|
4125
|
+
* @property {string} runtimeProfile - Exact source runtime profile.
|
|
4126
|
+
* @property {string} sourceModule - Compiler-owned semantic module identity.
|
|
4127
|
+
* @property {string} version - Exact facade version.
|
|
4128
|
+
* @property {"internal" | "public"} visibility - Native-selectable visibility.
|
|
4129
|
+
*/
|
|
4130
|
+
/**
|
|
4131
|
+
* @typedef StdlibFacadeProgramDescriptor
|
|
4132
|
+
* @property {"SemantifoldStdlibFacades"} schema - Facade descriptor schema.
|
|
4133
|
+
* @property {1} version - Facade descriptor version.
|
|
4134
|
+
* @property {SemanticLanguage} language - Source-language compatibility profile.
|
|
4135
|
+
* @property {StdlibFacadeProgramModuleDescriptor[]} modules - Dependency-first selected executable closure.
|
|
4136
|
+
*/
|
|
4137
|
+
/**
|
|
4138
|
+
* @typedef SemanticProgram
|
|
4139
|
+
* @property {"Program"} kind - Node discriminator.
|
|
4140
|
+
* @property {SemanticProgramModule[]} modules - Dependency-first deterministic module order.
|
|
4141
|
+
* @property {string} entryModule - Stable identity of the sole entry module.
|
|
4142
|
+
* @property {RegisteredSource[]} sources - Caller-order complete source registry.
|
|
4143
|
+
* @property {{contractVersion?: string, identity: string}} [stdlibContract] - Declared standard-library contract; plain, never frozen.
|
|
4144
|
+
* @property {{contractVersion?: string, identity: string}[]} [stdlibContracts] - Ordered declared standard-library contracts; plain, never frozen.
|
|
4145
|
+
* @property {StdlibFacadeProgramDescriptor} [stdlibFacades] - Complete selected source-language facade closure.
|
|
4146
|
+
*/
|
|
4147
|
+
/** @typedef {SemanticModule | SemanticProgramModule | SemanticImport | SemanticExport | RecordDeclaration | ClassDeclaration | ErrorDeclaration | EffectCapabilityDeclaration | EffectResourceDeclaration | EffectFailureDeclaration | EffectOperationDeclaration | RecordField | PrivateField | ConstructorDeclaration | MethodDeclaration | FunctionDeclaration | TypeParameter | Parameter | ValueBinding | CatchBinding | Block | Statement | EntryPoint | Expression | ErrorConstruction | ErrorType | MapEntry | SemanticValueType | FunctionReturnTypeReference} SemanticNode */
|
|
1398
4148
|
/** @typedef {SemanticNode} SemanticNodeWithoutLocations */
|
|
1399
4149
|
export {};
|
|
1400
4150
|
//# sourceMappingURL=types.d.ts.map
|