gen_gleam/patterns
Types
pub type Pattern {
NilPattern
FalsePattern
TruePattern
IntPattern(Int)
ListPattern(List(Pattern))
TuplePattern(List(Pattern))
UnusedVarPattern(name: Option(String))
VarPattern(String, Option(GleamType))
}
Constructors
-
NilPattern
-
FalsePattern
-
TruePattern
-
IntPattern(Int)
-
ListPattern(List(Pattern))
-
TuplePattern(List(Pattern))
-
UnusedVarPattern(name: Option(String))
-
VarPattern(String, Option(GleamType))
Functions
pub fn underscore() -> Pattern
pub fn unused_var(name: String) -> Pattern
name: variable name without the underscore, it will be prepended when generating code