Skip to content

Conversation

@TimWolla
Copy link
Contributor

@TimWolla TimWolla commented Jul 2, 2025


non_empty_clone_argument_list:
expr ',' argument
{ init(new Node\Arg($1, false, false, stackAttributes(#1)), $3); }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a !!positions test to check the two cases using stackAttributes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have my computer at hand, but the positions are already implicitly tested by the test verifying that the pretty-printer round-trips. The initial implementation had init(Node\Arg[$1, false, false], $3) and similarly for the other case and that resulted in clone($x, ) being stringified as clone($x, )$x, ) or similar.

Shall I nevertheless add a dedicated test?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I think that's good enough.

@nikic nikic merged commit dc47765 into nikic:master Jul 2, 2025
10 checks passed
@TimWolla TimWolla deleted the clone-all-syntax branch July 2, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants