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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm at my second plugin idea where I would need to know the immediate surroundings of a Node to prevent making a mess while replacing code.
For my current plugin, I want to search and replace literal strings by an existing public constant who would have the same value.
This works super well, but it even replace this code:
to
To prevent that, I would just need to know some more context. Is there a way to navigate the AST or some other way to get more context from a Node?
Beta Was this translation helpful? Give feedback.
All reactions