Function wordshk_tools::parse_eg[][src]

pub fn parse_eg<'a>() -> BoxedParser<'a, Eg, ()>
Expand description

Parse an example for a word

For example, here’s an example for the word 便:

<eg>
zho:後邊 (hau6 bin6)
yue:#後便 (hau6 bin6)
eng:back side

// which parses to:

Eg {
    zho: Some((vec![vec![(Text, "後邊".into())]], Some("hau6 bin6".into()))),
    yue: Some((vec![vec![(Link, "後便".into())]], Some("hau6 bin6".into()))),
    eng: Some(vec![vec![(Text, "back side".into())]]),
}