add top-level tests for expressions

This commit is contained in:
Aleksey Kladov 2022-01-02 17:52:05 +03:00
parent 640cc27ff0
commit fa049d94d1
3 changed files with 54 additions and 1 deletions

View file

@ -135,6 +135,19 @@ pub(crate) mod entry {
}
m.complete(p, ERROR);
}
pub(crate) fn expr(p: &mut Parser) {
let m = p.start();
expressions::expr(p);
if p.at(EOF) {
m.abandon(p);
return;
}
while !p.at(EOF) {
p.bump_any();
}
m.complete(p, ERROR);
}
}
}