9292}
9393
9494macro_rules! compute_booleans {
95- ( $node: ident, $stats: ident, $( $typs: pat ) |* ) => {
95+ ( $node: ident, $stats: ident, $( $typs: pat_param ) |* ) => {
9696 let mut cursor = $node. object( ) . walk( ) ;
9797 for child in $node. object( ) . children( & mut cursor) {
9898 if let $( $typs ) |* = child. kind_id( ) . into( ) {
@@ -105,9 +105,9 @@ macro_rules! compute_booleans {
105105}
106106
107107macro_rules! nesting_levels {
108- ( $node: ident, $stats: ident, [ $nest_func: pat => $nest_func_stop: pat ] ,
109- [ $lambdas: pat => $( $lambdas_stop: pat ) |* ] ,
110- [ $( $nest_level: pat ) |* => $( $nest_level_stop: pat ) |* ] ) => {
108+ ( $node: ident, $stats: ident, [ $nest_func: pat_param => $nest_func_stop: pat_param ] ,
109+ [ $lambdas: pat => $( $lambdas_stop: pat_param ) |* ] ,
110+ [ $( $nest_level: pat_param ) |* => $( $nest_level_stop: pat_param ) |* ] ) => {
111111 // Find the depth of a function (the most external function is
112112 // not considered)
113113 $stats. nesting = count_specific_ancestors!( $node, $nest_func, $nest_func_stop) . max( 1 ) - 1 ;
@@ -129,8 +129,8 @@ macro_rules! nesting_levels {
129129 increment( $stats) ;
130130 } ;
131131 ( $node: ident, $stats: ident,
132- [ $lambdas: pat => $( $lambdas_stop: pat ) |* ] ,
133- [ $( $nest_level: pat ) |* => $( $nest_level_stop: pat ) |* ] ) => {
132+ [ $lambdas: pat_param => $( $lambdas_stop: pat_param ) |* ] ,
133+ [ $( $nest_level: pat_param ) |* => $( $nest_level_stop: pat_param ) |* ] ) => {
134134 // Find the depth of a lambda
135135 let lambda_depth = count_specific_ancestors!( $node, $lambdas, $( $lambdas_stop ) |* ) ;
136136
0 commit comments