Updated macros to match new generics and associated types
This commit is contained in:
parent
5667c81095
commit
9d3f2816a4
@ -1,7 +1,7 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
mod _keyword_impls;
|
||||
// mod macros;
|
||||
mod macros;
|
||||
|
||||
pub trait Predicate<C> {
|
||||
fn check(&mut self, chr: C) -> bool;
|
||||
|
||||
@ -10,7 +10,7 @@ macro_rules! builder_trait_decl {
|
||||
) => {
|
||||
$scope trait $name
|
||||
<
|
||||
'source, 'pos, 'builder, C, P:Pos<'pos>, CS:CollectedSubstring<'source, C>
|
||||
'source, 'pos, P:Pos<'pos>, CS:CollectedSubstring<'source>
|
||||
$(, $generic0Name $(: $generic0Bound)? $(, $genericNName $(: $genericNBound)?)* )?
|
||||
>
|
||||
$(: $base0 $(, $baseN)*)?
|
||||
@ -28,8 +28,8 @@ macro_rules! builder_trait_decl {
|
||||
) => {
|
||||
$scope trait $name
|
||||
<
|
||||
'source, 'pos, 'builder, $lifetime0Name $(, $lifetimeNName)*,
|
||||
C, P: Pos<'pos>, CS: CollectedSubstring<'source, C>
|
||||
'source, 'pos, $lifetime0Name $(, $lifetimeNName)*,
|
||||
P: Pos<'pos>, CS: CollectedSubstring<'source>
|
||||
$(, $genericNName $(: $genericNBound)?)*
|
||||
>
|
||||
$(: $base0 $(, $baseN)*)?
|
||||
|
||||
@ -9,7 +9,7 @@ macro_rules! builder_type_t {
|
||||
) => {
|
||||
$name
|
||||
<
|
||||
'source, 'pos, 'builder, C, P, CS
|
||||
'source, 'pos, P, CS
|
||||
$(, $generic0Name $(, $genericNName)*)?
|
||||
>
|
||||
|
||||
@ -23,8 +23,8 @@ macro_rules! builder_type_t {
|
||||
) => {
|
||||
$name
|
||||
<
|
||||
'source, 'pos, 'builder, $lifetime0Name $(, $lifetimeNName)*,
|
||||
C, P, CS $(, $genericNName)*
|
||||
'source, 'pos, $lifetime0Name $(, $lifetimeNName)*,
|
||||
P, CS $(, $genericNName)*
|
||||
>
|
||||
};
|
||||
|
||||
@ -37,7 +37,7 @@ macro_rules! builder_type_t {
|
||||
) => {
|
||||
impl $name
|
||||
<
|
||||
'source, 'pos, 'builder, C, P, CS
|
||||
'source, 'pos, P, CS
|
||||
$(, $generic0Name $(, $genericNName)*)?
|
||||
>
|
||||
|
||||
@ -51,8 +51,8 @@ macro_rules! builder_type_t {
|
||||
) => {
|
||||
impl $name
|
||||
<
|
||||
'source, 'pos, 'builder, $lifetime0Name $(, $lifetimeNName)*,
|
||||
C, P, CS $(, $genericNName)*
|
||||
'source, 'pos, $lifetime0Name $(, $lifetimeNName)*,
|
||||
P, CS $(, $genericNName)*
|
||||
>
|
||||
};
|
||||
}
|
||||
@ -12,7 +12,7 @@ macro_rules! parser_fn_decl {
|
||||
) => {
|
||||
$scope fn $name
|
||||
<
|
||||
'source, 'pos, 'builder, C, P:Pos<'pos>, CS:CollectedSubstring<'source, C>
|
||||
'source, 'pos, P:Pos<'pos>, CS:CollectedSubstring<'source>
|
||||
$(, $generic0Name $(: $generic0Bound)? $(, $genericNName $(: $genericNBound)?)* )?
|
||||
>
|
||||
($srcName: $srcType $(, $argNName : $argNType)*)
|
||||
@ -33,8 +33,8 @@ macro_rules! parser_fn_decl {
|
||||
) => {
|
||||
$scope fn $name
|
||||
<
|
||||
'source, 'pos, 'builder, $lifetime0Name $(, $lifetimeNName)*,
|
||||
C, P: Pos<'pos>, CS: CollectedSubstring<'source, C>
|
||||
'source, 'pos, $lifetime0Name $(, $lifetimeNName)*,
|
||||
P: Pos<'pos>, CS: CollectedSubstring<'source>
|
||||
$(, $genericNName $(: $genericNBound)?)*
|
||||
>
|
||||
($srcName: $srcType $(, $argNName : $argNType)*)
|
||||
@ -54,10 +54,10 @@ macro_rules! parser_fn_decl {
|
||||
) => {
|
||||
$scope fn $name
|
||||
<
|
||||
'source, 'pos, 'builder, C, P:Pos<'pos>, CS:CollectedSubstring<'source, C>
|
||||
'source, 'pos, P:Pos<'pos>, CS:CollectedSubstring<'source>
|
||||
$(, $generic0Name $(: $generic0Bound)? $(, $genericNName $(: $genericNBound)?)* )?
|
||||
>
|
||||
($srcName: &'source mut impl SourceStream<'source, 'pos, C, P, CS> $(, $argNName : $argNType)*)
|
||||
($srcName: &'source mut impl SourceStream<'source, 'pos, P=P, CS=CS> $(, $argNName : $argNType)*)
|
||||
$(-> $ret)?
|
||||
$body
|
||||
};
|
||||
@ -75,11 +75,11 @@ macro_rules! parser_fn_decl {
|
||||
) => {
|
||||
$scope fn $name
|
||||
<
|
||||
'source, 'pos, 'builder, $lifetime0Name $(, $lifetimeNName)*,
|
||||
C, P: Pos<'pos>, CS: CollectedSubstring<'source, C>
|
||||
'source, 'pos, $lifetime0Name $(, $lifetimeNName)*,
|
||||
P: Pos<'pos>, CS: CollectedSubstring<'source>
|
||||
$(, $genericNName $(: $genericNBound)?)*
|
||||
>
|
||||
($srcName: &'source mut impl SourceStream<'source, 'pos, C, P, CS> $(, $argNName : $argNType)*)
|
||||
($srcName: &'source mut impl SourceStream<'source, 'pos, P=P, CS=CS> $(, $argNName : $argNType)*)
|
||||
$(-> $ret)?
|
||||
$body
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user