enforce parsing invariant for patterns
This commit is contained in:
@@ -109,6 +109,19 @@ pub(crate) mod entry {
|
||||
items::mod_contents(p, false);
|
||||
m.complete(p, MACRO_ITEMS);
|
||||
}
|
||||
|
||||
pub(crate) fn pattern(p: &mut Parser) {
|
||||
let m = p.start();
|
||||
patterns::pattern_single(p);
|
||||
if p.at(EOF) {
|
||||
m.abandon(p);
|
||||
return;
|
||||
}
|
||||
while !p.at(EOF) {
|
||||
p.bump_any();
|
||||
}
|
||||
m.complete(p, ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user