From 23172a116c3cc4ca9a692dfdd05051d1a4aee2b2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 26 Jan 2019 00:24:12 +0300 Subject: rename POS_FIELD -> POS_FIELD_DEF to match NAMED_FIELD_DEF --- crates/ra_syntax/src/grammar/items/nominal.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_syntax/src/grammar/items/nominal.rs') diff --git a/crates/ra_syntax/src/grammar/items/nominal.rs b/crates/ra_syntax/src/grammar/items/nominal.rs index 0784fb7b1..ff9b38f9c 100644 --- a/crates/ra_syntax/src/grammar/items/nominal.rs +++ b/crates/ra_syntax/src/grammar/items/nominal.rs @@ -28,7 +28,7 @@ pub(super) fn struct_def(p: &mut Parser, kind: SyntaxKind) { } L_CURLY => named_field_def_list(p), L_PAREN if kind == STRUCT_KW => { - pos_field_list(p); + pos_field_def_list(p); // test tuple_struct_where // struct Test(T) where T: Clone; // struct Test(T); @@ -74,7 +74,7 @@ pub(crate) fn enum_variant_list(p: &mut Parser) { name(p); match p.current() { L_CURLY => named_field_def_list(p), - L_PAREN => pos_field_list(p), + L_PAREN => pos_field_def_list(p), EQ => { p.bump(); expressions::expr(p); @@ -132,7 +132,7 @@ pub(crate) fn named_field_def_list(p: &mut Parser) { } } -fn pos_field_list(p: &mut Parser) { +fn pos_field_def_list(p: &mut Parser) { assert!(p.at(L_PAREN)); let m = p.start(); if !p.expect(L_PAREN) { @@ -157,12 +157,12 @@ fn pos_field_list(p: &mut Parser) { break; } types::type_(p); - m.complete(p, POS_FIELD); + m.complete(p, POS_FIELD_DEF); if !p.at(R_PAREN) { p.expect(COMMA); } } p.expect(R_PAREN); - m.complete(p, POS_FIELD_LIST); + m.complete(p, POS_FIELD_DEF_LIST); } -- cgit v1.2.3