class Crystal::Macros::MacroExpression

Overview

A macro expression.

Every expression node is equivalent to:

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

Defined in:

compiler/crystal/macros.cr

Instance Method Summary

Instance Method Detail

def exp : ASTNode #

Returns the expression inside this node.


[View source]
def output? : BoolLiteral #

Returns whether this node interpolates the expression's result.


[View source]