mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 11:46:42 +01:00
wip: wee
This commit is contained in:
parent
d6e8be6ce5
commit
f77139c8fd
5 changed files with 68 additions and 59 deletions
|
|
@ -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>>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue