1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use crate::*;
/// One of the childs of a node
///
/// You probably don't need to use this struct unless
/// you want to inspect the binary expression tree.
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Child {
None,
Node(NodeId),
Atom(AtomId),
}
impl Child {
pub fn is_some(self) -> bool {
match self {
Self::None => false,
_ => true,
}
}
}