summaryrefslogtreecommitdiffstats
path: root/crates/rebel-parse/src/ast/pat.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rebel-parse/src/ast/pat.rs')
-rw-r--r--crates/rebel-parse/src/ast/pat.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/rebel-parse/src/ast/pat.rs b/crates/rebel-parse/src/ast/pat.rs
index a376956..d1baf68 100644
--- a/crates/rebel-parse/src/ast/pat.rs
+++ b/crates/rebel-parse/src/ast/pat.rs
@@ -2,5 +2,20 @@ use super::*;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Pat<'a> {
+ Paren(Box<Pat<'a>>),
+ Ident(Ident<'a>),
+}
+
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub enum DestrPat<'a> {
+ Index {
+ pat: Box<DestrPat<'a>>,
+ index: Box<Expr<'a>>,
+ },
+ Field {
+ pat: Box<DestrPat<'a>>,
+ field: Ident<'a>,
+ },
+ Paren(Box<DestrPat<'a>>),
Path(Path<'a>),
}