better error message for type start

This commit is contained in:
Folkert 2021-03-21 15:50:32 +01:00
parent 22f77ed966
commit 8d80dc97c8
4 changed files with 85 additions and 71 deletions

View file

@ -1781,7 +1781,13 @@ fn to_type_report<'a>(
let doc = alloc.stack(vec![
alloc.reflow(r"I just started parsing a type, but I got stuck here:"),
alloc.region_with_subregion(surroundings, region),
alloc.note("I may be confused by indentation"),
alloc.concat(vec![
alloc.reflow(r"I am expecting a type next, like "),
alloc.parser_suggestion("Bool"),
alloc.reflow(r" or "),
alloc.parser_suggestion("List a"),
alloc.reflow("."),
]),
]);
Report {