From f3a66c3603b01cb61334caee4a4749cac166b675 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 16 Aug 2019 11:05:44 +0200 Subject: Wording --- dhall_syntax/src/parser.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'dhall_syntax/src') diff --git a/dhall_syntax/src/parser.rs b/dhall_syntax/src/parser.rs index b443656..d11eb18 100644 --- a/dhall_syntax/src/parser.rs +++ b/dhall_syntax/src/parser.rs @@ -120,52 +120,52 @@ fn debug_pair(pair: Pair) -> String { } macro_rules! make_parser { - (@child_pattern, + (@children_pattern, $varpat:ident, ($($acc:tt)*), [$variant:ident ($x:pat), $($rest:tt)*] ) => ( - make_parser!(@child_pattern, + make_parser!(@children_pattern, $varpat, ($($acc)* , Rule::$variant), [$($rest)*] ) ); - (@child_pattern, + (@children_pattern, $varpat:ident, ($($acc:tt)*), [$variant:ident ($x:ident).., $($rest:tt)*] ) => ( - make_parser!(@child_pattern, + make_parser!(@children_pattern, $varpat, ($($acc)* , $varpat..), [$($rest)*] ) ); - (@child_pattern, + (@children_pattern, $varpat:ident, (, $($acc:tt)*), [$(,)*] ) => ([$($acc)*]); - (@child_pattern, + (@children_pattern, $varpat:ident, ($($acc:tt)*), [$(,)*] ) => ([$($acc)*]); - (@child_filter, + (@children_filter, $varpat:ident, [$variant:ident ($x:pat), $($rest:tt)*] ) => ( true && - make_parser!(@child_filter, $varpat, [$($rest)*]) + make_parser!(@children_filter, $varpat, [$($rest)*]) ); - (@child_filter, + (@children_filter, $varpat:ident, [$variant:ident ($x:ident).., $($rest:tt)*] ) => ( $varpat.iter().all(|r| r == &Rule::$variant) && - make_parser!(@child_filter, $varpat, [$($rest)*]) + make_parser!(@children_filter, $varpat, [$($rest)*]) ); - (@child_filter, $varpat:ident, [$(,)*]) => (true); + (@children_filter, $varpat:ident, [$(,)*]) => (true); (@rule_alias, rule!( $name:ident<$o:ty>; $($args:tt)* ) @@ -234,8 +234,8 @@ macro_rules! make_parser { match children_rules.as_slice() { $( - make_parser!(@child_pattern, x, (), [$($args)*,]) - if make_parser!(@child_filter, x, [$($args)*,]) + make_parser!(@children_pattern, x, (), [$($args)*,]) + if make_parser!(@children_filter, x, [$($args)*,]) => { let ret = improved_slice_patterns::destructure_iter!(iter; -- cgit v1.2.3