-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vm, compiler): new operator '@@' to get element in 2D list
- Loading branch information
Showing
14 changed files
with
136 additions
and
20 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
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
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
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
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
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
2 changes: 2 additions & 0 deletions
2
tests/unittests/resources/DiagnosticsSuite/compileTime/at_at_not_enough_args.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,2 @@ | ||
(let lst [[0 1 2 3] [4 5 6 7] [8 9 0 1]]) | ||
(print (@@ lst 1)) |
6 changes: 6 additions & 0 deletions
6
tests/unittests/resources/DiagnosticsSuite/compileTime/at_at_not_enough_args.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,6 @@ | ||
At @@ @ 2:9 | ||
1 | (let lst [[0 1 2 3] [4 5 6 7] [8 9 0 1]]) | ||
2 | (print (@@ lst 1)) | ||
| ^~ | ||
3 | | ||
Operator needs three arguments, but was called with 2 |
2 changes: 2 additions & 0 deletions
2
tests/unittests/resources/DiagnosticsSuite/runtime/at_at_inner_out_of_range.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,2 @@ | ||
(let lst [[0 1 2 3] [4 5 6 7] [8 9 0 1]]) | ||
(print (@@ lst 0 6)) |
1 change: 1 addition & 0 deletions
1
tests/unittests/resources/DiagnosticsSuite/runtime/at_at_inner_out_of_range.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 @@ | ||
IndexError: @@ index (x: 6) out of range (inner indexable size: 4) |
2 changes: 2 additions & 0 deletions
2
tests/unittests/resources/DiagnosticsSuite/runtime/at_at_out_of_range.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,2 @@ | ||
(let lst [[0 1 2 3] [4 5 6 7] [8 9 0 1]]) | ||
(print (@@ lst 3 1)) |
1 change: 1 addition & 0 deletions
1
tests/unittests/resources/DiagnosticsSuite/runtime/at_at_out_of_range.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 @@ | ||
IndexError: @@ index (3) out of range (list size: 3) |
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
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