Parse and infer tuple indices

This commit is contained in:
robojumper 2019-04-05 22:34:45 +02:00
parent 0372eca5b2
commit ca40ca93a5
13 changed files with 210 additions and 14 deletions

View file

@ -671,7 +671,10 @@ impl ExprCollector {
}
ast::ExprKind::FieldExpr(e) => {
let expr = self.collect_expr_opt(e.expr());
let name = e.name_ref().map(|nr| nr.as_name()).unwrap_or_else(Name::missing);
let name = match e.field_access() {
Some(kind) => kind.as_name(),
_ => Name::missing(),
};
self.alloc_expr(Expr::Field { expr, name }, syntax_ptr)
}
ast::ExprKind::TryExpr(e) => {