Added inference of array length

This commit is contained in:
Lenard Pratt
2019-04-03 23:23:58 +01:00
parent 36f5d99756
commit 2d73c909fe
6 changed files with 62 additions and 5 deletions

View File

@@ -108,6 +108,10 @@ 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,7 +395,8 @@ Grammar(
collections: [["exprs", "Expr"]]
),
"ArrayExpr": (
collections: [["exprs", "Expr"]]
collections: [["exprs", "Expr"]],
options:[["repeat","Expr"]]
),
"ParenExpr": (options: ["Expr"]),
"PathExpr": (options: ["Path"]),