macro_rules! node_in_pool {
($parsed: ident, $name: ident) => { ... };
}
Expand description
Shorthand for extracting a crate::Node
from a crate::Parser
.
ยงExample
use org_rust_parser as org_parser;
use org_parser::{Expr, node_in_pool, parse_org, Node};
let ret_parse = parse_org("* Hello world!\n");
let heading_expr: &Node = node_in_pool!(ret_parse, Heading).unwrap();