@@ -151,10 +151,10 @@ struct MatcherPos<'a> {
151
151
top_elts : TokenTreeOrTokenTreeSlice < ' a > ,
152
152
/// The position of the "dot" in this matcher
153
153
idx : usize ,
154
- /// The beginning position in the source that the beginning of this matcher corresponds to. In
155
- /// other words, the token in the source at `sp_lo ` is matched against the first token of the
156
- /// matcher.
157
- sp_lo : Span ,
154
+ /// The first span of source source that the beginning of this matcher corresponds to. In other
155
+ /// words, the token in the source whose span is `sp_open ` is matched against the first token of
156
+ /// the matcher.
157
+ sp_open : Span ,
158
158
159
159
/// For each named metavar in the matcher, we keep track of token trees matched against the
160
160
/// metavar by the black box parser. In particular, there may be more than one match per
@@ -284,17 +284,17 @@ fn create_matches(len: usize) -> Vec<Rc<Vec<NamedMatch>>> {
284
284
}
285
285
286
286
/// Generate the top-level matcher position in which the "dot" is before the first token of the
287
- /// matcher `ms` and we are going to start matching at position `lo ` in the source.
288
- fn initial_matcher_pos ( ms : & [ TokenTree ] , lo : Span ) -> MatcherPos {
287
+ /// matcher `ms` and we are going to start matching at the span `open ` in the source.
288
+ fn initial_matcher_pos ( ms : & [ TokenTree ] , open : Span ) -> MatcherPos {
289
289
let match_idx_hi = count_names ( ms) ;
290
290
let matches = create_matches ( match_idx_hi) ;
291
291
MatcherPos {
292
292
// Start with the top level matcher given to us
293
293
top_elts : TtSeq ( ms) , // "elts" is an abbr. for "elements"
294
294
// The "dot" is before the first token of the matcher
295
295
idx : 0 ,
296
- // We start matching with byte `lo ` in the source code
297
- sp_lo : lo ,
296
+ // We start matching at the span `open ` in the source code
297
+ sp_open : open ,
298
298
299
299
// Initialize `matches` to a bunch of empty `Vec`s -- one for each metavar in `top_elts`.
300
300
// `match_lo` for `top_elts` is 0 and `match_hi` is `matches.len()`. `match_cur` is 0 since
@@ -488,7 +488,7 @@ fn inner_parse_loop<'a>(
488
488
// Add matches from this repetition to the `matches` of `up`
489
489
for idx in item. match_lo ..item. match_hi {
490
490
let sub = item. matches [ idx] . clone ( ) ;
491
- let span = DelimSpan :: from_pair ( item. sp_lo , span) ;
491
+ let span = DelimSpan :: from_pair ( item. sp_open , span) ;
492
492
new_pos. push_match ( idx, MatchedSeq ( sub, span) ) ;
493
493
}
494
494
@@ -556,7 +556,7 @@ fn inner_parse_loop<'a>(
556
556
match_cur : item. match_cur ,
557
557
match_hi : item. match_cur + seq. num_captures ,
558
558
up : Some ( item) ,
559
- sp_lo : sp. open ,
559
+ sp_open : sp. open ,
560
560
top_elts : Tt ( TokenTree :: Sequence ( sp, seq) ) ,
561
561
} ) ) ) ;
562
562
}
0 commit comments