We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
if
unless
A MacroIf ASTNode represents an if statement within a macro:
MacroIf
{% if cond %} puts "Then" {% else %} puts "Else" {% end %}
However, the same node type is used to represent:
{% unless cond %} puts "Unless" {% end %}
But based on the current API there is no way to tell the difference between an if and unless.
I propose we implement some way to be able to differentiate between the two types. Current ideas include:
MacroUnless
#is_unless?
The text was updated successfully, but these errors were encountered:
MacroIf#is_unless?
Successfully merging a pull request may close this issue.
Feature Request
A
MacroIf
ASTNode represents anif
statement within a macro:However, the same node type is used to represent:
But based on the current API there is no way to tell the difference between an
if
andunless
.I propose we implement some way to be able to differentiate between the two types. Current ideas include:
Either have a dedicatedThis would be a breaking changeMacroUnless
node#is_unless?
method to the current node typeThe text was updated successfully, but these errors were encountered: