bynk-syntax
The syntax foundation of the Bynk compiler — the lowest leaf of the compiler's layered crate set.
It holds the modules every other layer depends on and none depend up from:
lexer— thelogos-driven token stream.parser/ast— hand-written recursive descent and the syntax tree it builds.span— source byte ranges, plus theline_colposition utility.keywords— the reserved-word table.error—CompileError(the structured, spanned diagnostic every phase produces) andSeverity.diagnostics— the registry ofbynk.*diagnostic codes (the single source of truth for the codes, summaries, and grammar links).
Because diagnostics, positions, and codes all live here, they cross every crate in the compiler without an upward dependency.
Where it sits
bynk-syntax is the leaf of the layered compiler:
bynk-syntax ◀── bynk-render · bynk-fmt · bynk-check ◀── bynk-emit ◀── bynk-ide
The bynkc, bynk, and bynk-lsp binaries are front-ends over this set. Most
users compile Bynk through the bynkc or
bynk CLIs rather than depending on this crate
directly; it is published so tooling that needs only to lex or parse Bynk can do
so without linking the whole compiler.
Use
[]
= "0.110"
use ;
let tokens = tokenize?;
let unit = parse?;
See the API docs for the full surface.
License
Licensed under either of Apache-2.0 or MIT at your option.