diff --git a/schala-lang/language/src/parser.rs b/schala-lang/language/src/parser.rs index 6a3cff7..5c5538e 100644 --- a/schala-lang/language/src/parser.rs +++ b/schala-lang/language/src/parser.rs @@ -265,7 +265,14 @@ fn simple_pattern(text: &str) -> ParseResult { } fn tuple_struct_pattern(text: &str) -> ParseResult { - unimplemented!() + let p = tuple(( + qualified_name, + delimited(ws(tag("(")), + separated_nonempty_list(ws(tag(",")), ws(pattern)), + ws(tag(")")) + ) + )); + map(p, |(name, patterns)| Pattern::TupleStruct(name, patterns))(text) } fn record_pattern(text: &str) -> ParseResult {