From 6efda8f6cefdd69c3bae892eb168971a465d2a8b Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Sun, 13 Jan 2019 20:52:25 +0900 Subject: Update TUPLE_EXPR grammar --- crates/ra_syntax/src/ast/generated.rs | 6 +++++- crates/ra_syntax/src/grammar.ron | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index f745cb1cb..94842a514 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -2969,7 +2969,11 @@ impl AstNode for TupleExpr { } -impl TupleExpr {} +impl TupleExpr { + pub fn exprs(&self) -> impl Iterator { + super::children(self) + } +} // TuplePat #[derive(Debug, PartialEq, Eq, Hash)] diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index bac62fa04..dfd88bd10 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron @@ -357,7 +357,9 @@ Grammar( enum: ["FnDef", "TypeDef", "ConstDef"] ), - "TupleExpr": (), + "TupleExpr": ( + collections: [["exprs", "Expr"]] + ), "ArrayExpr": (), "ParenExpr": (options: ["Expr"]), "PathExpr": (options: ["Path"]), -- cgit v1.2.3