php-cfg icon indicating copy to clipboard operation
php-cfg copied to clipboard

add support of php attributes

Open eric-therond opened this issue 1 year ago • 1 comments

fix #90

eric-therond avatar Jan 11 '24 08:01 eric-therond

@nikic or @ircmaxell do you have time to review it?

I also plan to create a separate PR for the support of arrow function and attributes on arrow function.

eric-therond avatar Jan 29 '24 11:01 eric-therond

I know it's a bit late, but one thing that jumped out to me is using Expr as a base for the attribute. Expressions have a return value. It also isn't a statement since it can't appear in a control-flow. I would do something similar to trait-use in this context, so adding a new Op type for the attribute.

ircmaxell avatar May 22 '24 14:05 ircmaxell

no problem for the delay, better late than never ;) thank you for your suggestion. I did changes to the PR. Let me know if it's what's you had in mind.

eric-therond avatar May 24 '24 11:05 eric-therond

Looks great, thanks for the contribution!

ircmaxell avatar May 24 '24 13:05 ircmaxell