mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
remove Nested from pattern
This commit is contained in:
parent
197835b6ed
commit
2827af7e59
5 changed files with 6 additions and 23 deletions
|
@ -57,7 +57,7 @@ impl EscapedChar {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum StrLiteral<'a> {
|
||||
/// The most common case: a plain string with no escapes or interpolations
|
||||
PlainLine(&'a str),
|
||||
|
@ -326,7 +326,7 @@ impl<'a> CommentOrNewline<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum Pattern<'a> {
|
||||
// Identifier
|
||||
Identifier(&'a str),
|
||||
|
@ -347,10 +347,6 @@ pub enum Pattern<'a> {
|
|||
/// Can only occur inside of a RecordDestructure
|
||||
OptionalField(&'a str, &'a Loc<Expr<'a>>),
|
||||
|
||||
/// This is used only to avoid cloning when reordering expressions (e.g. in desugar()).
|
||||
/// It lets us take an (&Expr) and create a plain (Expr) from it.
|
||||
Nested(&'a Pattern<'a>),
|
||||
|
||||
// Literal
|
||||
NumLiteral(&'a str),
|
||||
NonBase10Literal {
|
||||
|
@ -460,8 +456,6 @@ impl<'a> Pattern<'a> {
|
|||
// { x, y ? False } = rec
|
||||
x == y
|
||||
}
|
||||
(Nested(x), Nested(y)) => x.equivalent(y),
|
||||
|
||||
// Literal
|
||||
(NumLiteral(x), NumLiteral(y)) => x == y,
|
||||
(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue