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

T_DOLLAR_OPEN_CURLY_BRACES should handle EXPR #105

Closed
ichiriac opened this issue Dec 26, 2017 · 1 comment
Closed

T_DOLLAR_OPEN_CURLY_BRACES should handle EXPR #105

ichiriac opened this issue Dec 26, 2017 · 1 comment

Comments

@ichiriac
Copy link
Member

ichiriac commented Dec 26, 2017

This syntax should be valid :

<?php
echo "hello ${foo()} ";

Actual output :

Parse Error : syntax error, unexpected 'foo()} ' (T_ENCAPSED_AND_WHITESPACE) on line 2
ichiriac added a commit to glayzzle/php-parser-dev-tokens that referenced this issue Dec 26, 2017
@ichiriac
Copy link
Member Author

FAIL : Expected T_STRING token, but found T_ENCAPSED_AND_WHITESPACE
FAIL : Expected "foo" contents, but found "foo()}"
FAIL : Token arrays have not the same length !

Error at : test/tokens/php/src/texts.php.token

JS Tokens [ [ 'T_ENCAPSED_AND_WHITESPACE', 'foo()}', 14 ] ]
PHP Tokens [ [ 'T_STRING', 'foo', 14 ] ]

Bug from lexer,

ichiriac added a commit that referenced this issue Dec 26, 2017
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

1 participant