Report unfinished exposing in imports

This commit is contained in:
Agus Zubiaga 2024-05-06 23:24:56 -03:00
parent f81985533c
commit dc18597a0e
No known key found for this signature in database
2 changed files with 35 additions and 4 deletions

View file

@ -1531,16 +1531,29 @@ fn to_import_report<'a>(
severity: Severity::RuntimeError,
}
}
Annotation(problem, pos) => to_type_report(alloc, lines, filename, problem, *pos),
Space(problem, pos) => to_space_report(alloc, lines, filename, problem, *pos),
ExposingListStart(_) => todo!(),
ExposingListStart(pos) => to_unfinished_import_report(
alloc,
lines,
filename,
*pos,
start,
alloc.concat([
alloc.reflow("I just saw the "),
alloc.keyword("exposing"),
alloc.reflow(" keyword, so I was expecting to see "),
alloc.keyword("["),
alloc.reflow(" next."),
]),
),
ExposedName(_) => todo!(),
ExposingListEnd(_) => todo!(),
IndentIngestedName(_) => todo!(),
IngestedName(_) => todo!(),
IndentAnnotation(_) => todo!(),
Annotation(problem, pos) => to_type_report(alloc, lines, filename, problem, *pos),
IndentColon(_) => todo!(),
Colon(_) => todo!(),
IndentAnnotation(_) => todo!(),
Space(problem, pos) => to_space_report(alloc, lines, filename, problem, *pos),
}
}