class

Crystal::Macros::ExternalVar

Inherits Crystal::Macros::ASTNode

An external variable declaration inside a lib.

Every variable node is equivalent to:

${{ node.name }} {% if real_name = node.real_name %}= {{ real_name }}{% end %} : {{ node.type }}

Instance methods

name

Returns the name of the variable in Crystal, without the preceding $.

Source
real_name

Returns the real C name of the variable, if any.

Source
type

Returns the name of the variable's type.

Source