1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::*;

/// One of the children 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 {
        !matches!(self, Self::None)
    }
}