tuple struct
This commit is contained in:
parent
ad0434007b
commit
67b98c47fc
@ -265,7 +265,14 @@ fn simple_pattern(text: &str) -> ParseResult<Pattern> {
|
||||
}
|
||||
|
||||
fn tuple_struct_pattern(text: &str) -> ParseResult<Pattern> {
|
||||
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<Pattern> {
|
||||
|
Loading…
Reference in New Issue
Block a user