Implement tuple accessors after records/tuples

This commit is contained in:
Joshua Warner 2022-11-24 15:31:56 -08:00
parent a1432d1a14
commit 56470c838d
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
9 changed files with 106 additions and 61 deletions

View file

@ -1789,7 +1789,7 @@ macro_rules! one_or_more {
move |arena, state: State<'a>, min_indent: u32| {
use bumpalo::collections::Vec;
match $parser.parse(arena, state, min_indent) {
match $parser.parse(arena, state.clone(), min_indent) {
Ok((_, first_output, next_state)) => {
let mut state = next_state;
let mut buf = Vec::with_capacity_in(1, arena);
@ -1807,14 +1807,12 @@ macro_rules! one_or_more {
return Ok((MadeProgress, buf, old_state));
}
Err((MadeProgress, fail)) => {
return Err((MadeProgress, fail, old_state));
return Err((MadeProgress, fail));
}
}
}
}
Err((progress, _, new_state)) => {
Err((progress, $to_error(new_state.pos), new_state))
}
Err((progress, _)) => Err((progress, $to_error(state.pos()))),
}
}
};