struct

Ast::Enum

Inherits Ast::TypeDeclaration < Ast::HasTypeParams < Ast::TopLevelItem < IrNode < Struct < Value < Object

Constructors

new(location : Location, name : ::String, type_params : Slice(TypeParameter) | ::Nil = nil, traits : ::Array(Type) | ::Nil = nil, variants : ::Array(Variant) = [] of Variant, convention : Convention = nil)
Source
new(location : Location, convention : Convention, name : ::String, type_params : Slice(TypeParameter) | ::Nil = nil, traits : ::Array(Type) | ::Nil = nil, variants : ::Array(Variant) = [] of Variant)
Source

Instance methods

to_s(io : IO)

Same as #inspect(io).

Source
variants
Source
variants=(variants : ::Array(Variant))
Source