55. Pattern matching¶
The MATCH module implements pattern matching in Daslang. (See also the Pattern matching section.)
All functions and symbols are in “match” module, use require to get access to it.
require daslib/match
55.1. Call macros¶
-
match
Implements match macro.
-
static_match
¶
Implements static_match macro.
-
multi_match
¶
Implements multi_match macro.
-
static_multi_match
¶
Implements static_multi_match macro.
55.2. Structure macros¶
-
match_as_is
¶
Implements match_as_is annotation. This annotation is used to mark that structure can be matched with different type via is and as machinery.
-
match_copy
¶
Implements match_copy annotation. This annotation is used to mark that structure can be matched with different type via match_copy machinery.