Macro python_ast::tk_method
[−]
[src]
macro_rules! tk_method { ($name:ident, 'b, <$a:ty,$o:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => { ... }; ($name:ident, 'b, <$a:ty,$o:ty,$e:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => { ... }; (pub $name:ident, 'b, <$a:ty,$o:ty>, mut $self_:ident, $submac:ident!( $($args:tt)* )) => { ... }; }
Makes a method from a parser combination
The must be set up because the compiler needs the information
tk_method!(my_function<Parser<'a> >( TkSlice<'a> ) -> TkSlice<'a>, tag!("abcd")); // first type parameter is `self`'s type, second is input, third is output tk_method!(my_function<Parser<'a>, TkSlice<'a>, TkSlice<'a>>, tag!("abcd")); //prefix them with 'pub' to make the methods public tk_method!(pub my_function<Parser<'a>,TkSlice<'a>, TkSlice<'a>>, tag!("abcd"));
Other rules to this macro have been deleted for anti kruft enforcement and can be regenerated with tools/gen-macro-redefs