class Mint::Ast::EnumDestructuring

Defined in:

ast/enum_destructuring.cr

Constructors

Instance Method Summary

Instance methods inherited from class Mint::Ast::Node

from : Int32 from, from=(from : Int32) from=, input : Data input, location : Location location, new_line? new_line?, owns?(node) owns?, source source, static? static?, static_value static_value, to : Int32 to, to_tuple to_tuple

Constructor methods inherited from class Mint::Ast::Node

new(input : Mint::Ast::Data, from : Int32, to : Int32) new

Class methods inherited from class Mint::Ast::Node

compute_location(input : Data, from, to) compute_location, compute_position(lines, needle) : Position compute_position

Constructor Detail

def self.new(parameters : Array(Node), option : TypeId, name : TypeId | Nil, input : Data, from : Int32, to : Int32) #

[View source]

Instance Method Detail

def exhaustive? #

TODO Probably this will need to go into the type checker if we want to support cases like this:

enum Test { Branch(String) }

let Test::Branch(value) = Test::Branch("Hello")


[View source]
def name : Mint::Ast::TypeId? #

[View source]
def option : Mint::Ast::TypeId #

[View source]
def parameters : Array(Mint::Ast::Node) #

[View source]