Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify analyze and transform hooks flow #2770

Open
idoros opened this issue Oct 25, 2022 · 0 comments
Open

Unify analyze and transform hooks flow #2770

idoros opened this issue Oct 25, 2022 · 0 comments
Labels
core Processing and transforming logic tech debt Updates, upgrades, stale code and work-arounds

Comments

@idoros
Copy link
Collaborator

idoros commented Oct 25, 2022

Currently the code that calls feature hooks checks the AST in various places differently for each case. This adds up to some big if/else chains in the analyzer and transformer and to some duplicate checks inside features.

Need to refactor the flow to be unified so it's easy to understand and add new cases without bloat.

Maybe it would be nice for the features the register hooks to specific node types in order to reduce if statements and then we can guarantee that a hook is called with the node it needs without inner checks.

It would also be good to add a case insensitive check to all the nodes.

@idoros idoros added core Processing and transforming logic tech debt Updates, upgrades, stale code and work-arounds labels Oct 25, 2022
@idoros idoros mentioned this issue Oct 25, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Processing and transforming logic tech debt Updates, upgrades, stale code and work-arounds
Projects
None yet
Development

No branches or pull requests

1 participant