check top level entry point invariants

This commit is contained in:
Aleksey Kladov 2022-01-02 18:41:32 +03:00
parent fa049d94d1
commit d846afdeef
5 changed files with 42 additions and 12 deletions

View file

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