use crate::token::collect::all::Tokens;
use crate::util::encdec::to_text::ToText;
#[derive(PartialEq, Eq, Debug)]
pub struct LexList {
tokens: Vec<Tokens>,
}
impl LexList {
pub fn from_tokens(tokens: Vec<Tokens>) -> Self {
LexList { tokens }
}
}
impl ToText for LexList {
fn to_text(&self) -> String {
self.tokens.iter().map(ToText::to_text).collect::<Vec<_>>().join(" ")
}
}