layered_nlp/ll_line/x/
attr_eq.rs

1use super::{LLLine, ToIdx, XDirection, XMatch};
2
3pub struct AttrEq<'a, Attr> {
4    pub(crate) attr: &'a Attr,
5}
6
7impl<'l, Attr: PartialEq + 'static> XMatch<'l> for AttrEq<'_, Attr> {
8    type Out = ();
9
10    fn go<M>(&self, direction: &M, ll_line: &'l LLLine) -> Vec<(Self::Out, ToIdx)>
11    where
12        M: XDirection<'l>,
13    {
14        direction.attr_eq(self.attr, ll_line)
15    }
16}