class

Myst::MatchAssign

Inherits Myst::Node / Reference / Object

A match assignment. Similar to SimpleAssign, but essentiallly inverted. Match assignments create expectations that the right-hand-side value structurally matches the left-hand-side pattern. The "assignment" portion comes from the ability to name variables on the left-hand-side to capture specific sub-values from the right-hand-side.

pattern '=:' expression

Constructors

new(pattern : Myst::Node, value : Myst::Node)
Source

Instance methods

==(other : self)

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

accept_children(visitor)
Source
hash(hasher)

See Object#hash(hasher)

pattern
Source
pattern=(pattern : Node)
Source
value
Source
value=(value : Node)
Source