layered_nlp/ll_line/x/attr.rs
1use super::{LLLine, ToIdx, XDirection, XMatch};
2
3pub struct Attr<Attr>(pub(crate) std::marker::PhantomData<Attr>);
4
5impl<'l, A: 'static> XMatch<'l> for Attr<A> {
6 type Out = &'l A;
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.attr::<A>(ll_line)
13 }
14}