From 4729a1b05427aa7d63b1dcb9ee6dceef2cfc613e Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Sun, 13 Jan 2019 22:46:10 +0900 Subject: Update ARRAY_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 3471d5226..2d9603d90 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -67,7 +67,11 @@ impl AstNode for ArrayExpr { } -impl ArrayExpr {} +impl ArrayExpr { + pub fn exprs(&self) -> impl Iterator { + super::children(self) + } +} // ArrayType #[derive(Debug, PartialEq, Eq, Hash)] diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index bd8c5b411..2aaad46b1 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron @@ -360,7 +360,9 @@ Grammar( "TupleExpr": ( collections: [["exprs", "Expr"]] ), - "ArrayExpr": (), + "ArrayExpr": ( + collections: [["exprs", "Expr"]] + ), "ParenExpr": (options: ["Expr"]), "PathExpr": (options: ["Path"]), "LambdaExpr": ( -- cgit v1.2.3