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

Fix parsing of non-trailing if bodies inside macro expressions #14505

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

HertzDevil
Copy link
Contributor

@HertzDevil HertzDevil commented Apr 18, 2024

Fixes #14214.

The debug in the following will now be a Var instead of a Call:

{%
  if true
    debug
  end
%}

but it will run just fine because the macro interpreter has a special rule for treating Vars as top-level macro method calls if the variables do not actually exist.

@straight-shoota straight-shoota added this to the 1.13.0 milestone Apr 18, 2024
@straight-shoota straight-shoota merged commit 0706bc8 into crystal-lang:master Apr 19, 2024
59 of 60 checks passed
@HertzDevil HertzDevil deleted the bug/macro-if-call branch April 19, 2024 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-trailing macro if inside a macro for breaks parsing
2 participants