Commit ebfcffd
authored
Improve error message for missing delimiter at EOF (#1590)
* Improve error message for missing delimiter at EOF
Due to the way source maps worked the span would point to the wrong file
if the marker was pointing at the end of a file. While this still isn't
necessarily a perfect error message it should be a significant
improvement over before by actually pointing to the incorrect file.
Closes #1583
* Update test expectation
* Fix span calculation for eof
* Re-bless test output1 parent 7a7815f commit ebfcffd
File tree
5 files changed
+35
-10
lines changed- crates/wit-parser
- src
- ast
- tests/ui/parse-fail
- multi-file-missing-delimiter
5 files changed
+35
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1385 | 1385 | | |
1386 | 1386 | | |
1387 | 1387 | | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
| 1388 | + | |
1392 | 1389 | | |
1393 | 1390 | | |
1394 | 1391 | | |
| |||
1519 | 1516 | | |
1520 | 1517 | | |
1521 | 1518 | | |
1522 | | - | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
1523 | 1526 | | |
1524 | 1527 | | |
1525 | 1528 | | |
| |||
1537 | 1540 | | |
1538 | 1541 | | |
1539 | 1542 | | |
1540 | | - | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
1541 | 1546 | | |
1542 | 1547 | | |
1543 | 1548 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | 165 | | |
170 | 166 | | |
171 | 167 | | |
| |||
395 | 391 | | |
396 | 392 | | |
397 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
398 | 399 | | |
399 | 400 | | |
400 | 401 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments