lib-script · crate
kinogaki-script-types
lib-script's front end after parsing: types, the host schema a context offers, the library catalog's signatures, the checker that builds the typed program, and completion and hover for the editor.
- Repository
- lib-script (kinogaki/lib-script)
- Folder
libs/lib-script/crates/types- Source
- 15 files, 4,767 lines
- Tests
- 0 files, 0 lines
What it is
lib-script's front end after parsing: types, the host schema a context offers, the library catalog's signatures, the checker that builds the typed program, and completion and hover for the editor.
Depends on
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-script-syntax | lib-script | normal | lib-script's syntax: an indentation-aware lexer, a recovering parser and a syntax tree whose every node keeps the exact span of its text. |
Third-party
None.
Used by
| Crate | Repository | As | What it is |
|---|---|---|---|
kinogaki-script-bench | lib-script | normal | Benchmarks on the test host, 1M elements: cargo run --release -p kinogaki-script-bench. |
kinogaki-script-exec | lib-script | normal | lib-script's engine: a column (batch) interpreter in safe Rust. |
kinogaki-script-host | lib-script | normal | The boundary between lib-script and a host. |
kinogaki-script-ir | lib-script | normal | lib-script's column IR: typed SSA values (vectors as groups of scalar values) in structured regions; lowering from the checked program; uniform/varying analysis; optimisation; a verifier; and the fault table that maps instructions back to source spans. |
kinogaki-script-lib | lib-script | normal | lib-script's function library. |
kinogaki-scripting | Core and the app | normal | Scripts over the standard values: lib-script's engine behind the SDK's ScriptEngine, and what a script sees of each value. |
Modules
catalogThe library's function signatures, as the checker sees them.112 linescheckThe checker: resolves names against the schema and the library, infers each local's type from its first assignment, settles overloads and implicit conversions, checks definite assignment, and builds the typed tree (crate::hir).335 linescheck::call(private)Calls: library overloads, context functions, helpers, type constructors,len, and ramp parameters.620 linescheck::expr(private)Expressions: literals, tuples, lists, operators and conditionals.291 linescheck::ops(private)Arithmetic and comparison typing.243 linescheck::place(private)Assignment targets: locals (typed by their first assignment), element fields and groups (created by writing an unknown name), components, list items and collection items.511 linescheck::resolve(private)Names, members and indexing: whatpt.P,geo.npoints,inputs[1].points[j].Cd,quat.slerp,v.xyandxs[i]mean.655 linescheck::stmt(private)Statements, parameters and helper bodies.624 lineseditorCompletion and hover for the code editor, from one check of the text.349 lineshirThe checked program: a typed tree with every name resolved, implicit conversions explicit, and tuples turned into the vectors they become.378 linesinfoFacts the checker records for the editor: hover texts at spans, what stands left of each dot, and which locals each function sees.39 linesschemaWhat a host offers a script: the current element and its fields, the output detail (geo), the inputs, and context functions.230 linestyThe language's types and their layout as scalar components.213 linesvalueValues known before running: constants, defaults and parameter values.161 lines
Public types and traits
At the crate root
Structs CatalogCheckedCompletionEnvHoverSchemaSig
Enums BaseCompletionKindKindScalarTypeValue
Type aliases FuncId
By module: 41 public types and traits in 8 modules
catalog CatalogFuncIdSig
check CheckedEnv
editor CompletionCompletionKindHover
hir ArithCompareCreatedDefDefIdExprExprKindListFieldLocalLocalIdParamInfoPlaceProgramStmt
info InfoReceiver
schema CollectionCollectionRefDetailRefEffectElementFieldFunctionGroupInputOwnerParamSchema
ty BaseKindType
value ScalarValue
Besides these, 5 public functions at module level.
