Skip to main content

Crate lini

Crate lini 

Source

Structs§

Diagnostic
Error
Options
Top-level compile options threaded through every phase. Build with Options::default() and override fields with the struct-update syntax — future versions may add knobs.
Violation

Enums§

Level
OutputFormat
Rule
ServeTarget
What lini serve was pointed at — a single file, or a directory to open as the playground.
Severity

Functions§

builtin_css
The CSS for a built-in theme — the --lini-* declarations a user can copy (SPEC §14). None for an unknown name.
check
Lex, parse, and resolve. Verifies semantic correctness without running layout or render. The CLI’s --check flag goes through here.
check_parse
Lex and parse only — verifies syntactic correctness without running resolve/layout/render.
check_with
compile_str
compile_str_checked
Compile to SVG and collect the routing diagnostics in a single layout pass. The CLI’s default path needs both (the SVG to emit, the diagnostics to warn); routing through here runs the link router once instead of twice.
compile_str_with
desugar_source
Lower a source file’s sugar to primitives + .lini-* classes and print canonical .lini — what lini desugar shows: every typed instance becomes a |primitive| wearing its .lini-* chain, defines and templates collapse into generated .lini-* class defs, scene/link defaults fill the global block, and labels / along: become explicit. Comments are dropped. The lowered form re-renders identically and is a fixed point of desugar.
extract_lini_vars
Extract (name_without_lini_prefix, raw_value_string) pairs from CSS-like text. Names without the --lini- prefix are skipped — those are not Lini’s to own.
format_source
lint_str
Lex, parse, and run the lint pass. Returns warnings (no errors). Parse errors are surfaced as Err; missing lints just return an empty Vec.
list_themes
Built-in theme names + one-line descriptions, for lini theme.
pair_css
Compose two built-ins into one adaptive theme’s CSS: light’s palette as the light arm, dark’s as the dark arm. None if either name is unknown.
serve
Bind 127.0.0.1:port and serve until interrupted.
validate_str
Lex, parse, resolve, lay out, route, then validate the routing against the contract in LINKING.md. Returns the violations found (empty = clean). Parse and resolve errors surface as Err.