Hpmason / retour-utils

Other
4 stars 2 forks source link

Use fold instead of manually traversing module #9

Closed Hpmason closed 1 year ago

Hpmason commented 1 year ago

This uses the fold feature of syn which uses the visitor pattern to transform parts of module AST. This way we traversing the AST for hook attributes and reusing the existing nodes.

This approach seems to fix #6, so now rust-analyzer can properly add imports!