feat(frontends/lean/parser): allow the user to write (Type) without providing a level

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-01-25 20:17:36 -08:00
parent 9fb3ccb4c0
commit 6bc1537e25

View file

@ -801,7 +801,11 @@ expr parser_imp::parse_type(bool level_expected) {
auto p = pos();
next();
if (level_expected) {
return save(mk_type(parse_level()), p);
if (curr() == scanner::token::RightParen) {
return save(Type(), p);
} else {
return save(mk_type(parse_level()), p);
}
} else {
return save(Type(), p);
}