cyrs-syntax 0.1.0

Lossless CST and recovering parser for Cypher / GQL (spec 0001 §4).
Documentation

cyrs-syntax

crates.io docs.rs CI MSRV License: Apache-2.0 OR MIT

Lossless concrete syntax tree (CST) and recovering parser for Cypher / GQL. Layer 1 of the cyrs frontend stack.

Built on rowan and logos. The parser recovers from syntax errors so editor-grade tooling (LSP, formatter) can keep analysing partial code. See spec 0001 §4.

For the full story — architecture, dependency graph, and testing bar — see the repo-root README.

Span convention

cyrs uses byte offsets for every span — TextRange is the canonical type and embedders should treat its endpoints as half-open byte indices into the original source. Line/column conversion is owned by LineIndex and only happens at LSP and diagnostic-render boundaries; everything inside the analysis pipeline (parser, HIR, diagnostics, formatter) stays in byte-offset land. The [TextRangeExt] trait in range_ext provides the canonical sugar (as_byte_range, as_u32_range, intersects) so consumers don't roll their own one-line conversions.

License

Licensed under either of

at your option.