Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Improve variadic parameter parsing #153

Merged
merged 3 commits into from Jan 12, 2017

Conversation

soutaro
Copy link
Contributor

@soutaro soutaro commented Jan 12, 2017

PHP 5.6 allows having by-reference variadic parameters.

function foo(&...$params) {
  ...
}

This PR is to parse that syntax.

Because restricting the position of variadic parameters cannot be done by grammar in ocamlyacc (maybe it is not in LALR(1)), the grammar allows having that anywhere in parameter list. And I add validation in action.

Allow having multiple variadic ellipsis only parameters (`...`), but reject the case in actions.
@aryx aryx merged commit 27294e9 into facebookarchive:master Jan 12, 2017
@soutaro soutaro deleted the reference-variadic-param branch January 14, 2017 07:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants