mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
all is working again
This commit is contained in:
parent
022ed7b24c
commit
c26fd45d54
6 changed files with 191 additions and 113 deletions
|
@ -125,6 +125,22 @@ fn to_syntax_report<'a>(
|
|||
|
||||
report(doc)
|
||||
}
|
||||
NotEndOfFile(row, col) => {
|
||||
let surroundings = Region::from_rows_cols(start_row, start_col, *row, *col);
|
||||
let region = Region::from_row_col(*row, *col);
|
||||
|
||||
let doc = alloc.stack(vec![
|
||||
alloc.reflow(r"I expected to reach the end of the file, but got stuck here:"),
|
||||
alloc.region_with_subregion(surroundings, region),
|
||||
alloc.concat(vec![alloc.reflow("no hints")]),
|
||||
]);
|
||||
|
||||
Report {
|
||||
filename,
|
||||
doc,
|
||||
title: "NOT END OF FILE".to_string(),
|
||||
}
|
||||
}
|
||||
SyntaxError::Eof(region) => {
|
||||
let doc = alloc.stack(vec![alloc.reflow("End of Field"), alloc.region(*region)]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue