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

Incorrect parsing of backslash-prefixed use declarations #291

Closed
loilo opened this issue Apr 9, 2019 · 2 comments
Closed

Incorrect parsing of backslash-prefixed use declarations #291

loilo opened this issue Apr 9, 2019 · 2 comments

Comments

@loilo
Copy link
Contributor

loilo commented Apr 9, 2019

This came up over at prettier/php-plugin#1029.

The following code throws a syntax error where it shouldn't:

<?php

use \A, \B, \C;

This seems to be due to the parser not accepting leading backslashes in untyped use declarations of use groups. However, due to the nature of the parser implementation, it does not show before the third use item (use \A, \B; works fine).

I've fixed this locally and will attach a PR shortly.

@ichiriac
Copy link
Member

Hi @loilo, many thanks for your PR - I will release it soon

@loilo
Copy link
Contributor Author

loilo commented Apr 11, 2019

MY pleasure. 🙂

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

No branches or pull requests

2 participants