Crystal::Macros::ModuleDef
Inherits Crystal::Macros::ASTNode
A module definition.
Every module definition node is equivalent to:
{% begin %}
{{ node.kind }} {{ node.name }}
{{ node.body }}
end
{% end %}
Instance methods
Returns the name of this type definition.
If this node defines a generic type, and generic_args is true, returns a
Generic whose type arguments are MacroIds, possibly with a Splat at
the splat index. Otherwise, this method returns a Path.
splat_index
Returns the splat index of this type definition's generic type parameters.
Returns nil if this type definition isn't generic or if there isn't a
splat parameter.
type_vars
Returns an array of MacroIds of this type definition's generic type
parameters.
On a non-generic type definition, returns an empty array.