Function dynparser::ast::flat::get_nodename
source · Expand description
It will get the node name of a node if it’s a rule one (begin or end). In other case, it will return an error
use dynparser::ast::flat;
let node = flat::Node::BeginRule("aaa".to_string());
let node_name = flat::get_nodename(&node).unwrap();
assert!(node_name == "aaa");