Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update argument forwarding syntax (#4247)
* Update imported tests for forward arguments Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com> Co-authored-by: Vinicius Stock <vinicius.stock@shopify.com> * Update parser for new forward arguments syntax Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com> Co-authored-by: Vinicius Stock <vinicius.stock@shopify.com> * Update desugar for new forward arguments syntax Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com> Co-authored-by: Vinicius Stock <vinicius.stock@shopify.com> * Update resolver for new forward argument syntax Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com> Co-authored-by: Vinicius Stock <vinicius.stock@shopify.com> Co-authored-by: Vinicius Stock <vinicius.stock@shopify.com>
- Loading branch information
Showing
36 changed files
with
143 additions
and
69 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
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
3 changes: 2 additions & 1 deletion
3
..._forward_args_0.parse-tree-whitequark.exp → ...t_forward_arg_0.parse-tree-whitequark.exp
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
s(:def, :foo, | ||
s(:forward_args), | ||
s(:args, | ||
s(:forward_arg)), | ||
s(:send, nil, :bar, | ||
s(:forwarded_args))) |
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
test/whitequark/test_forward_args_2.parse-tree-whitequark.exp
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,3 @@ | ||
# typed: true | ||
|
||
def foo(x,y,z); bar(x, y, z, ...); end # error: unexpected token "..." |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
test/whitequark/test_forward_args_legacy_0.parse-tree-whitequark.exp
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 @@ | ||
s(:def, :foo, | ||
s(:args, | ||
s(:forward_arg)), | ||
s(:send, nil, :bar, | ||
s(:forwarded_args))) |
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,3 @@ | ||
# typed: true | ||
|
||
def foo(...); bar(...); end |
3 changes: 2 additions & 1 deletion
3
..._forward_args_1.parse-tree-whitequark.exp → ...d_args_legacy_1.parse-tree-whitequark.exp
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
s(:def, :foo, | ||
s(:forward_args), | ||
s(:args, | ||
s(:forward_arg)), | ||
s(:super, | ||
s(:forwarded_args))) |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
test/whitequark/test_forward_args_legacy_2.parse-tree-whitequark.exp
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,3 @@ | ||
s(:def, :foo, | ||
s(:args, | ||
s(:forward_arg)), nil) |
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
test/whitequark/test_trailing_forward_arg_0.parse-tree-whitequark.exp
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,9 @@ | ||
s(:def, :foo, | ||
s(:args, | ||
s(:arg, :a), | ||
s(:arg, :b), | ||
s(:forward_arg)), | ||
s(:send, nil, :bar, | ||
s(:lvar, :a), | ||
s(:int, "42"), | ||
s(:forwarded_args))) |
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,3 @@ | ||
# typed: true | ||
|
||
def foo(a, b, ...); bar(a, 42, ...); end |
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