This commit is contained in:
🪞👃🪞 2025-05-26 23:21:38 +03:00
parent d6e8be6ce5
commit f77139c8fd
5 changed files with 68 additions and 59 deletions

View file

@ -1,7 +1,8 @@
use crate::*;
/// Keeps the reference to the source slice.
pub type CstToken<'source> = Token<CstValue<'source>, CstMeta<'source>>;
#[derive(Debug, Copy, Clone, Default, PartialEq)]
pub struct CstToken<'source>(pub CstValue<'source>, pub CstMeta<'source>);
#[derive(Debug, Copy, Clone, Default, PartialEq)] pub struct CstMeta<'source> {
pub source: &'source str,
@ -9,9 +10,4 @@ pub type CstToken<'source> = Token<CstValue<'source>, CstMeta<'source>>;
pub length: usize,
}
pub type CstValue<'source> = Value<&'source str, CstExp<'source>>;
#[derive(Debug, Copy, Clone, Default, PartialEq)] pub struct CstExp<'source> {
pub depth: usize,
pub words: SourceIter<'source>
}
pub type CstValue<'source> = Value<&'source str, SourceIter<'source>>;