inktree 0.1.0

An incremental syntax tree engine for fast, expressive language tooling in Rust
Documentation
use crate::{Parseable, chumsky_ext::BuilderParser};

pub trait Syntax: cstree::Syntax + 'static {
    type Root: Parseable<Syntax = Self>;
    fn static_text(self) -> Option<&'static str>;

    fn from_raw(raw: cstree::RawSyntaxKind) -> Self;

    fn into_raw(self) -> cstree::RawSyntaxKind;

    fn parser<'src, 'cache, 'interner, 'borrow, 'extra, Err>(
        self,
    ) -> impl BuilderParser<'src, 'cache, 'interner, 'borrow, (), Err, Self>
    where
        Err: chumsky::error::Error<'src, &'src str> + 'extra,
        'interner: 'cache,
        'borrow: 'interner,
        'src: 'extra,
        'cache: 'extra;
}