kphp
kphp copied to clipboard
Allow trailing comma for function use and parameter lists
Support PHP8 feature. Main issue: https://github.com/VKCOM/kphp/issues/290 Previous attempt: https://github.com/VKCOM/kphp/pull/308 I didn't rebase because of merge conflict.
Hi!
I would suggest adding the tests.
- One test should fail for the incorrect syntax combinations. Two trailing commas, etc. See
@kphp-should-failannotations intests/phpt/ - Another test should check that trailing commas work as expected (
@oktest).
Basically, this feature should work when it works in PHP and fail to compile when it's not a valid syntax for PHP. You may look at the PHP pull request for an inspiration. It probably includes some tests.
See the docs for more info about contributing (how to run tests, etc.)
Or you can ask the questions here. For Russian-speaking contributors I would suggest a Telegram chat: https://t.me/kphp_chat
Please check