mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Report import ending syntax error
This commit is contained in:
parent
8418610dd9
commit
bfb77b78cb
3 changed files with 53 additions and 4 deletions
|
@ -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!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue