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

[PHP] Fix yield keyword category #3552

Merged
merged 1 commit into from
Nov 13, 2022

Conversation

deathaxe
Copy link
Collaborator

Fixes #3549

This commit re-categorizes yield from control flow statement to ordinary expression keyword to enable its usage within groups/brackets.

That's required as PHP supports bi-directional communication between generators and their controllers.

see: https://sof3.github.io/await-generator/master/generators.html#sending-data-intoout-of-the-generator

Fixes sublimehq#3549

This commit re-categorizes `yield` from control flow statement to
ordinary expression keyword to enable its usage within groups/brackets.

That's required as PHP supports bi-directional communication between
generators and their controllers.

see: https://sof3.github.io/await-generator/master/generators.html#sending-data-intoout-of-the-generator
@deathaxe deathaxe merged commit d04bd5e into sublimehq:master Nov 13, 2022
@deathaxe deathaxe deleted the pr/php/fix-yield branch November 13, 2022 13: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.

[PHP] yield not recognised while used as expression.
3 participants