From afaa26636e4391ebacfc09e9c994c11bab58b834 Mon Sep 17 00:00:00 2001 From: Marcus Klaas de Vries Date: Tue, 15 Jan 2019 15:24:04 +0100 Subject: Add additional pattern variants --- crates/ra_syntax/src/ast/generated.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax/src/ast') diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 2d9603d90..2fd146bf1 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -2285,7 +2285,11 @@ impl AstNode for PathPat { } -impl PathPat {} +impl PathPat { + pub fn path(&self) -> Option<&Path> { + super::child_opt(self) + } +} // PathSegment #[derive(Debug, PartialEq, Eq, Hash)] @@ -3219,7 +3223,11 @@ impl AstNode for TuplePat { } -impl TuplePat {} +impl TuplePat { + pub fn args(&self) -> impl Iterator { + super::children(self) + } +} // TupleStructPat #[derive(Debug, PartialEq, Eq, Hash)] -- cgit v1.2.3