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 PubVisible {
    pub span: Span,
}

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