aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast.rs2
-rw-r--r--crates/ra_syntax/src/ast/expr_extensions.rs2
-rw-r--r--crates/ra_syntax/src/ast/generated.rs4
-rw-r--r--crates/ra_syntax/src/grammar.ron3
4 files changed, 3 insertions, 8 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index 970b89825..c2ab19d97 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -17,7 +17,7 @@ pub use self::{
17 generated::*, 17 generated::*,
18 traits::*, 18 traits::*,
19 tokens::*, 19 tokens::*,
20 extensions::{PathSegmentKind, StructKind, SelfParamKind}, 20 extensions::{PathSegmentKind, StructKind,FieldKind, SelfParamKind},
21 expr_extensions::{ElseBranch, PrefixOp, BinOp, LiteralKind,ArrayExprKind}, 21 expr_extensions::{ElseBranch, PrefixOp, BinOp, LiteralKind,ArrayExprKind},
22}; 22};
23 23
diff --git a/crates/ra_syntax/src/ast/expr_extensions.rs b/crates/ra_syntax/src/ast/expr_extensions.rs
index d21ec80c3..9484c3b9b 100644
--- a/crates/ra_syntax/src/ast/expr_extensions.rs
+++ b/crates/ra_syntax/src/ast/expr_extensions.rs
@@ -203,7 +203,7 @@ impl ast::ArrayExpr {
203 if self.is_repeat() { 203 if self.is_repeat() {
204 ArrayExprKind::Repeat { 204 ArrayExprKind::Repeat {
205 initializer: children(self).nth(0), 205 initializer: children(self).nth(0),
206 repeat: children(self).nth(2), 206 repeat: children(self).nth(1),
207 } 207 }
208 } else { 208 } else {
209 ArrayExprKind::ElementList(children(self)) 209 ArrayExprKind::ElementList(children(self))
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs
index 39b760551..0376c91c8 100644
--- a/crates/ra_syntax/src/ast/generated.rs
+++ b/crates/ra_syntax/src/ast/generated.rs
@@ -108,10 +108,6 @@ impl ArrayExpr {
108 pub fn exprs(&self) -> impl Iterator<Item = &Expr> { 108 pub fn exprs(&self) -> impl Iterator<Item = &Expr> {
109 super::children(self) 109 super::children(self)
110 } 110 }
111
112 pub fn repeat(&self) -> Option<&Expr> {
113 super::child_opt(self)
114 }
115} 111}
116 112
117// ArrayType 113// ArrayType
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron
index c7116c69b..0a35e25d5 100644
--- a/crates/ra_syntax/src/grammar.ron
+++ b/crates/ra_syntax/src/grammar.ron
@@ -395,8 +395,7 @@ Grammar(
395 collections: [["exprs", "Expr"]] 395 collections: [["exprs", "Expr"]]
396 ), 396 ),
397 "ArrayExpr": ( 397 "ArrayExpr": (
398 collections: [["exprs", "Expr"]], 398 collections: [["exprs", "Expr"]]
399 options:[["repeat","Expr"]]
400 ), 399 ),
401 "ParenExpr": (options: ["Expr"]), 400 "ParenExpr": (options: ["Expr"]),
402 "PathExpr": (options: ["Path"]), 401 "PathExpr": (options: ["Path"]),