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
Parser crashes when encountering property call inside string #17
Comments
Hi @nevadascout, Seems to work with this :
But not with this :
It should pass and I'll fix it, but for me the error behaviour is normal, it's throwing an syntax error as expected. I can't reproduce the same crash error, could you isolate this behaviour in a self-contained js file ? |
Hey thanks for the quick response, I just realised that my example was wrong. It should have been |
ok, i've got it, my implementation of this grammar was too simplified : |
Great! How easy is it to fix? |
it's easy, but i wait that travis do it's job : Since I've validate tokens over php7 I'm compiling php from sources and it takes a long time but I'm confident it will pass |
I'm re-openning this issue until we figure out the crash error |
I'll get you a code sample shortly |
Nice one! Do you still want a sample of broken code? |
No, it's ok, maybe it's a problem with the silent error handler, if so it's not about encapsed strings parsing. If you get another parsing problem with a crash you could open another issue. I will close this issue, thanks for your reporting, Best Regards, |
Thanks for fixing it so quickly! |
So I have some code:
echo "test: $this->prop->foo"
.When trying to parse this code, the parser crashes without an error, however adding
{
}
around the property call resolves the issue and it parses successfully.So
echo "test: {$this->prop->foo}"
works.Even if this behaviour is not allowed in PHP, the parser should throw an exception so it can be caught on the user side. Currently this code crashes my application without warning, regardless if I use a try/catch block or not.
The text was updated successfully, but these errors were encountered: