loki icon indicating copy to clipboard operation
loki copied to clipboard

Transformations: ResolveAssociateTransformer re-write to in-place substitution

Open mlange05 opened this issue 4 months ago • 1 comments

Note: This PR sits on top of PR #372 and requires this to be merged first.

This PR re-writes the ResolveAssociateTransformer and switches it to acting entirely in-place. For this, instead of finding all symbols and substituting them with their inverse-association, we now simply run over each symbol, find its inverse from the .scope and apply in-place. This requires the substitution to be written as a symbol mapper.

As an addition feature, we can now do partial resolution in associate bodies, where only a select sub-region of the code has its associated symbols resolved. I've added a test to this extend.

And on top of that I've refactored the imports in the associated test.

mlange05 avatar Oct 02 '24 15:10 mlange05