lehit 0.2.0

Embeddable Lehit language frontend and Cranelift JIT runtime
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use chumsky::prelude::*;

use crate::parsing::{Span, lexer::Token};

#[derive(Debug, Clone)]
pub struct Mutable {
    pub span: Span,
}

pub(crate) fn mutable_parser<'src, I>()
-> impl Parser<'src, I, Mutable, extra::Err<Rich<'src, Token, Span>>> + Clone
where
    I: Input<'src, Token = Token, Span = Span>,
{
    just(Token::MutKw).to_span().map(|span| Mutable { span })
}