class

Myst::Match

Inherits Myst::Node / Reference / Object

A match expression. Match expressions are a syntax sugar representing an anonymous function definition and immediate invocation with the arguments.

A match expression must be given at least one argument and one clause to be considered valid.

'match' [ argument [ ',' argument ]* ] [ '->' '(' [ param [ ',' param ]* ]? ')' [ '{' | 'do' ] body [ '}' | 'end' ] ]+ 'end'

Constructors

new(arguments : Array(Myst::Node) = [] of Node, clauses : Array(Myst::Block) = [] of Block)
Source

Instance methods

==(other : self)

Returns true if this reference is the same as other. Invokes same?.

accept_children(visitor)
Source
arguments
Source
arguments=(arguments : Array(Node))
Source
clauses
Source
clauses=(clauses : Array(Block))
Source
hash(hasher)

See Object#hash(hasher)