layered_nlp/ll_line/x/token_text.rs
1use super::{LLLine, ToIdx, XDirection, XMatch};
2
3pub struct TokenText(pub(crate) ());
4
5impl<'l> XMatch<'l> for TokenText {
6 type Out = &'l str;
7
8 fn go<M>(&self, direction: &M, ll_line: &'l LLLine) -> Vec<(Self::Out, ToIdx)>
9 where
10 M: XDirection<'l>,
11 {
12 direction.text_token(ll_line).into_iter().collect()
13 }
14}