Macro ast_parser_maker

Source
ast_parser_maker!() { /* proc-macro */ }
Expand description

Accepts a single grammar rule. This macro will only generate a parser for a data structure, it expects you to supply with a data structure yourself. This was added to allow for custom derives and visibility modifiers for data structures.

Example:

use tree_builder::ast_parser_maker;

#[derive(Clone, Debug)]
pub struct Digit(String);

ast_parser_maker!{
    Digit => @#d*
}