mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Move constrain and its deps into their own crates
This commit is contained in:
parent
758de2e7bf
commit
908e485fca
58 changed files with 633 additions and 422 deletions
|
@ -22,6 +22,7 @@ pub mod keyword;
|
|||
pub mod module;
|
||||
pub mod number_literal;
|
||||
pub mod operator;
|
||||
pub mod pattern;
|
||||
pub mod problems;
|
||||
pub mod string_literal;
|
||||
pub mod type_annotation;
|
||||
|
|
11
compiler/parse/src/pattern.rs
Normal file
11
compiler/parse/src/pattern.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
/// 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,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue