#![expect(clippy::todo, reason = "skeleton: #6835")]
use core::marker::PhantomData;
use super::super::profile::Profile;
use super::super::token::Sink;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Delimiters<'a> {
pub open: &'a [u8],
pub close: &'a [u8],
}
impl Default for Delimiters<'_> {
fn default() -> Self {
Self {
open: b"{{",
close: b"}}",
}
}
}
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub struct LexOptions<'a> {
pub delimiters: Delimiters<'a>,
pub raw_interpolation: bool,
pub in_tag_comments: bool,
}
pub struct Lexer<'a, P: Profile, S: Sink> {
input: &'a [u8],
sink: S,
options: LexOptions<'a>,
profile: PhantomData<P>,
}
impl<'a, P: Profile, S: Sink> Lexer<'a, P, S> {
pub fn new(source: &'a str, sink: S, options: LexOptions<'a>) -> Self {
Self {
input: source.as_bytes(),
sink,
options,
profile: PhantomData,
}
}
pub fn input(&self) -> &'a [u8] {
self.input
}
pub fn options(&self) -> &LexOptions<'a> {
&self.options
}
pub fn sink(&self) -> &S {
&self.sink
}
pub fn into_sink(self) -> S {
self.sink
}
pub fn run(&mut self) {
todo!("#6835: move the template tokenizer into vize_l1::markup::lex")
}
}