marcioAlmada / yay

Yay is a high level PHP preprocessor
https://github.com/marcioAlmada/yay
MIT License
572 stars 35 forks source link

Suggestion: Death to _() #58

Closed assertchris closed 5 years ago

assertchris commented 6 years ago

It seems silly that we have to add placeholders (which have to be populated in the compiler step anyway) before they can be used in the translated code. If the AST becomes mutable, wouldn't it be possible to automatically add the placeholders to the AST as the AST is mutated, so that they are usable in the translation step without needing to be defined in the match step?

marcioAlmada commented 5 years ago

I think we don't need this _() hack anymore after the static analysis part was removed from expansion parsing some time ago.

assertchris commented 5 years ago

Yeah, also effortless to insert them with the AST mutation we now have.