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

Expand named macro expression arguments before outer macro call expansion #10819

Merged
merged 2 commits into from
Jun 13, 2021

Conversation

HertzDevil
Copy link
Contributor

Fixes #2423.

macro foo(x)
  {% p x %}
end

foo({{ 1 }})    # => 1
foo(x: {{ 1 }}) # => 1
# before:       # => {{ 1 }}

@HertzDevil HertzDevil changed the title Expand macro expressions in named arguments of macro calls Expand nested macro expressions in named arguments before outer macro call expression Jun 13, 2021
@HertzDevil HertzDevil changed the title Expand nested macro expressions in named arguments before outer macro call expression Expand nested macro expressions in named arguments before outer macro call expansion Jun 13, 2021
@HertzDevil HertzDevil changed the title Expand nested macro expressions in named arguments before outer macro call expansion Expand named macro expression arguments before outer macro call expansion Jun 13, 2021
@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic labels Jun 13, 2021
@asterite asterite added this to the 1.1.0 milestone Jun 13, 2021
@asterite asterite merged commit 51e7a95 into crystal-lang:master Jun 13, 2021
@HertzDevil HertzDevil deleted the bug/macro-exp-named-arg branch June 14, 2021 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand constants inside literals in macro calls
3 participants