Php-parser: Don't have curly for propertylookup in offset

Created on 6 Mar 2018  路  8Comments  路  Source: glayzzle/php-parser

Example:

$this->{quantity};

Ref: https://github.com/prettier/plugin-php/issues/112

enhancement AST high-pri

Most helpful comment

Hi @evilebottnawi,

I'm sorry that my reply took so long, I'm almost free & back now. I'll work this saturday all the day, I still plan to release it on a stable version soon.

I wish you an happy new year plenty of joy and cool projects :smile:

All 8 comments

This might be a duplicate of #101

Not really, here the problem is about unclear AST. In fact it's not really a bug as the output can be resolved as following :

image

If the name is an identifier node, use '{' + name.name + '}' or else use directly name.

I find it a bit ugly, so I'll use this version in order to introduce changes on AST and make it more intuitive, related on https://github.com/glayzzle/php-parser/issues/62

Oh, of course - and it's not even about encapsed. I guess i should take a break :wink:

@ichiriac the workaround in our prettier plugin is actually not too bad: https://github.com/prettier/plugin-php/pull/183

/cc @ichiriac friendly ping, after some delay let's solve this issue, any ideas how better solve this?

Hi @evilebottnawi,

I'm sorry that my reply took so long, I'm almost free & back now. I'll work this saturday all the day, I still plan to release it on a stable version soon.

I wish you an happy new year plenty of joy and cool projects :smile:

Hi @evilebottnawi,

Could you check remaining issues and add the flag high-pri on every issue you need to be fixed for the stable version ? Like this I'll know on what to focus.

hi, it's implemented, take a look at the comment https://github.com/glayzzle/php-parser/issues/248#issuecomment-456596682 in order to see the implementation rules

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexander-akait picture alexander-akait  路  3Comments

alexander-akait picture alexander-akait  路  5Comments

Rivendall picture Rivendall  路  6Comments

mgrip picture mgrip  路  3Comments

aameen951 picture aameen951  路  7Comments