wip: updating tests
Some checks are pending
/ build (push) Waiting to run

This commit is contained in:
🪞👃🪞 2025-06-12 21:17:08 +03:00
parent 21832453d9
commit 17506726cb
36 changed files with 280 additions and 271 deletions

View file

@ -3,6 +3,10 @@ use crate::*;
/// CST stores strings as source references and expressions as new [SourceIter] instances.
pub type CstValue<'source> = Value<&'source str, SourceIter<'source>>;
/// Token sharing memory with source reference.
#[derive(Debug, Copy, Clone, Default, PartialEq)]
pub struct CstToken<'source>(pub CstValue<'source>, pub CstMeta<'source>);
/// Reference to the source slice.
#[derive(Debug, Copy, Clone, Default, PartialEq)] pub struct CstMeta<'source> {
pub source: &'source str,
@ -10,10 +14,6 @@ pub type CstValue<'source> = Value<&'source str, SourceIter<'source>>;
pub length: usize,
}
/// Token sharing memory with source reference.
#[derive(Debug, Copy, Clone, Default, PartialEq)]
pub struct CstToken<'source>(pub CstValue<'source>, pub CstMeta<'source>);
impl<'source> CstToken<'source> {
pub const fn new (
source: &'source str, start: usize, length: usize, value: CstValue<'source>