Skip to main content

Crate cyrs

Crate cyrs 

Source
Expand description

cypher — meta-crate re-exporting the full front-end library surface.

Consumers that want “everything for parsing Cypher and turning it into a typed plan” depend on this crate. Consumers with tighter needs (parse-only, schema-only, etc.) depend on the specific member crate.

Feature flags (spec 0001 §17.15):

  • default — full library surface: core + fmt + schema
  • lsp-only — library deps consumed by the LSP binary (core + fmt)
  • fmt-only — formatter slice (core + fmt)
  • schema-only — schema / type-system slice (core + schema)
  • no-default-features — empty; downstream picks slices explicitly

Note: cyrs-lsp is a pure binary crate (no lib target), so it is not re-exported here. Use cargo check -p cyrs-lsp to verify the LSP binary compiles.

Spec 0001 §3.1.

Re-exports§

pub use cyrs_ast as ast;
pub use cyrs_db as db;
pub use cyrs_diag as diag;
pub use cyrs_hir as hir;
pub use cyrs_plan as plan;
pub use cyrs_sema as sema;
pub use cyrs_syntax as syntax;
pub use cyrs_fmt as fmt;
pub use cyrs_project as project;
pub use cyrs_schema as schema;

Structs§

CypherDatabase
The concrete incremental database (Salsa 2022-style, spec §11.1).
Database
Workspace-scoped incremental analysis database (spec §11).
Diagnostic
A single diagnostic. Spec §10.1.
EmptySchema
A SchemaProvider that reports nothing. Useful for schema-free mode and for unit tests that do not want to construct a full schema.
FileId
A stable, workspace-scoped file identity (spec §11.4).
Parse
A completed parse: green tree + accumulated syntax errors.
ParseOutput
Memoised result of parsing a SourceFile.
SourceFile
A single source file tracked by the incremental database.

Enums§

DiagCode
Stable diagnostic code. Rendered as E0001 / W6001 / N8001.
DialectMode
Dialect mode selected at parse time. Spec §9.
Severity
Diagnostic severity (spec §10.3). Error failures set exit code 1 in cypher check; the others are informational.
SyntaxKind
Every syntactic category in Cypher: tokens, nodes, and meta.

Traits§

CypherDb
Trait that all concrete databases in this workspace implement.
SchemaProvider
The single trait consumers implement to feed schema into the front-end.

Functions§

parse
Entry point. Parses a complete source file.