lemmy_help/
parser.rs

1mod node;
2pub use node::*;
3mod tags;
4pub use tags::*;
5
6macro_rules! impl_parse {
7    ($id: ident, $ret: ty, $body: expr) => {
8        impl $id {
9            pub fn parse() -> impl chumsky::Parser<
10                $crate::lexer::TagType,
11                $ret,
12                Error = chumsky::prelude::Simple<$crate::lexer::TagType>,
13            > {
14                $body
15            }
16        }
17    };
18    ($id: ident, $body: expr) => {
19        crate::parser::impl_parse!($id, Self, $body);
20    };
21}
22
23pub(super) use impl_parse;