lib-script · crate

kinogaki-script-syntax

Libraryenvironment

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.

Repository
lib-script (kinogaki/lib-script)
Folder
libs/lib-script/crates/syntax
Source
10 files, 2,147 lines
Tests
1 file, 98 lines
depends onused by tests alonedependencies for tests alone are listed below, not drawn

What it is

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.

The language is Python-like (blocks by indentation, # comments, def, if/elif/else, for x in ..., while, param), with static types checked by kinogaki-script-types. See docs/LANGUAGE.md.

Depends on

None.

Third-party

None.

Used by

CrateRepositoryAsWhat it is
kinogaki-script-benchlib-scriptnormalBenchmarks on the test host, 1M elements: cargo run --release -p kinogaki-script-bench.
kinogaki-script-execlib-scriptnormallib-script's engine: a column (batch) interpreter in safe Rust.
kinogaki-script-irlib-scriptnormallib-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-typeslib-scriptnormallib-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.
kinogaki-scriptingCore and the appnormalScripts over the standard values: lib-script's engine behind the SDK's ScriptEngine, and what a script sees of each value.

Modules

Public types and traits

At the crate root

Structs DiagnosticLineIndexLocatedParsedSpan

Enums Severity

By module: 26 public types and traits in 7 modules

ast ArgBinOpBlockCmpOpDefDefParamExprExprKindIdentModuleStmtStmtKindTypeExprUnOp

diag DiagnosticLocatedSeverity

highlight Class

lexer Lexed

parser Parsed

span LineIndexSpan

token KeywordPunctTokenTokenKind

Besides these, 3 public functions at module level.