semantifold 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -15
- package/build/index.d.ts +48 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +57 -8
- package/build/src/artifact-path.d.ts +23 -1
- package/build/src/artifact-path.d.ts.map +1 -1
- package/build/src/artifact-path.js +45 -3
- package/build/src/artifacts.d.ts.map +1 -1
- package/build/src/artifacts.js +66 -1
- package/build/src/backends/c-validation.d.ts.map +1 -1
- package/build/src/backends/c-validation.js +7 -3
- package/build/src/backends/cpp-validation.d.ts.map +1 -1
- package/build/src/backends/cpp-validation.js +7 -3
- package/build/src/backends/csharp.js +7 -1
- package/build/src/backends/dart-runtime.d.ts +2 -0
- package/build/src/backends/dart-runtime.d.ts.map +1 -0
- package/build/src/backends/dart-runtime.js +41 -0
- package/build/src/backends/dart.d.ts +20 -0
- package/build/src/backends/dart.d.ts.map +1 -0
- package/build/src/backends/dart.js +321 -0
- package/build/src/backends/effects.d.ts +60 -0
- package/build/src/backends/effects.d.ts.map +1 -0
- package/build/src/backends/effects.js +746 -0
- package/build/src/backends/go.js +18 -4
- package/build/src/backends/identifiers.d.ts +36 -4
- package/build/src/backends/identifiers.d.ts.map +1 -1
- package/build/src/backends/identifiers.js +154 -10
- package/build/src/backends/index.d.ts.map +1 -1
- package/build/src/backends/index.js +27 -4
- package/build/src/backends/ios.d.ts +68 -0
- package/build/src/backends/ios.d.ts.map +1 -0
- package/build/src/backends/ios.js +1503 -0
- package/build/src/backends/java.d.ts.map +1 -1
- package/build/src/backends/java.js +429 -36
- package/build/src/backends/javascript.d.ts +6 -0
- package/build/src/backends/javascript.d.ts.map +1 -1
- package/build/src/backends/javascript.js +380 -24
- package/build/src/backends/kotlin-runtime.d.ts +3 -0
- package/build/src/backends/kotlin-runtime.d.ts.map +1 -0
- package/build/src/backends/kotlin-runtime.js +29 -0
- package/build/src/backends/kotlin.d.ts +23 -0
- package/build/src/backends/kotlin.d.ts.map +1 -0
- package/build/src/backends/kotlin.js +136 -0
- package/build/src/backends/native-validation.d.ts +2 -2
- package/build/src/backends/native-validation.d.ts.map +1 -1
- package/build/src/backends/native-validation.js +2 -2
- package/build/src/backends/ordered-expressions.d.ts.map +1 -1
- package/build/src/backends/ordered-expressions.js +39 -7
- package/build/src/backends/php-stdlib-support.d.ts +19 -0
- package/build/src/backends/php-stdlib-support.d.ts.map +1 -0
- package/build/src/backends/php-stdlib-support.js +227 -0
- package/build/src/backends/php.d.ts.map +1 -1
- package/build/src/backends/php.js +448 -33
- package/build/src/backends/program.d.ts +81 -0
- package/build/src/backends/program.d.ts.map +1 -0
- package/build/src/backends/program.js +1308 -0
- package/build/src/backends/python.js +7 -1
- package/build/src/backends/ruby.d.ts.map +1 -1
- package/build/src/backends/ruby.js +310 -24
- package/build/src/backends/rust-runtime.d.ts +7 -0
- package/build/src/backends/rust-runtime.d.ts.map +1 -0
- package/build/src/backends/rust-runtime.js +32 -0
- package/build/src/backends/rust-validation.d.ts +9 -0
- package/build/src/backends/rust-validation.d.ts.map +1 -0
- package/build/src/backends/rust-validation.js +78 -0
- package/build/src/backends/rust.d.ts +24 -0
- package/build/src/backends/rust.d.ts.map +1 -0
- package/build/src/backends/rust.js +344 -0
- package/build/src/backends/scalars.d.ts +14 -6
- package/build/src/backends/scalars.d.ts.map +1 -1
- package/build/src/backends/scalars.js +167 -17
- package/build/src/backends/shared.d.ts +23 -4
- package/build/src/backends/shared.d.ts.map +1 -1
- package/build/src/backends/shared.js +2158 -62
- package/build/src/backends/stdlib-support.d.ts +14 -0
- package/build/src/backends/stdlib-support.d.ts.map +1 -0
- package/build/src/backends/stdlib-support.js +237 -0
- package/build/src/backends/swift-runtime.d.ts +3 -0
- package/build/src/backends/swift-runtime.d.ts.map +1 -0
- package/build/src/backends/swift-runtime.js +14 -0
- package/build/src/backends/swift.d.ts +8 -0
- package/build/src/backends/swift.d.ts.map +1 -0
- package/build/src/backends/swift.js +127 -0
- package/build/src/backends/typescript.d.ts.map +1 -1
- package/build/src/backends/typescript.js +344 -24
- package/build/src/backends/wasm.d.ts +43 -0
- package/build/src/backends/wasm.d.ts.map +1 -0
- package/build/src/backends/wasm.js +2164 -0
- package/build/src/backends/writer.d.ts +235 -4
- package/build/src/backends/writer.d.ts.map +1 -1
- package/build/src/backends/writer.js +468 -3
- package/build/src/diagnostic.d.ts +4 -3
- package/build/src/diagnostic.d.ts.map +1 -1
- package/build/src/diagnostic.js +5 -3
- package/build/src/frontends/c.d.ts.map +1 -1
- package/build/src/frontends/c.js +5 -3
- package/build/src/frontends/cpp.d.ts.map +1 -1
- package/build/src/frontends/cpp.js +5 -3
- package/build/src/frontends/csharp.d.ts.map +1 -1
- package/build/src/frontends/csharp.js +7 -3
- package/build/src/frontends/dart.d.ts +10 -0
- package/build/src/frontends/dart.d.ts.map +1 -0
- package/build/src/frontends/dart.js +913 -0
- package/build/src/frontends/index.d.ts +3 -1
- package/build/src/frontends/index.d.ts.map +1 -1
- package/build/src/frontends/index.js +15 -5
- package/build/src/frontends/java.d.ts +110 -1
- package/build/src/frontends/java.d.ts.map +1 -1
- package/build/src/frontends/java.js +1725 -70
- package/build/src/frontends/javascript-typescript.d.ts +69 -1
- package/build/src/frontends/javascript-typescript.d.ts.map +1 -1
- package/build/src/frontends/javascript-typescript.js +1825 -93
- package/build/src/frontends/kotlin.d.ts +10 -0
- package/build/src/frontends/kotlin.d.ts.map +1 -0
- package/build/src/frontends/kotlin.js +685 -0
- package/build/src/frontends/php.d.ts +118 -1
- package/build/src/frontends/php.d.ts.map +1 -1
- package/build/src/frontends/php.js +1583 -76
- package/build/src/frontends/program.d.ts +74 -0
- package/build/src/frontends/program.d.ts.map +1 -0
- package/build/src/frontends/program.js +989 -0
- package/build/src/frontends/ruby.d.ts +68 -1
- package/build/src/frontends/ruby.d.ts.map +1 -1
- package/build/src/frontends/ruby.js +1446 -101
- package/build/src/frontends/rust-parser.d.ts +11 -0
- package/build/src/frontends/rust-parser.d.ts.map +1 -0
- package/build/src/frontends/rust-parser.js +15 -0
- package/build/src/frontends/rust.d.ts +14 -0
- package/build/src/frontends/rust.d.ts.map +1 -0
- package/build/src/frontends/rust.js +715 -0
- package/build/src/frontends/scalars.d.ts +10 -0
- package/build/src/frontends/scalars.d.ts.map +1 -1
- package/build/src/frontends/scalars.js +28 -2
- package/build/src/frontends/swift.d.ts +10 -0
- package/build/src/frontends/swift.d.ts.map +1 -0
- package/build/src/frontends/swift.js +860 -0
- package/build/src/frontends/types.d.ts +186 -0
- package/build/src/frontends/types.d.ts.map +1 -0
- package/build/src/frontends/types.js +634 -0
- package/build/src/language-registry.d.ts +46 -4
- package/build/src/language-registry.d.ts.map +1 -1
- package/build/src/language-registry.js +167 -13
- package/build/src/mapping.d.ts +2 -2
- package/build/src/mapping.d.ts.map +1 -1
- package/build/src/mapping.js +31 -10
- package/build/src/semantic/capabilities.d.ts +66 -0
- package/build/src/semantic/capabilities.d.ts.map +1 -0
- package/build/src/semantic/capabilities.js +649 -0
- package/build/src/semantic/effects.d.ts +26 -0
- package/build/src/semantic/effects.d.ts.map +1 -0
- package/build/src/semantic/effects.js +764 -0
- package/build/src/semantic/generics.d.ts +23 -0
- package/build/src/semantic/generics.d.ts.map +1 -0
- package/build/src/semantic/generics.js +61 -0
- package/build/src/semantic/lifetime.d.ts +37 -0
- package/build/src/semantic/lifetime.d.ts.map +1 -0
- package/build/src/semantic/lifetime.js +527 -0
- package/build/src/semantic/provenance.d.ts +9 -2
- package/build/src/semantic/provenance.d.ts.map +1 -1
- package/build/src/semantic/provenance.js +462 -20
- package/build/src/semantic/scalars.d.ts +11 -0
- package/build/src/semantic/scalars.d.ts.map +1 -1
- package/build/src/semantic/scalars.js +16 -1
- package/build/src/semantic/stdlib.d.ts +254 -0
- package/build/src/semantic/stdlib.d.ts.map +1 -0
- package/build/src/semantic/stdlib.js +880 -0
- package/build/src/semantic/types.d.ts +2952 -202
- package/build/src/semantic/types.d.ts.map +1 -1
- package/build/src/semantic/types.js +688 -15
- package/build/src/semantic/validate.d.ts +85 -5
- package/build/src/semantic/validate.d.ts.map +1 -1
- package/build/src/semantic/validate.js +2576 -98
- package/build/src/stdlib-facades.d.ts +304 -0
- package/build/src/stdlib-facades.d.ts.map +1 -0
- package/build/src/stdlib-facades.js +1167 -0
- package/build/src/stdlib-negotiation.d.ts +69 -0
- package/build/src/stdlib-negotiation.d.ts.map +1 -0
- package/build/src/stdlib-negotiation.js +403 -0
- package/build/src/stdlib-providers.d.ts +72 -0
- package/build/src/stdlib-providers.d.ts.map +1 -0
- package/build/src/stdlib-providers.js +339 -0
- package/build/src/toolchains.d.ts +55 -1
- package/build/src/toolchains.d.ts.map +1 -1
- package/build/src/toolchains.js +15 -4
- package/docs/architecture.md +45 -13
- package/docs/dart.md +60 -0
- package/docs/goals.md +3 -3
- package/docs/ios.md +121 -0
- package/docs/kotlin.md +42 -0
- package/docs/language-support.md +231 -26
- package/docs/multi-file-modules.md +52 -0
- package/docs/parser-qualification.md +121 -8
- package/docs/plans/2026-09-05-standard-library-portability.md +10 -10
- package/docs/rust.md +88 -0
- package/docs/source-maps.md +15 -7
- package/docs/standard-library-portability.md +39 -8
- package/docs/swift.md +44 -0
- package/docs/testing.md +366 -4
- package/docs/webassembly.md +52 -0
- package/index.js +63 -8
- package/node_modules/semantifold-tree-sitter-legacy-internal/README.md +2 -2
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/LICENSE +21 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/README.md +45 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/binding.gyp +30 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/binding.cc +20 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/binding_test.js +9 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/index.d.ts +28 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/bindings/node/index.js +11 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/grammar.js +1630 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/package.json +64 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/darwin-arm64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/darwin-x64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/linux-arm64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/linux-x64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/win32-arm64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/prebuilds/win32-x64/tree-sitter-rust.node +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/queries/highlights.scm +159 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/queries/injections.scm +9 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/queries/tags.scm +60 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/grammar.json +9405 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/node-types.json +5399 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/parser.c +192569 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/scanner.c +393 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/tree_sitter/alloc.h +54 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/tree_sitter/array.h +290 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/src/tree_sitter/parser.h +266 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/tree-sitter-rust.wasm +0 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/node_modules/tree-sitter-rust/tree-sitter.json +53 -0
- package/node_modules/semantifold-tree-sitter-legacy-internal/package.json +3 -2
- package/node_modules/semantifold-tree-sitter-legacy-internal/src/c.js +5 -4
- package/package.json +5 -2
- package/src/artifact-path.js +47 -2
- package/src/artifacts.js +67 -0
- package/src/backends/c-validation.js +6 -1
- package/src/backends/cpp-validation.js +6 -1
- package/src/backends/csharp.js +3 -0
- package/src/backends/dart-runtime.js +41 -0
- package/src/backends/dart.js +326 -0
- package/src/backends/effects.js +705 -0
- package/src/backends/go.js +14 -2
- package/src/backends/identifiers.js +160 -9
- package/src/backends/index.js +27 -2
- package/src/backends/ios.js +1612 -0
- package/src/backends/java.js +454 -36
- package/src/backends/javascript.js +389 -23
- package/src/backends/kotlin-runtime.js +29 -0
- package/src/backends/kotlin.js +141 -0
- package/src/backends/native-validation.js +1 -1
- package/src/backends/ordered-expressions.js +40 -6
- package/src/backends/php-stdlib-support.js +239 -0
- package/src/backends/php.js +469 -32
- package/src/backends/program.js +1407 -0
- package/src/backends/python.js +3 -0
- package/src/backends/ruby.js +326 -23
- package/src/backends/rust-runtime.js +34 -0
- package/src/backends/rust-validation.js +75 -0
- package/src/backends/rust.js +335 -0
- package/src/backends/scalars.js +141 -16
- package/src/backends/shared.js +2304 -124
- package/src/backends/stdlib-support.js +234 -0
- package/src/backends/swift-runtime.js +14 -0
- package/src/backends/swift.js +132 -0
- package/src/backends/typescript.js +349 -23
- package/src/backends/wasm.js +2208 -0
- package/src/backends/writer.js +520 -2
- package/src/diagnostic.js +4 -2
- package/src/frontends/c.js +4 -2
- package/src/frontends/cpp.js +4 -2
- package/src/frontends/csharp.js +4 -2
- package/src/frontends/dart.js +963 -0
- package/src/frontends/index.js +14 -4
- package/src/frontends/java.js +1977 -69
- package/src/frontends/javascript-typescript.js +2046 -102
- package/src/frontends/kotlin.js +713 -0
- package/src/frontends/php.js +1725 -79
- package/src/frontends/program.js +1062 -0
- package/src/frontends/ruby.js +1624 -98
- package/src/frontends/rust-parser.js +18 -0
- package/src/frontends/rust.js +714 -0
- package/src/frontends/scalars.js +31 -1
- package/src/frontends/swift.js +893 -0
- package/src/frontends/types.js +750 -0
- package/src/language-registry.js +172 -12
- package/src/mapping.js +33 -9
- package/src/semantic/capabilities.js +671 -0
- package/src/semantic/effects.js +737 -0
- package/src/semantic/generics.js +58 -0
- package/src/semantic/lifetime.js +517 -0
- package/src/semantic/provenance.js +412 -19
- package/src/semantic/scalars.js +17 -0
- package/src/semantic/stdlib.js +921 -0
- package/src/semantic/types.js +765 -14
- package/src/semantic/validate.js +2934 -209
- package/src/stdlib-facades.js +1211 -0
- package/src/stdlib-negotiation.js +446 -0
- package/src/stdlib-providers.js +377 -0
- package/src/toolchains.js +16 -3
package/src/semantic/types.js
CHANGED
|
@@ -1,14 +1,63 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
/** @typedef {"php" | "ruby" | "javascript" | "typescript" | "java" | "python" | "csharp" | "go" | "c" | "cpp"} SemanticLanguage */
|
|
3
|
+
/** @typedef {"php" | "ruby" | "javascript" | "typescript" | "java" | "kotlin" | "python" | "csharp" | "go" | "c" | "cpp" | "rust" | "swift" | "dart"} SemanticLanguage */
|
|
4
|
+
/** @typedef {SemanticLanguage} TextBackendLanguage */
|
|
5
|
+
/** @typedef {TextBackendLanguage | "wasm" | "ios"} BackendLanguage */
|
|
6
|
+
/** @typedef {SemanticLanguage | "html"} GeneratedTextLanguage */
|
|
4
7
|
/** @typedef {"integer" | "boolean" | "string"} SemanticTypeName */
|
|
8
|
+
/** @typedef {SemanticTypeName | "void"} FunctionReturnTypeName */
|
|
5
9
|
/** @typedef {"IntegerNegate" | "BooleanNot"} SemanticUnaryOperation */
|
|
6
10
|
/** @typedef {"IntegerAdd" | "IntegerSubtract" | "IntegerMultiply" | "BooleanAnd" | "BooleanOr" | "IntegerEqual" | "IntegerNotEqual" | "BooleanEqual" | "BooleanNotEqual" | "StringEqual" | "StringNotEqual" | "IntegerLessThan" | "IntegerLessThanOrEqual" | "IntegerGreaterThan" | "IntegerGreaterThanOrEqual" | "StringConcat"} SemanticBinaryOperation */
|
|
7
|
-
/** @typedef {"function" | "parameter" | "local"} SemanticSymbolKind */
|
|
8
|
-
/** @typedef {"
|
|
11
|
+
/** @typedef {"capability" | "resource" | "failure" | "operation" | "record" | "class" | "error" | "field" | "constructor" | "method" | "function" | "typeParameter" | "parameter" | "local" | "iteration" | "catch"} SemanticSymbolKind */
|
|
12
|
+
/** @typedef {"record" | "class" | "error" | "function"} SemanticDeclarationKind */
|
|
13
|
+
/** @typedef {"declaration" | "type" | "construct" | "member" | "read" | "write" | "call"} SemanticSymbolRole */
|
|
9
14
|
/** @typedef {"parse" | "generate" | "restore" | "compile" | "link" | "validate" | "instantiate" | "execute"} AcceptanceStage */
|
|
10
15
|
/** @typedef {"entry" | "source" | "manifest" | "support" | "mapping" | "resource" | "loader"} GeneratedArtifactRole */
|
|
11
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @typedef IosApplicationConfigurationInput
|
|
19
|
+
* @property {string} productName - Safe Xcode product/path identity.
|
|
20
|
+
* @property {string} moduleName - Safe Swift module identity.
|
|
21
|
+
* @property {string} organizationPrefix - Caller-supplied reverse-DNS organization prefix.
|
|
22
|
+
* @property {string} bundleIdentifier - Caller-supplied reverse-DNS application bundle identity.
|
|
23
|
+
* @property {string} deploymentTarget - Caller-supplied major.minor iOS deployment target; never inferred.
|
|
24
|
+
* @property {string} displayName - User-visible application name.
|
|
25
|
+
* @property {"Sources"} [sourceRoot] - Fixed generated-source root.
|
|
26
|
+
* @property {"Assets.xcassets"} [resourceRoot] - Fixed caller-resource root.
|
|
27
|
+
* @property {"swiftui"} [lifecycle] - Sole supported lifecycle.
|
|
28
|
+
* @property {Record<string, never>} [infoPlist] - Closed baseline caller plist extension; currently empty.
|
|
29
|
+
* @property {unknown[]} [permissions] - Validated as the closed empty baseline permissions.
|
|
30
|
+
* @property {unknown[]} [entitlements] - Validated as the closed empty baseline entitlements.
|
|
31
|
+
* @property {unknown[]} [privacyDeclarations] - Validated as the closed empty baseline privacy declarations.
|
|
32
|
+
* @property {unknown[]} [capabilities] - Validated as the closed empty baseline Apple capabilities.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @typedef IosApplicationConfiguration
|
|
37
|
+
* @property {string} productName - Validated Xcode product/path identity.
|
|
38
|
+
* @property {string} moduleName - Validated Swift module identity.
|
|
39
|
+
* @property {string} organizationPrefix - Validated reverse-DNS organization prefix.
|
|
40
|
+
* @property {string} bundleIdentifier - Validated reverse-DNS application bundle identity.
|
|
41
|
+
* @property {string} deploymentTarget - Validated caller-supplied deployment target.
|
|
42
|
+
* @property {string} displayName - Validated display name.
|
|
43
|
+
* @property {"Sources"} sourceRoot - Generated-source root.
|
|
44
|
+
* @property {"Assets.xcassets"} resourceRoot - Caller-resource root.
|
|
45
|
+
* @property {"swiftui"} lifecycle - Sole supported lifecycle.
|
|
46
|
+
* @property {Readonly<Record<string, never>>} infoPlist - Empty caller plist extension.
|
|
47
|
+
* @property {readonly never[]} permissions - Empty baseline permissions.
|
|
48
|
+
* @property {readonly never[]} entitlements - Empty baseline entitlements.
|
|
49
|
+
* @property {readonly never[]} privacyDeclarations - Empty baseline privacy declarations.
|
|
50
|
+
* @property {readonly never[]} capabilities - Empty baseline Apple capabilities.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @typedef IosApplicationAssetInput
|
|
55
|
+
* @property {string} path - Full safe destination below Assets.xcassets.
|
|
56
|
+
* @property {string | Uint8Array} content - Exact caller-provided text or bytes.
|
|
57
|
+
* @property {string} mediaType - Explicit artifact media type.
|
|
58
|
+
* @property {string} sha256 - Lowercase SHA-256 of exact UTF-8 text or bytes.
|
|
59
|
+
*/
|
|
60
|
+
|
|
12
61
|
/**
|
|
13
62
|
* @typedef LanguageRoleCapabilities
|
|
14
63
|
* @property {boolean} frontend - Parser adapter availability.
|
|
@@ -16,6 +65,7 @@
|
|
|
16
65
|
* @property {boolean} binaryBackend - Binary backend availability.
|
|
17
66
|
* @property {boolean} applicationBackend - Application-artifact backend availability.
|
|
18
67
|
* @property {boolean} interoperability - Interoperability bridge availability.
|
|
68
|
+
* @property {boolean} provider - Target host stdlib provider/native-binding availability.
|
|
19
69
|
*/
|
|
20
70
|
|
|
21
71
|
/**
|
|
@@ -31,12 +81,28 @@
|
|
|
31
81
|
* @property {readonly string[]} toolchains - Required canonical toolchain IDs.
|
|
32
82
|
*/
|
|
33
83
|
|
|
84
|
+
/**
|
|
85
|
+
* @typedef LanguageFeatureCapabilities
|
|
86
|
+
* @property {boolean} generalFunctionsAndCalls - Task 005 arbitrary required signatures, resolved direct calls, and void functions.
|
|
87
|
+
* @property {boolean} immutableCollections - Task 006 recursive immutable lists/maps, total access, and size.
|
|
88
|
+
* @property {boolean} optionalValues - Task 007 explicit optional values, presence tests, and guarded unwrap.
|
|
89
|
+
* @property {boolean} orderedListIteration - Task 008 ordered immutable-list iteration and nearest-loop control.
|
|
90
|
+
* @property {boolean} orderedMapIteration - Task 014 insertion-ordered immutable-map pair iteration.
|
|
91
|
+
* @property {boolean} conditionControlledLoops - Task 032 strict-Boolean pre-condition loops and resolved control.
|
|
92
|
+
* @property {boolean} closedRecords - Task 009 nominal closed immutable records, construction, and member reads.
|
|
93
|
+
* @property {boolean} typedErrors - Task 011 nominal unchecked errors, raises, and exact typed catches.
|
|
94
|
+
* @property {boolean} typeParametersAndGenerics - Task 012 invariant unbounded type parameters and closed generic applications.
|
|
95
|
+
* @property {boolean} referenceClasses - Task 033 nominal reference classes, private instance state, exact constructors, and receiver methods.
|
|
96
|
+
* @property {boolean} effectfulCapabilitiesAndResources - Task 034 authorized host effects, typed failures, and owned resources.
|
|
97
|
+
*/
|
|
98
|
+
|
|
34
99
|
/**
|
|
35
100
|
* @typedef LanguageCapabilities
|
|
36
101
|
* @property {string} id - Stable registry identity.
|
|
37
102
|
* @property {Readonly<LanguageRoleCapabilities>} roles - Independently registered roles.
|
|
38
103
|
* @property {"single" | "multiple"} artifactMultiplicity - Target artifact multiplicity.
|
|
39
104
|
* @property {boolean} roundTrip - Whether frontend/backend round-trip acceptance is declared.
|
|
105
|
+
* @property {Readonly<LanguageFeatureCapabilities>} features - Semantic feature capabilities.
|
|
40
106
|
* @property {Readonly<LanguageMappingCapabilities>} mapping - Mapping forms.
|
|
41
107
|
* @property {Readonly<LanguageAcceptanceCapabilities>} acceptance - Stages and toolchains.
|
|
42
108
|
*/
|
|
@@ -61,6 +127,7 @@
|
|
|
61
127
|
* @property {string} filename - Original filename, preserved verbatim.
|
|
62
128
|
* @property {string | null} content - Original source content, preserved verbatim when available.
|
|
63
129
|
* @property {SemanticLanguage | null} language - Parser language when known.
|
|
130
|
+
* @property {"application" | "facade"} [ownership] - Caller or compiler-owned source role for semantic programs.
|
|
64
131
|
*/
|
|
65
132
|
|
|
66
133
|
/**
|
|
@@ -143,6 +210,7 @@
|
|
|
143
210
|
* @property {string} name - Semantic symbol name.
|
|
144
211
|
* @property {SemanticSymbolKind} kind - Symbol category.
|
|
145
212
|
* @property {string} declarationNodeId - Declaring node identity.
|
|
213
|
+
* @property {string} [semanticDeclarationId] - Stable semantic declaration identity for record, field, and function symbols.
|
|
146
214
|
* @property {SourceLocation} location - Exact declaration-name range.
|
|
147
215
|
* @property {SemanticSymbolReference[]} references - Ordered resolved references.
|
|
148
216
|
*/
|
|
@@ -173,7 +241,7 @@
|
|
|
173
241
|
/**
|
|
174
242
|
* @typedef GeneratedSource
|
|
175
243
|
* @property {string} filename - Output filename.
|
|
176
|
-
* @property {
|
|
244
|
+
* @property {GeneratedTextLanguage} language - Output text language.
|
|
177
245
|
* @property {string} content - Exact generated LF source.
|
|
178
246
|
*/
|
|
179
247
|
|
|
@@ -240,6 +308,7 @@
|
|
|
240
308
|
* @property {string} target - Stable language or target ID.
|
|
241
309
|
* @property {string} entry - Path of the sole declared entry artifact.
|
|
242
310
|
* @property {readonly GeneratedSetArtifact[]} artifacts - Deterministic artifact order.
|
|
311
|
+
* @property {Readonly<Record<string, unknown>>} [metadata] - Detached target-specific JSON metadata.
|
|
243
312
|
*/
|
|
244
313
|
|
|
245
314
|
/**
|
|
@@ -248,8 +317,8 @@
|
|
|
248
317
|
* @property {string} command - Documented canonical command.
|
|
249
318
|
* @property {string} executable - Exact absolute executable path.
|
|
250
319
|
* @property {"override" | "canonical"} source - Resolution route.
|
|
251
|
-
* @property {string} version - First
|
|
252
|
-
* @property {string} versionOutput - Complete
|
|
320
|
+
* @property {string} version - First selected-stream version line.
|
|
321
|
+
* @property {string} versionOutput - Complete normalized stdout, or normalized stderr when stdout is empty.
|
|
253
322
|
* @property {readonly string[]} versionArguments - Exact version argument array.
|
|
254
323
|
*/
|
|
255
324
|
|
|
@@ -273,15 +342,291 @@
|
|
|
273
342
|
/**
|
|
274
343
|
* @typedef TypeReference
|
|
275
344
|
* @property {"TypeReference"} kind - Node discriminator.
|
|
276
|
-
* @property {SemanticTypeName} name - Normalized type name.
|
|
345
|
+
* @property {SemanticTypeName} name - Normalized scalar value type name.
|
|
277
346
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance that survives semantic transforms.
|
|
278
347
|
*/
|
|
279
348
|
|
|
349
|
+
/**
|
|
350
|
+
* @typedef TypeParameter
|
|
351
|
+
* @property {"TypeParameter"} kind - Declaration-scoped invariant unbounded type parameter.
|
|
352
|
+
* @property {string} [id] - Stable declaration-scoped identity, required after validation.
|
|
353
|
+
* @property {string} name - Source-visible type parameter name.
|
|
354
|
+
* @property {SourceLocation} location - Parser-owned declaration location.
|
|
355
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned declaration-name range.
|
|
356
|
+
*/
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* @typedef TypeVariableReference
|
|
360
|
+
* @property {"TypeVariableReference"} kind - Reference to one declaration-scoped type parameter.
|
|
361
|
+
* @property {string} parameterId - Stable referenced type-parameter identity.
|
|
362
|
+
* @property {SourceLocation} location - Parser-owned reference location.
|
|
363
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
364
|
+
*/
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* @typedef ListType
|
|
368
|
+
* @property {"ListType"} kind - Recursive list-type discriminator.
|
|
369
|
+
* @property {SemanticValueType} elementType - Homogeneous element type.
|
|
370
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and argument ranges.
|
|
371
|
+
*/
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @typedef MapType
|
|
375
|
+
* @property {"MapType"} kind - Recursive map-type discriminator.
|
|
376
|
+
* @property {TypeReference} keyType - Exact string key type.
|
|
377
|
+
* @property {SemanticValueType} valueType - Homogeneous value type.
|
|
378
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and argument ranges.
|
|
379
|
+
*/
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* @typedef OrderedMapType
|
|
383
|
+
* @property {"OrderedMapType"} kind - Distinct insertion-ordered map-type discriminator.
|
|
384
|
+
* @property {TypeReference} keyType - Exact supported string key type.
|
|
385
|
+
* @property {SemanticValueType} valueType - Homogeneous value type.
|
|
386
|
+
* @property {"insertion"} order - Canonical first-insertion encounter order.
|
|
387
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and argument ranges.
|
|
388
|
+
*/
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* @typedef OptionalType
|
|
392
|
+
* @property {"OptionalType"} kind - Explicit presence/absence type discriminator.
|
|
393
|
+
* @property {SemanticValueType} valueType - Exact present-value type.
|
|
394
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned outer and constituent ranges.
|
|
395
|
+
*/
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* @typedef RecordType
|
|
399
|
+
* @property {"RecordType"} kind - Nominal record-type discriminator.
|
|
400
|
+
* @property {string} declarationId - Stable module-local record declaration identity.
|
|
401
|
+
* @property {SemanticValueType[]} [arguments] - Exact invariant type arguments; required for generic declarations and absent for non-generic declarations.
|
|
402
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
403
|
+
*/
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* @typedef ErrorType
|
|
407
|
+
* @property {"ErrorType"} kind - Nominal unchecked-error type discriminator.
|
|
408
|
+
* @property {string} declarationId - Stable error declaration identity.
|
|
409
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
410
|
+
*/
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* @typedef ReferenceType
|
|
414
|
+
* @property {"ReferenceType"} kind - Nominal reference-class type discriminator.
|
|
415
|
+
* @property {string} declarationId - Stable module-local class declaration identity.
|
|
416
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
417
|
+
*/
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* @typedef OwnedResourceType
|
|
421
|
+
* @property {"OwnedResourceType"} kind - Compiler-owned linear resource type.
|
|
422
|
+
* @property {string} resourceId - Exact authority resource declaration identity.
|
|
423
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
424
|
+
*/
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* @typedef OwnedReferenceType
|
|
428
|
+
* @property {"OwnedReferenceType"} kind - Linear reference that owns one protected resource.
|
|
429
|
+
* @property {string} declarationId - Exact owned class declaration identity.
|
|
430
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type-name range.
|
|
431
|
+
*/
|
|
432
|
+
|
|
433
|
+
/** @typedef {TypeReference | TypeVariableReference | ListType | MapType | OrderedMapType | OptionalType | RecordType | ReferenceType | OwnedResourceType | OwnedReferenceType} SemanticValueType */
|
|
434
|
+
/** @typedef {SemanticValueType | ErrorType} SemanticBindingType */
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* @typedef FunctionReturnTypeReference
|
|
438
|
+
* @property {"TypeReference"} kind - Void return discriminator.
|
|
439
|
+
* @property {"void"} name - Normalized non-value function return.
|
|
440
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance that survives semantic transforms.
|
|
441
|
+
*/
|
|
442
|
+
|
|
443
|
+
/** @typedef {SemanticValueType | FunctionReturnTypeReference} SemanticFunctionReturnType */
|
|
444
|
+
|
|
445
|
+
/** @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 */
|
|
446
|
+
/** @typedef {SemanticTypeIdentity | "void"} FunctionReturnTypeIdentity */
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* @typedef ResolvedFunctionSignature
|
|
450
|
+
* @property {"ResolvedFunctionSignature"} kind - Resolution discriminator.
|
|
451
|
+
* @property {string} declarationId - Deterministic module-local declaration identity.
|
|
452
|
+
* @property {SemanticTypeIdentity[]} parameterTypes - Exact required positional parameter types.
|
|
453
|
+
* @property {FunctionReturnTypeIdentity} returnType - Exact resolved return type.
|
|
454
|
+
* @property {SemanticTypeIdentity[]} [typeArguments] - Inferred declaration-order type arguments for a generic call.
|
|
455
|
+
*/
|
|
456
|
+
|
|
280
457
|
/**
|
|
281
458
|
* @typedef Parameter
|
|
282
459
|
* @property {"Parameter"} kind - Node discriminator.
|
|
283
460
|
* @property {string} name - Parameter name.
|
|
284
|
-
* @property {
|
|
461
|
+
* @property {SemanticValueType} type - Parameter type.
|
|
462
|
+
* @property {SourceLocation} location - Source location.
|
|
463
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
464
|
+
*/
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* @typedef ResolvedEffectOperationSignature
|
|
468
|
+
* @property {"ResolvedEffectOperationSignature"} kind - Resolution discriminator.
|
|
469
|
+
* @property {string} capabilityId - Exact capability declaration identity.
|
|
470
|
+
* @property {string} operationId - Exact operation declaration identity.
|
|
471
|
+
* @property {SemanticTypeIdentity[]} parameterTypes - Exact ordered parameter types.
|
|
472
|
+
* @property {FunctionReturnTypeIdentity} returnType - Exact operation result.
|
|
473
|
+
* @property {readonly ["host"]} effects - Closed initial effect set.
|
|
474
|
+
* @property {string[]} failureIds - Exact ordered declared failures.
|
|
475
|
+
* @property {EffectResourceFlow} resourceFlow - Exact ownership transition.
|
|
476
|
+
*/
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* @typedef OwnedMoveExpression
|
|
480
|
+
* @property {"OwnedMoveExpression"} kind - Explicit linear ownership transfer.
|
|
481
|
+
* @property {IdentifierExpression} expression - Moved owner.
|
|
482
|
+
* @property {OwnedResourceType | OwnedReferenceType} type - Exact owned type.
|
|
483
|
+
* @property {SourceLocation} location - Exact transfer location.
|
|
484
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Derived source provenance.
|
|
485
|
+
*/
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* @typedef OwnedBorrowExpression
|
|
489
|
+
* @property {"OwnedBorrowExpression"} kind - Immediate nonescaping resource borrow.
|
|
490
|
+
* @property {"shared" | "exclusive"} mode - Borrow mode.
|
|
491
|
+
* @property {IdentifierExpression | ReceiverExpression | PrivateFieldRead} expression - Borrowed place.
|
|
492
|
+
* @property {OwnedResourceType | OwnedReferenceType} type - Exact owned type.
|
|
493
|
+
* @property {SourceLocation} location - Exact borrow location.
|
|
494
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Derived source provenance.
|
|
495
|
+
*/
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* @typedef EffectCallExpression
|
|
499
|
+
* @property {"EffectCallExpression"} kind - Compiler-authorized effect invocation.
|
|
500
|
+
* @property {string} operation - Exact operation declaration identity.
|
|
501
|
+
* @property {Expression[]} arguments - Source-ordered arguments.
|
|
502
|
+
* @property {string} effectSiteId - Deterministic semantic evaluation identity.
|
|
503
|
+
* @property {ResolvedEffectOperationSignature} resolution - Complete authority resolution.
|
|
504
|
+
* @property {SourceLocation} location - Complete call location.
|
|
505
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned operation-name range.
|
|
506
|
+
*/
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* @typedef EffectParameter
|
|
510
|
+
* @property {string} name - Stable parameter name.
|
|
511
|
+
* @property {SemanticValueType} type - Exact ordered parameter type.
|
|
512
|
+
*/
|
|
513
|
+
|
|
514
|
+
/** @typedef {{kind: "none"} | {kind: "acquire", resourceId: string} | {kind: "borrow" | "close", parameterIndex: number, terminalFailureId: string}} EffectResourceFlow */
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* @typedef EffectResourceDeclaration
|
|
518
|
+
* @property {"EffectResourceDeclaration"} kind - Capability resource declaration.
|
|
519
|
+
* @property {string} id - Deterministic authority-local identity.
|
|
520
|
+
* @property {string} name - Source-visible nominal resource name.
|
|
521
|
+
*/
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* @typedef EffectFailureDeclaration
|
|
525
|
+
* @property {"EffectFailureDeclaration"} kind - Capability failure declaration.
|
|
526
|
+
* @property {string} id - Deterministic authority-local identity.
|
|
527
|
+
* @property {string} name - Source-visible nominal failure name.
|
|
528
|
+
*/
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* @typedef EffectOperationDeclaration
|
|
532
|
+
* @property {"EffectOperationDeclaration"} kind - Compiler-authorized operation declaration.
|
|
533
|
+
* @property {string} id - Deterministic authority-local identity.
|
|
534
|
+
* @property {string} name - Source-visible operation name.
|
|
535
|
+
* @property {EffectParameter[]} parameters - Exact positional parameters.
|
|
536
|
+
* @property {SemanticFunctionReturnType} returnType - Exact result type.
|
|
537
|
+
* @property {readonly ["host"]} effects - Closed initial effect set.
|
|
538
|
+
* @property {string[]} failureIds - Ordered nominal failure identities.
|
|
539
|
+
* @property {EffectResourceFlow} resourceFlow - Exact ownership transition.
|
|
540
|
+
*/
|
|
541
|
+
|
|
542
|
+
/**
|
|
543
|
+
* @typedef EffectCapabilityDeclaration
|
|
544
|
+
* @property {"EffectCapabilityDeclaration"} kind - Authorized capability declaration.
|
|
545
|
+
* @property {string} id - Deterministic module-local identity.
|
|
546
|
+
* @property {string} authorityId - Opaque authority identity.
|
|
547
|
+
* @property {string} name - Capability name.
|
|
548
|
+
* @property {EffectResourceDeclaration[]} resources - Ordered resources.
|
|
549
|
+
* @property {EffectFailureDeclaration[]} failures - Ordered failures.
|
|
550
|
+
* @property {EffectOperationDeclaration[]} operations - Ordered operations.
|
|
551
|
+
*/
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* @typedef CapabilityAuthority
|
|
555
|
+
* @property {"SemantifoldCapabilityAuthority"} schema - Authority schema discriminator.
|
|
556
|
+
* @property {1 | 2} schemaVersion - Authority payload version, not a standard-library contract version.
|
|
557
|
+
* @property {string} id - Opaque caller-supplied authority identity.
|
|
558
|
+
* @property {EffectCapabilityDeclaration[]} capabilities - Normalized declarations.
|
|
559
|
+
* @property {string} [contractVersion] - Declared standard-library contract version, present only when the caller supplied one.
|
|
560
|
+
* @property {{identity: string, contractVersion: string, capabilities: EffectCapabilityDeclaration[]}[]} [modules] - Schema-v2 canonical module authorities.
|
|
561
|
+
*/
|
|
562
|
+
|
|
563
|
+
/** @typedef {{module: string, name: string}} CapabilityDeclarationReferenceInput */
|
|
564
|
+
/** @typedef {{name: string, type: SemanticTypeName | {kind: "OwnedResourceType", resource: string | CapabilityDeclarationReferenceInput} | {kind: "OptionalType", valueType: SemanticTypeName}}} CapabilityParameterInput */
|
|
565
|
+
/** @typedef {{name: string}} CapabilityNamedInput */
|
|
566
|
+
/** @typedef {{kind: "none"} | {kind: "acquire", resource: string | CapabilityDeclarationReferenceInput} | {kind: "borrow" | "close", parameterIndex: number, terminalFailure: string | CapabilityDeclarationReferenceInput}} CapabilityResourceFlowInput */
|
|
567
|
+
/** @typedef {{name: string, parameters: CapabilityParameterInput[], returnType: FunctionReturnTypeName | {kind: "OwnedResourceType", resource: string | CapabilityDeclarationReferenceInput} | {kind: "OptionalType", valueType: SemanticTypeName}, effects: ["host"], failures: (string | CapabilityDeclarationReferenceInput)[], resourceFlow: CapabilityResourceFlowInput}} CapabilityOperationInput */
|
|
568
|
+
/** @typedef {{name: string, resources: CapabilityNamedInput[], failures: CapabilityNamedInput[], operations: CapabilityOperationInput[]}} CapabilityDeclarationInput */
|
|
569
|
+
/** @typedef {{identity: string, contractVersion: string, capabilities: CapabilityDeclarationInput[]}} CapabilityAuthorityModuleInput */
|
|
570
|
+
/** @typedef {{schema: "SemantifoldCapabilityAuthority", schemaVersion: 1, id: string, capabilities: CapabilityDeclarationInput[], contractVersion?: string} | {schema: "SemantifoldCapabilityAuthority", schemaVersion: 2, id: string, modules: CapabilityAuthorityModuleInput[]}} CapabilityAuthorityInput */
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* @typedef ListLiteral
|
|
574
|
+
* @property {"ListLiteral"} kind - Ordered immutable list literal.
|
|
575
|
+
* @property {Expression[]} elements - Source-ordered, duplicate-preserving elements.
|
|
576
|
+
* @property {SourceLocation} location - Source location.
|
|
577
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
578
|
+
*/
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* @typedef MapEntry
|
|
582
|
+
* @property {"MapEntry"} kind - Source-ordered map initializer entry.
|
|
583
|
+
* @property {StringLiteral} key - Literal nonnumeric string key.
|
|
584
|
+
* @property {Expression} value - Entry value.
|
|
585
|
+
* @property {SourceLocation} location - Source location.
|
|
586
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
587
|
+
*/
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* @typedef MapLiteral
|
|
591
|
+
* @property {"MapLiteral"} kind - Immutable map literal; entry order is diagnostic-only.
|
|
592
|
+
* @property {MapEntry[]} entries - Source initializer order.
|
|
593
|
+
* @property {SourceLocation} location - Source location.
|
|
594
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
595
|
+
*/
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* @typedef OrderedMapLiteral
|
|
599
|
+
* @property {"OrderedMapLiteral"} kind - Immutable map literal with observable first-insertion order.
|
|
600
|
+
* @property {MapEntry[]} entries - Source-ordered unique entries.
|
|
601
|
+
* @property {SourceLocation} location - Complete ordered construction boundary.
|
|
602
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
603
|
+
*/
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* @typedef ListIndexExpression
|
|
607
|
+
* @property {"ListIndexExpression"} kind - Total zero-based list index.
|
|
608
|
+
* @property {Expression} collection - List-valued receiver.
|
|
609
|
+
* @property {Expression} index - Integer index.
|
|
610
|
+
* @property {"proven" | "fail-on-absence"} totality - Admission basis; never optional.
|
|
611
|
+
* @property {SourceLocation} location - Source location.
|
|
612
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
613
|
+
*/
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* @typedef MapLookupExpression
|
|
617
|
+
* @property {"MapLookupExpression"} kind - Total string-key map lookup.
|
|
618
|
+
* @property {Expression} collection - Map-valued receiver.
|
|
619
|
+
* @property {Expression} key - String key expression.
|
|
620
|
+
* @property {"proven" | "fail-on-absence"} totality - Admission basis; never optional.
|
|
621
|
+
* @property {SourceLocation} location - Source location.
|
|
622
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
623
|
+
*/
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* @typedef CollectionSizeExpression
|
|
627
|
+
* @property {"CollectionSizeExpression"} kind - Finite collection size.
|
|
628
|
+
* @property {Expression} collection - List- or map-valued receiver.
|
|
629
|
+
* @property {"list" | "map"} [collectionKind] - Validated receiver kind for target spelling.
|
|
285
630
|
* @property {SourceLocation} location - Source location.
|
|
286
631
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
287
632
|
*/
|
|
@@ -318,6 +663,37 @@
|
|
|
318
663
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
319
664
|
*/
|
|
320
665
|
|
|
666
|
+
/**
|
|
667
|
+
* @typedef OptionalNone
|
|
668
|
+
* @property {"OptionalNone"} kind - Contextually typed absence value.
|
|
669
|
+
* @property {SourceLocation} location - Source location.
|
|
670
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
671
|
+
*/
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* @typedef OptionalSome
|
|
675
|
+
* @property {"OptionalSome"} kind - Explicit present optional value.
|
|
676
|
+
* @property {Expression} value - Exact non-optional present value.
|
|
677
|
+
* @property {SourceLocation} location - Source location.
|
|
678
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
679
|
+
*/
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* @typedef OptionalIsPresent
|
|
683
|
+
* @property {"OptionalIsPresent"} kind - Presence test for one simple identifier.
|
|
684
|
+
* @property {IdentifierExpression} operand - Tested optional binding.
|
|
685
|
+
* @property {SourceLocation} location - Source location.
|
|
686
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
687
|
+
*/
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* @typedef OptionalUnwrap
|
|
691
|
+
* @property {"OptionalUnwrap"} kind - Guarded unwrap of one simple identifier.
|
|
692
|
+
* @property {IdentifierExpression} operand - Proven-present optional binding.
|
|
693
|
+
* @property {SourceLocation} location - Source location.
|
|
694
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
695
|
+
*/
|
|
696
|
+
|
|
321
697
|
/**
|
|
322
698
|
* @typedef UnaryExpression
|
|
323
699
|
* @property {"UnaryExpression"} kind - Node discriminator.
|
|
@@ -344,17 +720,107 @@
|
|
|
344
720
|
* @property {"CallExpression"} kind - Node discriminator.
|
|
345
721
|
* @property {string} callee - Function name.
|
|
346
722
|
* @property {Expression[]} arguments - Positional arguments.
|
|
723
|
+
* @property {ResolvedFunctionSignature} [resolution] - Deterministic declaration and signature binding, required after frontend validation.
|
|
724
|
+
* @property {string} [effectSiteId] - Deterministic site identity when the resolved function reaches a host effect.
|
|
725
|
+
* @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
|
|
726
|
+
* @property {string[]} [failureIds] - Ordered capability failures reachable through this call.
|
|
347
727
|
* @property {SourceLocation} location - Source location.
|
|
348
728
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
349
729
|
*/
|
|
350
730
|
|
|
351
|
-
/**
|
|
731
|
+
/**
|
|
732
|
+
* @typedef ResolvedConstructorSignature
|
|
733
|
+
* @property {"ResolvedConstructorSignature"} kind - Resolution discriminator.
|
|
734
|
+
* @property {string} declarationId - Exact constructor declaration identity.
|
|
735
|
+
* @property {SemanticTypeIdentity[]} parameterTypes - Exact constructor parameter types.
|
|
736
|
+
*/
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* @typedef ResolvedMethodSignature
|
|
740
|
+
* @property {"ResolvedMethodSignature"} kind - Resolution discriminator.
|
|
741
|
+
* @property {string} declarationId - Exact resolved method identity.
|
|
742
|
+
* @property {SemanticTypeIdentity[]} parameterTypes - Exact method parameter types.
|
|
743
|
+
* @property {FunctionReturnTypeIdentity} returnType - Exact method return type.
|
|
744
|
+
* @property {{kind: "preserve" | "terminal", terminalFailureId?: string}} [resourceFlow] - Owned receiver transition and declared terminal-use failure when applicable.
|
|
745
|
+
*/
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* @typedef ReceiverExpression
|
|
749
|
+
* @property {"ReceiverExpression"} kind - The declaring class instance receiver.
|
|
750
|
+
* @property {string} classId - Stable declaring class identity.
|
|
751
|
+
* @property {SourceLocation} location - Source receiver location.
|
|
752
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned receiver range.
|
|
753
|
+
*/
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* @typedef ReferenceConstruction
|
|
757
|
+
* @property {"ReferenceConstruction"} kind - Fresh nominal reference construction.
|
|
758
|
+
* @property {ReferenceType | OwnedReferenceType} reference - Exact class type.
|
|
759
|
+
* @property {Expression[]} arguments - Source-ordered constructor arguments.
|
|
760
|
+
* @property {ResolvedConstructorSignature} [resolution] - Exact constructor binding, required after validation.
|
|
761
|
+
* @property {string} [effectSiteId] - Deterministic site identity when construction reaches a host effect.
|
|
762
|
+
* @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
|
|
763
|
+
* @property {string[]} [failureIds] - Ordered capability failures reachable through construction.
|
|
764
|
+
* @property {SourceLocation} location - Complete construction location.
|
|
765
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned class-name range.
|
|
766
|
+
*/
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* @typedef MethodCallExpression
|
|
770
|
+
* @property {"MethodCallExpression"} kind - Resolved receiver-method invocation.
|
|
771
|
+
* @property {Expression} receiver - Receiver evaluated once before arguments.
|
|
772
|
+
* @property {string} method - Stable method identity after validation.
|
|
773
|
+
* @property {Expression[]} arguments - Source-ordered arguments.
|
|
774
|
+
* @property {ResolvedMethodSignature} [resolution] - Exact method binding, required after validation.
|
|
775
|
+
* @property {string} [effectSiteId] - Deterministic site identity when the method reaches a host effect.
|
|
776
|
+
* @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
|
|
777
|
+
* @property {string[]} [failureIds] - Ordered capability failures reachable through the method.
|
|
778
|
+
* @property {SourceLocation} location - Complete call location.
|
|
779
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned method-name range.
|
|
780
|
+
*/
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* @typedef PrivateFieldRead
|
|
784
|
+
* @property {"PrivateFieldRead"} kind - Declaring-receiver-only private field read.
|
|
785
|
+
* @property {ReceiverExpression} receiver - Exact declaring receiver.
|
|
786
|
+
* @property {string} field - Stable private field identity.
|
|
787
|
+
* @property {SourceLocation} location - Complete read location.
|
|
788
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned field-name range.
|
|
789
|
+
*/
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* @typedef RecordConstruction
|
|
793
|
+
* @property {"RecordConstruction"} kind - Nominal record construction.
|
|
794
|
+
* @property {RecordType} record - Resolved record declaration identity.
|
|
795
|
+
* @property {Expression[]} arguments - Complete field-ordered constructor arguments.
|
|
796
|
+
* @property {SourceLocation} location - Complete construction source location.
|
|
797
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned record-name range.
|
|
798
|
+
*/
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* @typedef MemberRead
|
|
802
|
+
* @property {"MemberRead"} kind - Nominal immutable record-field read.
|
|
803
|
+
* @property {Expression} receiver - Record-valued receiver.
|
|
804
|
+
* @property {string} field - Stable resolved field identity after frontend validation.
|
|
805
|
+
* @property {SourceLocation} location - Complete member-read source location.
|
|
806
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned member-name range.
|
|
807
|
+
*/
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* @typedef ErrorMessageRead
|
|
811
|
+
* @property {"ErrorMessageRead"} kind - The sole portable error member operation.
|
|
812
|
+
* @property {IdentifierExpression} receiver - Catch binding whose immutable message is read.
|
|
813
|
+
* @property {SourceLocation} location - Complete message-read source location.
|
|
814
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned message-member range.
|
|
815
|
+
*/
|
|
816
|
+
|
|
817
|
+
/** @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 */
|
|
352
818
|
|
|
353
819
|
/**
|
|
354
820
|
* @typedef LocalDeclaration
|
|
355
821
|
* @property {"LocalDeclaration"} kind - Node discriminator.
|
|
356
822
|
* @property {string} name - Declared local name.
|
|
357
|
-
* @property {
|
|
823
|
+
* @property {SemanticValueType} type - Explicit local type.
|
|
358
824
|
* @property {boolean} mutable - Whether later assignment is allowed.
|
|
359
825
|
* @property {Expression} initializer - Required initializer expression.
|
|
360
826
|
* @property {SourceLocation} location - Declaration source location.
|
|
@@ -370,10 +836,28 @@
|
|
|
370
836
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
371
837
|
*/
|
|
372
838
|
|
|
839
|
+
/**
|
|
840
|
+
* @typedef PrivateFieldWriteStatement
|
|
841
|
+
* @property {"PrivateFieldWriteStatement"} kind - Declaring-receiver-only private field mutation.
|
|
842
|
+
* @property {ReceiverExpression} receiver - Exact declaring receiver.
|
|
843
|
+
* @property {string} field - Stable private field identity.
|
|
844
|
+
* @property {Expression} expression - New field value.
|
|
845
|
+
* @property {SourceLocation} location - Assignment source location.
|
|
846
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned field-name range.
|
|
847
|
+
*/
|
|
848
|
+
|
|
373
849
|
/**
|
|
374
850
|
* @typedef ReturnStatement
|
|
375
851
|
* @property {"ReturnStatement"} kind - Node discriminator.
|
|
376
|
-
* @property {Expression} expression - Returned expression.
|
|
852
|
+
* @property {Expression} [expression] - Returned expression; absent exactly for a bare void return.
|
|
853
|
+
* @property {SourceLocation} location - Source location.
|
|
854
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
855
|
+
*/
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* @typedef ExpressionStatement
|
|
859
|
+
* @property {"ExpressionStatement"} kind - Node discriminator.
|
|
860
|
+
* @property {CallExpression | MethodCallExpression | EffectCallExpression} expression - A direct, receiver, or authorized call whose resolved return type is void.
|
|
377
861
|
* @property {SourceLocation} location - Source location.
|
|
378
862
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
379
863
|
*/
|
|
@@ -388,8 +872,105 @@
|
|
|
388
872
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
389
873
|
*/
|
|
390
874
|
|
|
875
|
+
/**
|
|
876
|
+
* @typedef ValueBinding
|
|
877
|
+
* @property {"ValueBinding"} kind - Iteration-binding discriminator.
|
|
878
|
+
* @property {string} name - Body-local binding name.
|
|
879
|
+
* @property {SemanticValueType} type - Exact list element type.
|
|
880
|
+
* @property {false} mutable - Iteration bindings are always immutable.
|
|
881
|
+
* @property {SourceLocation} location - Binding source location.
|
|
882
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
883
|
+
*/
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* @typedef ForEachStatement
|
|
887
|
+
* @property {"ForEachStatement"} kind - Ordered list-iteration discriminator.
|
|
888
|
+
* @property {string} [id] - Deterministic module-local loop identity, required after frontend validation.
|
|
889
|
+
* @property {Expression} list - List expression evaluated exactly once before traversal.
|
|
890
|
+
* @property {ValueBinding} valueBinding - Immutable binding scoped to the body.
|
|
891
|
+
* @property {Block} body - Loop body.
|
|
892
|
+
* @property {SourceLocation} location - Complete loop source location.
|
|
893
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
894
|
+
*/
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* @typedef ForEachMapStatement
|
|
898
|
+
* @property {"ForEachMapStatement"} kind - Insertion-ordered map pair-iteration discriminator.
|
|
899
|
+
* @property {string} [id] - Deterministic module-local loop identity, required after frontend validation.
|
|
900
|
+
* @property {Expression} map - Ordered-map expression evaluated exactly once before traversal.
|
|
901
|
+
* @property {ValueBinding} keyBinding - Immutable string-key binding scoped to the body.
|
|
902
|
+
* @property {ValueBinding} valueBinding - Immutable homogeneous value binding scoped to the body.
|
|
903
|
+
* @property {Block} body - Loop body.
|
|
904
|
+
* @property {SourceLocation} location - Complete loop source location.
|
|
905
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
906
|
+
*/
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* @typedef WhileStatement
|
|
910
|
+
* @property {"WhileStatement"} kind - Strict-Boolean pre-condition loop discriminator.
|
|
911
|
+
* @property {string} [id] - Deterministic module-local loop identity, required after frontend validation.
|
|
912
|
+
* @property {Expression} condition - Boolean expression evaluated before every iteration.
|
|
913
|
+
* @property {Block} body - Ordered loop body.
|
|
914
|
+
* @property {SourceLocation} location - Complete loop source location.
|
|
915
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
916
|
+
*/
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* @typedef BreakStatement
|
|
920
|
+
* @property {"BreakStatement"} kind - Nearest-loop break discriminator.
|
|
921
|
+
* @property {string} [targetLoopId] - Resolved nearest-loop identity, required after frontend validation in loop context.
|
|
922
|
+
* @property {SourceLocation} location - Keyword source location.
|
|
923
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
924
|
+
*/
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* @typedef ContinueStatement
|
|
928
|
+
* @property {"ContinueStatement"} kind - Nearest-loop continue discriminator.
|
|
929
|
+
* @property {string} [targetLoopId] - Resolved nearest-loop identity, required after frontend validation in loop context.
|
|
930
|
+
* @property {SourceLocation} location - Keyword source location.
|
|
931
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
932
|
+
*/
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* @typedef ErrorConstruction
|
|
936
|
+
* @property {"ErrorConstruction"} kind - Construction of one declared unchecked error.
|
|
937
|
+
* @property {ErrorType} error - Exact nominal error type.
|
|
938
|
+
* @property {Expression} message - Sole immutable string payload.
|
|
939
|
+
* @property {SourceLocation} location - Complete construction source location.
|
|
940
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned type and message ranges.
|
|
941
|
+
*/
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* @typedef RaiseStatement
|
|
945
|
+
* @property {"RaiseStatement"} kind - Abrupt unchecked-error propagation.
|
|
946
|
+
* @property {ErrorConstruction} error - Exact constructed semantic error.
|
|
947
|
+
* @property {SourceLocation} location - Complete raise source location.
|
|
948
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned raise range.
|
|
949
|
+
*/
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* @typedef CatchBinding
|
|
953
|
+
* @property {"CatchBinding"} kind - Exact-handler binding discriminator.
|
|
954
|
+
* @property {string} name - Handler-local binding name.
|
|
955
|
+
* @property {ErrorType} type - Exact caught nominal error type.
|
|
956
|
+
* @property {false} mutable - Catch bindings are immutable.
|
|
957
|
+
* @property {SourceLocation} location - Binding source location.
|
|
958
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned binding range.
|
|
959
|
+
*/
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* @typedef TryStatement
|
|
963
|
+
* @property {"TryStatement"} kind - One body and one exact typed handler.
|
|
964
|
+
* @property {Block} body - Protected body.
|
|
965
|
+
* @property {ErrorType} catchType - Exact caught nominal error type.
|
|
966
|
+
* @property {CatchBinding} catchBinding - Immutable handler-local binding.
|
|
967
|
+
* @property {Block} catchBody - Handler body.
|
|
968
|
+
* @property {SourceLocation} location - Complete try/handler source location.
|
|
969
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned try/catch ranges.
|
|
970
|
+
*/
|
|
971
|
+
|
|
391
972
|
/** @typedef {LocalDeclaration | AssignmentStatement} LocalStatement */
|
|
392
|
-
/** @typedef {LocalStatement | IfStatement | ReturnStatement | PrintStatement} Statement */
|
|
973
|
+
/** @typedef {LocalStatement | PrivateFieldWriteStatement | ExpressionStatement | IfStatement | ForEachStatement | ForEachMapStatement | WhileStatement | BreakStatement | ContinueStatement | ReturnStatement | PrintStatement | RaiseStatement | TryStatement} Statement */
|
|
393
974
|
|
|
394
975
|
/**
|
|
395
976
|
* @typedef Block
|
|
@@ -402,14 +983,95 @@
|
|
|
402
983
|
/**
|
|
403
984
|
* @typedef FunctionDeclaration
|
|
404
985
|
* @property {"FunctionDeclaration"} kind - Node discriminator.
|
|
986
|
+
* @property {string} [id] - Deterministic module-local declaration identity, required after frontend validation.
|
|
405
987
|
* @property {string} name - Function name.
|
|
988
|
+
* @property {TypeParameter[]} [typeParameters] - Ordered declaration-scoped invariant unbounded parameters.
|
|
406
989
|
* @property {Parameter[]} parameters - Function parameters.
|
|
407
|
-
* @property {
|
|
990
|
+
* @property {SemanticFunctionReturnType} returnType - Return type.
|
|
408
991
|
* @property {Block} body - Function body.
|
|
409
992
|
* @property {SourceLocation} location - Source location.
|
|
410
993
|
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
411
994
|
*/
|
|
412
995
|
|
|
996
|
+
/**
|
|
997
|
+
* @typedef RecordField
|
|
998
|
+
* @property {"RecordField"} kind - Closed record-field discriminator.
|
|
999
|
+
* @property {string} [id] - Stable module-local field identity, required after frontend validation.
|
|
1000
|
+
* @property {string} name - Field name.
|
|
1001
|
+
* @property {SemanticValueType} type - Exact field type.
|
|
1002
|
+
* @property {SourceLocation} location - Field declaration source location.
|
|
1003
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned name/type ranges.
|
|
1004
|
+
*/
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* @typedef RecordDeclaration
|
|
1008
|
+
* @property {"RecordDeclaration"} kind - Nominal closed immutable record declaration.
|
|
1009
|
+
* @property {string} [id] - Stable module-local declaration identity, required after frontend validation.
|
|
1010
|
+
* @property {string} name - Record name.
|
|
1011
|
+
* @property {TypeParameter[]} [typeParameters] - Ordered declaration-scoped invariant unbounded parameters.
|
|
1012
|
+
* @property {RecordField[]} fields - Ordered unique visible fields.
|
|
1013
|
+
* @property {SourceLocation} location - Complete declaration source location.
|
|
1014
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned declaration-name range.
|
|
1015
|
+
*/
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* @typedef PrivateField
|
|
1019
|
+
* @property {"PrivateField"} kind - Declaring-class-private mutable instance field.
|
|
1020
|
+
* @property {string} [id] - Stable class-scoped field identity, required after validation.
|
|
1021
|
+
* @property {string} name - Source-visible field name inside the declaring class only.
|
|
1022
|
+
* @property {SemanticValueType} type - Exact field type.
|
|
1023
|
+
* @property {SourceLocation} location - Field declaration location.
|
|
1024
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned name/type ranges.
|
|
1025
|
+
*/
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* @typedef ConstructorDeclaration
|
|
1029
|
+
* @property {"ConstructorDeclaration"} kind - Exact complete private-state initializer.
|
|
1030
|
+
* @property {string} [id] - Stable class-scoped constructor identity, required after validation.
|
|
1031
|
+
* @property {Parameter[]} parameters - Exact positional constructor signature.
|
|
1032
|
+
* @property {Block} body - Field-order initialization body.
|
|
1033
|
+
* @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
|
|
1034
|
+
* @property {string[]} [failureIds] - Ordered capability failures reachable through construction.
|
|
1035
|
+
* @property {SourceLocation} location - Complete constructor location.
|
|
1036
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned constructor range.
|
|
1037
|
+
*/
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* @typedef MethodDeclaration
|
|
1041
|
+
* @property {"MethodDeclaration"} kind - Receiver-bound class method.
|
|
1042
|
+
* @property {string} [id] - Stable class-scoped method identity, required after validation.
|
|
1043
|
+
* @property {string} name - Source-visible method name.
|
|
1044
|
+
* @property {Parameter[]} parameters - Exact positional method signature.
|
|
1045
|
+
* @property {SemanticFunctionReturnType} returnType - Exact return type.
|
|
1046
|
+
* @property {Block} body - Method body.
|
|
1047
|
+
* @property {readonly ["host"]} [effects] - Inferred checked host-effect fact.
|
|
1048
|
+
* @property {string[]} [failureIds] - Ordered capability failures reachable through the method.
|
|
1049
|
+
* @property {SourceLocation} location - Complete method location.
|
|
1050
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned method-name range.
|
|
1051
|
+
*/
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* @typedef ClassDeclaration
|
|
1055
|
+
* @property {"ClassDeclaration"} kind - Nominal reference class with private mutable state.
|
|
1056
|
+
* @property {string} [id] - Stable module-local class identity, required after validation.
|
|
1057
|
+
* @property {string} name - Source-visible class name.
|
|
1058
|
+
* @property {PrivateField[]} fields - Ordered private instance state.
|
|
1059
|
+
* @property {ConstructorDeclaration} constructor - Sole exact constructor.
|
|
1060
|
+
* @property {MethodDeclaration[]} methods - Ordered receiver methods.
|
|
1061
|
+
* @property {{kind: "ordinary"} | {kind: "ownedResource", fieldId: string, resourceId: string}} [ownership] - Explicit class ownership profile.
|
|
1062
|
+
* @property {SourceLocation} location - Complete class location.
|
|
1063
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned class-name range.
|
|
1064
|
+
*/
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* @typedef ErrorDeclaration
|
|
1068
|
+
* @property {"ErrorDeclaration"} kind - Nominal unchecked error with one immutable string message.
|
|
1069
|
+
* @property {string} [id] - Stable module-local declaration identity, required after frontend validation.
|
|
1070
|
+
* @property {string} name - Error type name.
|
|
1071
|
+
* @property {SourceLocation} location - Complete declaration source location.
|
|
1072
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned declaration-name range.
|
|
1073
|
+
*/
|
|
1074
|
+
|
|
413
1075
|
/**
|
|
414
1076
|
* @typedef PrintStatement
|
|
415
1077
|
* @property {"PrintStatement"} kind - Node discriminator.
|
|
@@ -429,6 +1091,10 @@
|
|
|
429
1091
|
/**
|
|
430
1092
|
* @typedef SemanticModule
|
|
431
1093
|
* @property {"Module"} kind - Node discriminator.
|
|
1094
|
+
* @property {RecordDeclaration[]} [records] - Top-level nominal record declarations in source order; omitted when empty.
|
|
1095
|
+
* @property {ClassDeclaration[]} [classes] - Top-level nominal reference classes in source order; omitted when empty.
|
|
1096
|
+
* @property {ErrorDeclaration[]} [errors] - Top-level nominal unchecked error declarations in source order; omitted when empty.
|
|
1097
|
+
* @property {EffectCapabilityDeclaration[]} [capabilities] - Compiler-authorized Task 034 declarations; omission is the legacy empty set.
|
|
432
1098
|
* @property {FunctionDeclaration[]} functions - Top-level functions.
|
|
433
1099
|
* @property {EntryPoint} entryPoint - Executable entry point.
|
|
434
1100
|
* @property {SourceLocation} location - Source location.
|
|
@@ -436,7 +1102,92 @@
|
|
|
436
1102
|
* @property {SemanticProvenance} [provenance] - Parser-authored source and identity index; optional for legacy caller-authored modules.
|
|
437
1103
|
*/
|
|
438
1104
|
|
|
439
|
-
/**
|
|
1105
|
+
/**
|
|
1106
|
+
* @typedef SemanticImport
|
|
1107
|
+
* @property {"Import"} kind - Node discriminator.
|
|
1108
|
+
* @property {string} moduleId - Stable imported semantic module identity.
|
|
1109
|
+
* @property {string} importedName - Exported declaration name in the source module.
|
|
1110
|
+
* @property {string} localName - Binding name visible in the importing module.
|
|
1111
|
+
* @property {SemanticDeclarationKind} symbolKind - Imported declaration namespace.
|
|
1112
|
+
* @property {string} declarationId - Stable resolved declaration identity.
|
|
1113
|
+
* @property {boolean} typeOnly - Whether source syntax admitted only type-position use.
|
|
1114
|
+
* @property {SourceLocation} location - Complete import declaration/specifier location.
|
|
1115
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned import ranges.
|
|
1116
|
+
* @property {StdlibFacadeResolutionEvidence} [stdlibFacade] - Exact parser-proved native facade identity evidence.
|
|
1117
|
+
*/
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* @typedef StdlibFacadeResolutionEvidence
|
|
1121
|
+
* @property {"SemantifoldStdlibFacadeResolution"} schema - Evidence schema.
|
|
1122
|
+
* @property {1} version - Evidence version.
|
|
1123
|
+
* @property {string} facadeIdentity - Selected facade identity.
|
|
1124
|
+
* @property {string} facadeVersion - Selected exact facade version.
|
|
1125
|
+
* @property {string} nativeModule - Parser-proved source stdlib module identity.
|
|
1126
|
+
* @property {string} nativeSymbol - Parser-proved source stdlib symbol identity.
|
|
1127
|
+
*/
|
|
1128
|
+
|
|
1129
|
+
/**
|
|
1130
|
+
* @typedef SemanticExport
|
|
1131
|
+
* @property {"Export"} kind - Node discriminator.
|
|
1132
|
+
* @property {string} exportedName - Name visible to importing modules.
|
|
1133
|
+
* @property {SemanticDeclarationKind} symbolKind - Exported declaration namespace.
|
|
1134
|
+
* @property {string} declarationId - Stable exported declaration identity.
|
|
1135
|
+
* @property {SourceLocation} location - Complete export declaration/specifier location.
|
|
1136
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Parser-owned export ranges.
|
|
1137
|
+
*/
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* @typedef SemanticProgramModule
|
|
1141
|
+
* @property {"Module"} kind - Node discriminator.
|
|
1142
|
+
* @property {string} id - Stable caller-supplied logical module identity.
|
|
1143
|
+
* @property {string} sourceFilename - Explicit source filename; never an implicit read request.
|
|
1144
|
+
* @property {RecordDeclaration[]} [records] - Top-level nominal record declarations.
|
|
1145
|
+
* @property {ClassDeclaration[]} [classes] - Compiler-owned facade reference classes.
|
|
1146
|
+
* @property {ErrorDeclaration[]} [errors] - Top-level nominal unchecked error declarations.
|
|
1147
|
+
* @property {FunctionDeclaration[]} functions - Top-level functions.
|
|
1148
|
+
* @property {SemanticImport[]} imports - Resolved imports in source order.
|
|
1149
|
+
* @property {SemanticExport[]} exports - Resolved exports in source order.
|
|
1150
|
+
* @property {EffectCapabilityDeclaration[]} [capabilities] - Authority declarations shared by reference when the program declares a standard-library contract.
|
|
1151
|
+
* @property {EntryPoint} [entryPoint] - Sole executable entry point, present only on the selected module.
|
|
1152
|
+
* @property {SourceLocation} location - Source location.
|
|
1153
|
+
* @property {SemanticNodeSourceProvenance} [sourceProvenance] - Node-associated provenance.
|
|
1154
|
+
* @property {SemanticProvenance} [provenance] - Parser-authored source and identity index.
|
|
1155
|
+
* @property {{identity: string, version: string}} [stdlibFacade] - Selected compiler-owned facade module identity.
|
|
1156
|
+
*/
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* @typedef StdlibFacadeProgramModuleDescriptor
|
|
1160
|
+
* @property {{identity: string, range: string}[]} dependencies - Versioned facade dependencies.
|
|
1161
|
+
* @property {string} identity - Facade identity.
|
|
1162
|
+
* @property {({identity: string, kind: "module", symbols: string[]} | {forms: ("unqualified-call" | "receiver-call")[], identity: string, kind: "builtin", symbols: string[]})[]} nativeModules - Exact native source identities.
|
|
1163
|
+
* @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.
|
|
1164
|
+
* @property {{module: string, operations: string[], range: string}[]} requirements - Canonical capability requirements.
|
|
1165
|
+
* @property {string} runtimeProfile - Exact source runtime profile.
|
|
1166
|
+
* @property {string} sourceModule - Compiler-owned semantic module identity.
|
|
1167
|
+
* @property {string} version - Exact facade version.
|
|
1168
|
+
* @property {"internal" | "public"} visibility - Native-selectable visibility.
|
|
1169
|
+
*/
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* @typedef StdlibFacadeProgramDescriptor
|
|
1173
|
+
* @property {"SemantifoldStdlibFacades"} schema - Facade descriptor schema.
|
|
1174
|
+
* @property {1} version - Facade descriptor version.
|
|
1175
|
+
* @property {SemanticLanguage} language - Source-language compatibility profile.
|
|
1176
|
+
* @property {StdlibFacadeProgramModuleDescriptor[]} modules - Dependency-first selected executable closure.
|
|
1177
|
+
*/
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* @typedef SemanticProgram
|
|
1181
|
+
* @property {"Program"} kind - Node discriminator.
|
|
1182
|
+
* @property {SemanticProgramModule[]} modules - Dependency-first deterministic module order.
|
|
1183
|
+
* @property {string} entryModule - Stable identity of the sole entry module.
|
|
1184
|
+
* @property {RegisteredSource[]} sources - Caller-order complete source registry.
|
|
1185
|
+
* @property {{contractVersion?: string, identity: string}} [stdlibContract] - Declared standard-library contract; plain, never frozen.
|
|
1186
|
+
* @property {{contractVersion?: string, identity: string}[]} [stdlibContracts] - Ordered declared standard-library contracts; plain, never frozen.
|
|
1187
|
+
* @property {StdlibFacadeProgramDescriptor} [stdlibFacades] - Complete selected source-language facade closure.
|
|
1188
|
+
*/
|
|
1189
|
+
|
|
1190
|
+
/** @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 */
|
|
440
1191
|
/** @typedef {SemanticNode} SemanticNodeWithoutLocations */
|
|
441
1192
|
|
|
442
1193
|
export {}
|