updated snapshots

This commit is contained in:
Lenard Pratt
2019-04-05 11:19:25 +01:00
parent e175921932
commit b27fa33a9f
6 changed files with 44 additions and 77 deletions

View File

@@ -17,7 +17,7 @@ pub use self::{
generated::*,
traits::*,
tokens::*,
extensions::{PathSegmentKind, StructKind, SelfParamKind},
extensions::{PathSegmentKind, StructKind,FieldKind, SelfParamKind},
expr_extensions::{ElseBranch, PrefixOp, BinOp, LiteralKind,ArrayExprKind},
};

View File

@@ -203,7 +203,7 @@ impl ast::ArrayExpr {
if self.is_repeat() {
ArrayExprKind::Repeat {
initializer: children(self).nth(0),
repeat: children(self).nth(2),
repeat: children(self).nth(1),
}
} else {
ArrayExprKind::ElementList(children(self))

View File

@@ -108,10 +108,6 @@ impl ArrayExpr {
pub fn exprs(&self) -> impl Iterator<Item = &Expr> {
super::children(self)
}
pub fn repeat(&self) -> Option<&Expr> {
super::child_opt(self)
}
}
// ArrayType

View File

@@ -395,8 +395,7 @@ Grammar(
collections: [["exprs", "Expr"]]
),
"ArrayExpr": (
collections: [["exprs", "Expr"]],
options:[["repeat","Expr"]]
collections: [["exprs", "Expr"]]
),
"ParenExpr": (options: ["Expr"]),
"PathExpr": (options: ["Path"]),