Macro node_matches

#[macro_export]
macro_rules! node_matches {
    ($node:expr, $( $pat:pat_param )|+) => { ... };
}

Shorthand for checking if a node's value matches the given expression.

Note this will call node.data(), which will fail if the node is already mutably borrowed.