Change the lookahead in MacroParser::new
.
As it happens, lookahead values of 0, 1, and 2 all work fine here, due to the structure of the code. (Values or 3 or greater cause test failures.) This commit changes the lookahead to zero because that will facilitate cleanups in subsequent commits.
This commit is contained in:
parent
1d35638dc3
commit
0bf6e82c54
1 changed files with 1 additions and 1 deletions
|
@ -1190,7 +1190,7 @@ impl<'a> MacroParser<'a> {
|
|||
// (`(` ... `)` `=>` `{` ... `}`)*
|
||||
fn parse(&mut self) -> Option<Macro> {
|
||||
let mut branches = vec![];
|
||||
while self.toks.look_ahead(1).is_some() {
|
||||
while self.toks.look_ahead(0).is_some() {
|
||||
branches.push(self.parse_branch()?);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue