Report import ending syntax error

This commit is contained in:
Agus Zubiaga 2024-05-06 22:22:00 -03:00
parent 8418610dd9
commit bfb77b78cb
No known key found for this signature in database
3 changed files with 53 additions and 4 deletions

View file

@ -4943,6 +4943,31 @@ mod test_reporting {
"###
);
test_report!(
unfinished_import_as_or_exposing,
indoc!(
r"
import svg.Path a
"
),
@r###"
UNFINISHED IMPORT in tmp/unfinished_import_as_or_exposing/Test.roc
I was partway through parsing an `import`, but I got stuck here:
4 import svg.Path a
^
I was expecting to see the `as` keyword, like:
import svg.Path as SvgPath
Or the `exposing` keyword, like:
import svg.Path exposing [arc, rx]
"###
);
test_report!(
ingested_file_import_ann_syntax_err,
indoc!(