mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
Report ingested file colon syntax error
This commit is contained in:
parent
27a9f6051e
commit
9a66abf95f
1 changed files with 13 additions and 3 deletions
|
@ -1579,10 +1579,20 @@ fn to_import_report<'a>(
|
|||
.indent(4),
|
||||
]),
|
||||
),
|
||||
IndentAnnotation(_) => todo!(),
|
||||
Annotation(problem, pos) => to_type_report(alloc, lines, filename, problem, *pos),
|
||||
IndentColon(_) => todo!(),
|
||||
Colon(_) => todo!(),
|
||||
IndentAnnotation(pos) | IndentColon(pos) | Colon(pos) => to_unfinished_import_report(
|
||||
alloc,
|
||||
lines,
|
||||
filename,
|
||||
*pos,
|
||||
start,
|
||||
alloc.stack([
|
||||
alloc.reflow("I was expecting to see an annotation next, like:"),
|
||||
alloc
|
||||
.parser_suggestion("import \"users.json\" as users : Str")
|
||||
.indent(4),
|
||||
]),
|
||||
),
|
||||
Space(problem, pos) => to_space_report(alloc, lines, filename, problem, *pos),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue