(and ...) combinator in patterns

This commit is contained in:
Chris Fallin
2021-09-07 00:47:03 -07:00
parent 602b8308ce
commit 1ceef04680
6 changed files with 61 additions and 7 deletions

View File

@@ -83,6 +83,8 @@ pub enum Pattern {
Term { sym: Ident, args: Vec<Pattern> },
/// An operator that matches anything.
Wildcard,
/// N sub-patterns that must all match.
And { subpats: Vec<Pattern> },
}
/// An expression: the right-hand side of a rule.