Skip to content

Fix macro function scoping inside of another macro function#869

Merged
jasmith-hs merged 1 commit into
masterfrom
macro-function-scoping
Jun 1, 2022
Merged

Fix macro function scoping inside of another macro function#869
jasmith-hs merged 1 commit into
masterfrom
macro-function-scoping

Conversation

@jasmith-hs

Copy link
Copy Markdown
Contributor

Addresses #868
Rather than copying the global macros over when evaluating a macro function, we'll instead create a new HashMap copy of it so that if any new macro functions are added, they will be localised to the current scope, rather than the parent's scope.

@jmaroeder jmaroeder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test looks like it pretty well covers the issues mentioned in #868 - LGTM!

@jasmith-hs jasmith-hs merged commit c8d14f1 into master Jun 1, 2022
@jasmith-hs jasmith-hs deleted the macro-function-scoping branch June 1, 2022 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants