Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform multiple nodes without creating statements #175

Merged
merged 1 commit into from
Oct 1, 2023

Conversation

thekid
Copy link
Member

@thekid thekid commented Oct 1, 2023

Otherwise the following would generate a ; following a method, which is a syntax error.

// Transform one method to two
$emitter->transform('method', function($codegen, $node) {
  yield null => new Method(...);
  yield null => new Method(...);
});

This can be considered a workaround, it would be better to have Statement nodes, but this would be a significant refactoring!

@thekid thekid merged commit e047051 into master Oct 1, 2023
18 checks passed
@thekid thekid deleted the feature/transform-multiple-without-statements branch October 1, 2023 18:38
@thekid
Copy link
Member Author

thekid commented Oct 1, 2023

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.

1 participant