class Crystal::Macros::StringInterpolation


An interpolated string like "Hello, #{name}!".

Defined in:


Instance Method Summary

Instance methods inherited from class Crystal::Macros::ASTNode

!=(other : ASTNode) : BoolLiteral !=, ==(other : ASTNode) : BoolLiteral ==, class_name : StringLiteral class_name, column_number : StringLiteral | NilLiteral column_number, end_column_number : StringLiteral | NilLiteral end_column_number, end_line_number : StringLiteral | NilLiteral end_line_number, filename : StringLiteral | NilLiteral filename, id : MacroId id, line_number : StringLiteral | NilLiteral line_number, nil? : BoolLiteral nil?, raise(message) : NoReturn raise, stringify : StringLiteral stringify, symbolize : SymbolLiteral symbolize

Instance Method Detail

def expressions : ArrayLiteral(ASTNode) #

Returns a list of expressions that comprise the interpolated string.

These alternate between StringLiteral for the plaintext parts and ASTNodes of any type for the interpolated expressions.

[View source]