Fix a couple minor parsing bugs

This commit is contained in:
Joshua Warner 2024-12-01 12:22:51 -08:00
parent d4301e86a3
commit 5cd38c969f
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
12 changed files with 90 additions and 1 deletions

View file

@ -3910,6 +3910,10 @@ where
}
"<-" => good!(OperatorOrDef::Backpassing, 2),
"!" => Err((NoProgress, to_error("!", state.pos()))),
"&" => {
// makes no progress, so it does not interfere with record updaters / `&foo`
Err((NoProgress, to_error("&", state.pos())))
}
_ => bad_made_progress!(chomped),
}
}

View file

@ -1059,7 +1059,7 @@ where
Some(
b' ' | b'#' | b'\n' | b'\r' | b'\t' | b',' | b'(' | b')' | b'[' | b']' | b'{'
| b'}' | b'"' | b'\'' | b'/' | b'\\' | b'+' | b'*' | b'%' | b'^' | b'&' | b'|'
| b'<' | b'>' | b'=' | b'!' | b'~' | b'`' | b';' | b':' | b'?' | b'.',
| b'<' | b'>' | b'=' | b'!' | b'~' | b'`' | b';' | b':' | b'?' | b'.' | b'@' | b'-',
) => {
state = state.advance(width);
Ok((MadeProgress, (), state))