From b097090690f5edbe03f4aa9d042ba26c123699e4 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 11 Feb 2018 00:46:17 +0300 Subject: G: more types --- src/parser/grammar/items/consts.rs | 2 +- src/parser/grammar/items/mod.rs | 2 +- src/parser/grammar/items/structs.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/parser/grammar/items') diff --git a/src/parser/grammar/items/consts.rs b/src/parser/grammar/items/consts.rs index 8117af706..5f3cf58c2 100644 --- a/src/parser/grammar/items/consts.rs +++ b/src/parser/grammar/items/consts.rs @@ -14,7 +14,7 @@ fn const_or_static(p: &mut Parser, kw: SyntaxKind) { p.eat(MUT_KW); // TODO: validator to forbid const mut name(p); p.expect(COLON); - types::type_ref(p); + types::ty(p); p.expect(EQ); expressions::expr(p); p.expect(SEMI); diff --git a/src/parser/grammar/items/mod.rs b/src/parser/grammar/items/mod.rs index 8bb821fb6..f1776e0e2 100644 --- a/src/parser/grammar/items/mod.rs +++ b/src/parser/grammar/items/mod.rs @@ -247,7 +247,7 @@ fn type_item(p: &mut Parser) { type_params::where_clause(p); p.expect(EQ); - types::type_ref(p); + types::ty(p); p.expect(SEMI); } diff --git a/src/parser/grammar/items/structs.rs b/src/parser/grammar/items/structs.rs index eca0d2e64..ad18fd270 100644 --- a/src/parser/grammar/items/structs.rs +++ b/src/parser/grammar/items/structs.rs @@ -89,7 +89,7 @@ fn named_fields(p: &mut Parser) { if p.at(IDENT) { name(p); p.expect(COLON); - types::type_ref(p); + types::ty(p); field.complete(p, NAMED_FIELD); } else { field.abandon(p); @@ -105,7 +105,7 @@ fn pos_fields(p: &mut Parser) { while !p.at(R_PAREN) && !p.at(EOF) { let pos_field = p.start(); visibility(p); - types::type_ref(p); + types::ty(p); pos_field.complete(p, POS_FIELD); if !p.at(R_PAREN) { -- cgit v1.2.3