mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
11 lines
424 B
Rust
11 lines
424 B
Rust
/// Different patterns are supported in different circumstances.
|
|
/// For example, when branches can pattern match on number literals, but
|
|
/// assignments and function args can't. Underscore is supported in function
|
|
/// arg patterns and in when branch patterns, but not in assignments.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
|
pub enum PatternType {
|
|
TopLevelDef,
|
|
DefExpr,
|
|
FunctionArg,
|
|
WhenBranch,
|
|
}
|