-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(parser, tests): improving diagnostics and tests for incomplete m…
…acros, macro condition, and imports
- Loading branch information
Showing
15 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
tests/unittests/resources/DiagnosticsSuite/compileTime/bad_glob_import.ark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(import a :*) |
5 changes: 5 additions & 0 deletions
5
tests/unittests/resources/DiagnosticsSuite/compileTime/bad_glob_import.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
At ) @ 1:13 | ||
1 | (import a :*) | ||
| ^~~~~~~~~~~~~ | ||
2 | | ||
Glob patterns can not be separated from the package, use (import a:*) instead |
1 change: 1 addition & 0 deletions
1
tests/unittests/resources/DiagnosticsSuite/compileTime/incomplete_macro.ark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
($ foo) |
5 changes: 5 additions & 0 deletions
5
tests/unittests/resources/DiagnosticsSuite/compileTime/incomplete_macro.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
At ) @ 1:7 | ||
1 | ($ foo) | ||
| ^ | ||
2 | | ||
Expected an argument list, atom or node while defining macro `foo' |
1 change: 1 addition & 0 deletions
1
tests/unittests/resources/DiagnosticsSuite/compileTime/invalid_import_symbol.ark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(import a :123) |
5 changes: 5 additions & 0 deletions
5
tests/unittests/resources/DiagnosticsSuite/compileTime/invalid_import_symbol.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
At 1 @ 1:12 | ||
1 | (import a :123) | ||
| ^~~ | ||
2 | | ||
Expected a valid symbol to import |
1 change: 1 addition & 0 deletions
1
tests/unittests/resources/DiagnosticsSuite/compileTime/missing_cond_if_macro.ark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
($if) |
5 changes: 5 additions & 0 deletions
5
tests/unittests/resources/DiagnosticsSuite/compileTime/missing_cond_if_macro.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
At ) @ 1:5 | ||
1 | ($if) | ||
| ^ | ||
2 | | ||
$if need a valid condition |
1 change: 1 addition & 0 deletions
1
tests/unittests/resources/DiagnosticsSuite/compileTime/missing_function_body.ark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(fun ()) |
5 changes: 5 additions & 0 deletions
5
tests/unittests/resources/DiagnosticsSuite/compileTime/missing_function_body.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
At ) @ 1:8 | ||
1 | (fun ()) | ||
| ^ | ||
2 | | ||
Expected a body for the function |
1 change: 1 addition & 0 deletions
1
tests/unittests/resources/DiagnosticsSuite/compileTime/missing_then_if_macro.ark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
($if true) |
5 changes: 5 additions & 0 deletions
5
tests/unittests/resources/DiagnosticsSuite/compileTime/missing_then_if_macro.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
At ) @ 1:10 | ||
1 | ($if true) | ||
| ^ | ||
2 | | ||
Expected a node or value after condition |
1 change: 1 addition & 0 deletions
1
tests/unittests/resources/DiagnosticsSuite/compileTime/reused_macro_arg.ark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
($ foo (bar bar egg) ()) |
5 changes: 5 additions & 0 deletions
5
tests/unittests/resources/DiagnosticsSuite/compileTime/reused_macro_arg.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
At b @ 1:13 | ||
1 | ($ foo (bar bar egg) ()) | ||
| ^~~ | ||
2 | | ||
Argument names must be unique, can not reuse `bar' |