summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadrieril2019-03-27 00:38:43 +0100
committerNadrieril2019-03-27 00:38:43 +0100
commitf358a9b1a7b05e300cdab41f2903187227564aa9 (patch)
treeb00936c8d05489c699ab1fe4d2979af11fa7df38
parent108c35242884b9cb5e3988e406f7983404cdf315 (diff)
Rename match_pair!() to match_children!()
-rw-r--r--dhall_core/src/parser.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/dhall_core/src/parser.rs b/dhall_core/src/parser.rs
index 99e1883..560d177 100644
--- a/dhall_core/src/parser.rs
+++ b/dhall_core/src/parser.rs
@@ -112,7 +112,7 @@ fn debug_pair(pair: Pair<Rule>) -> String {
s
}
-macro_rules! match_pair {
+macro_rules! match_children {
(@make_child_match,
($pair:expr, $($vars:tt)*),
($($outer_acc:tt)*),
@@ -120,7 +120,7 @@ macro_rules! match_pair {
($(,)* $ty:ident ($x:ident..) $($rest_of_match:tt)*) => $body:expr,
$($rest:tt)*
) => {
- match_pair!(@make_child_match,
+ match_children!(@make_child_match,
($pair, $($vars)*),
($($outer_acc)*),
($($acc)*, xs..),
@@ -142,7 +142,7 @@ macro_rules! match_pair {
($(,)* $ty:ident ($x:pat) $($rest_of_match:tt)*) => $body:expr,
$($rest:tt)*
) => {
- match_pair!(@make_child_match,
+ match_children!(@make_child_match,
($($vars)*),
($($outer_acc)*),
($($acc)*, ParsedValue::$ty($x)),
@@ -157,7 +157,7 @@ macro_rules! match_pair {
($(,)*) => $body:expr,
$($rest:tt)*
) => {
- match_pair!(@make_matches,
+ match_children!(@make_matches,
($($vars)*),
($($outer_acc)* [$($acc)*] => { $body },),
$($rest)*
@@ -170,7 +170,7 @@ macro_rules! match_pair {
($(,)*) => $body:expr,
$($rest:tt)*
) => {
- match_pair!(@make_matches,
+ match_children!(@make_matches,
($($vars)*),
($($outer_acc)* [] => { $body },),
$($rest)*
@@ -183,7 +183,7 @@ macro_rules! match_pair {
[$($args:tt)*] => $body:expr,
$($rest:tt)*
) => {
- match_pair!(@make_child_match,
+ match_children!(@make_child_match,
($($vars)*),
($($acc)*),
(),
@@ -204,7 +204,7 @@ macro_rules! match_pair {
};
(($($vars:tt)*); $( [$($args:tt)*] => $body:expr ),* $(,)*) => {
- match_pair!(@make_matches,
+ match_children!(@make_matches,
($($vars)*),
(),
$( [$($args)*] => $body ),* ,
@@ -251,7 +251,7 @@ macro_rules! make_parser {
children!( $($args:tt)* )
)
) => ({
- let res: $o = match_pair!(($pair, $children); $($args)*)?;
+ let res: $o = match_children!(($pair, $children); $($args)*)?;
Ok(ParsedValue::$group(res))
});
(@body, $pair:expr, $children:expr, rule_group!( $name:ident<$o:ty> )) => (