You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just implemented parsing nested define expressions in a library that is using php-stubs/generator internally:
-> inpsyde/wp-stubs#7
We are extending the default NodeVisitor class, so my approach was to parse for any nested define expressions inside functions and class methods, and then add them back into the function/method body after it was emptied (by the default/parent enterNode method).
Now, should parsing nested define constants (and maybe also const constants?) be made possible in the generator itself? I am happy to help implement this, if yes.
We would need to define how this would happen. That is, should it happen by default if the StubsGenerator::CONSTANTS symbol is passed? Or should it be turned on explicitly with a dedicated symbol, for example, StubsGenerator::NESTED_CONSTANTS? If the latter, should the StubsGenerator::CONSTANTS symbol have to be defined as well, or does the new StubsGenerator::NESTED_CONSTANTS symbol imply the existing one?
Moved here from README.
The text was updated successfully, but these errors were encountered: