mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Nicer message for unhandled expr errors
This commit is contained in:
parent
b9a693c077
commit
160dbee943
2 changed files with 91 additions and 23 deletions
|
@ -5821,6 +5821,36 @@ mod test_reporting {
|
|||
"#
|
||||
);
|
||||
|
||||
test_report!(
|
||||
unhandled_parse_error,
|
||||
indoc!(
|
||||
r#"
|
||||
app "test" provides [main] to "./platform"
|
||||
|
||||
42
|
||||
"#
|
||||
),
|
||||
@r#"
|
||||
── UNHANDLED PARSE ERROR in tmp/unhandled_parse_error/Test.roc ─────────────────
|
||||
|
||||
I got stuck while parsing this:
|
||||
|
||||
1│ app "test" provides [main] to "./platform"
|
||||
2│
|
||||
3│ 42
|
||||
^
|
||||
|
||||
Here's the internal parse problem:
|
||||
|
||||
UnexpectedTopLevelExpr(@44)
|
||||
|
||||
Unfortunately, I'm not able to provide a more insightful error message
|
||||
for this syntax problem yet. This is considered a bug in the compiler.
|
||||
|
||||
Note: If you'd like to contribute to Roc, this would be a good first issue!
|
||||
"#
|
||||
);
|
||||
|
||||
// https://github.com/roc-lang/roc/issues/1714
|
||||
test_report!(
|
||||
interpolate_concat_is_transparent_1714,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue