use lexgen_util::Loc; pub fn ignore_pos(ret: Option>) -> Option> { ret.map(|res| res.map(|(_, a, _)| a)) } pub fn next(iter: &mut dyn Iterator>) -> Option> { ignore_pos(iter.next()) } pub fn loc(line: u32, col: u32, byte_idx: usize) -> Loc { Loc { line, col, byte_idx, } }