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