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

Allow Trailing Comma In match_expression_list #194

Conversation

Vehmloewff
Copy link

@Vehmloewff Vehmloewff commented Oct 25, 2023

... It's valid PHP, apparently.

php -r 'echo match ("Hello") {
        "Hi", "Hello", => true,
        "Bye", => false,
};'

Checklist:

  • All tests pass in CI
  • There are sufficient tests for the new fix/feature
  • Grammar rules have not been renamed unless absolutely necessary (x rules renamed)
  • The conflicts section hasn't grown too much (x new conflicts)
  • The parser size hasn't grown too much (master: STATE_COUNT, PR: STATE_COUNT) (check the value of STATE_COUNT in src/parser.c)

@cfroystad
Copy link
Collaborator

Thanks for fixing this and also adding a test 🙂

This is a reminder that we should check the implementation and not just the RFC when implementing support for new features here (I'm a fault here). This is not mentioned in the RFC, but is part of the original implementation. Thanks for the fix!

We'll land this after #192 is landed since that moves stuff around a bit

@calebdw
Copy link
Collaborator

calebdw commented Jan 26, 2024

rebased locally and merged to master

@calebdw calebdw closed this Jan 26, 2024
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.

3 participants