Php-parser: Bug with parsing `list`

Created on 20 Mar 2018  路  3Comments  路  Source: glayzzle/php-parser

Input:

list(,$power) = $info;
list($power) = $info;

Have same count of arguments

bug AST PARSER

Most helpful comment

it's fixed - i will release an alpha 2 in few days

All 3 comments

Not sure yet, but it may come from an abusive usage of a too permissive reader implemented here https://github.com/glayzzle/php-parser/blob/master/src/parser/utils.js#L30

If it's the case, the problem can reproduced on others nodes, I need to check each read_list usage

@ichiriac Can we fix it next? We have many problem in prettier-php with this construction, many people use this

it's fixed - i will release an alpha 2 in few days

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexander-akait picture alexander-akait  路  7Comments

chris-l picture chris-l  路  7Comments

alexander-akait picture alexander-akait  路  5Comments

ichiriac picture ichiriac  路  7Comments

alexander-akait picture alexander-akait  路  9Comments