-
Notifications
You must be signed in to change notification settings - Fork 30
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
Padawan does not autocomplete when inside a multi-line associative array #23
Comments
Hello, thanks for the bug report. This happens because of using hacked php-parser. It is unable to parse line like |
hmmm ok, actually if i put it on one line , then it's able to parse it correctly by the way, now that php7 has a AST (and a lib to access it) , would it make things easier ? (like the people from this project https://github.com/etsy/phan/ are doing) |
more on the bug itself, do you think it would be hard to fix, i.e if i could try my hand on it ? |
@allan-simon I haven't tried it yet, but I think at least it would be faster. What about fixing this bug, right now I have not enough time and would be able to fix it only after holidays. |
I've added some debug in ErrorFreePhpParser, and what I can see is that most of the time the exception which get returned is
even for but for
I got :
|
oh I see what you mean, as it handles on a line per line basis , hence why it works when the beginning of the array is on the same line, and for other type of multiline statement |
Is there a chance to fix it? |
@golaod there should be fix in a parser logic, I'm not sure how easy it is. Currently I'm working on https://github.com/mkusher/padawan.php/pulls |
I have the following code
If i try now to type
$a->
at place X it will work, but if it try to type->
at place Y, it will notif the array is a multiline normal one , it does work , same for multiline function call
The text was updated successfully, but these errors were encountered: