class

Crystal::Macros::MacroExpression

Inherits Crystal::Macros::ASTNode

A macro expression.

Every expression node is equivalent to:

{% if node.output? %}
  \{{ {{ node.exp }} }}
{% else %}
  \{% {{ node.exp }} %}
{% end %}

Instance methods

exp

Returns the expression inside this node.

Source
output?

Returns whether this node interpolates the expression's result.

Source