From 993abedd77cf23ce2281b6c8e60cab49ab4fa97e Mon Sep 17 00:00:00 2001 From: Sergey Parilin Date: Wed, 15 May 2019 15:35:47 +0300 Subject: apply T! macro where it is possible --- crates/ra_parser/src/grammar/items/consts.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_parser/src/grammar/items/consts.rs') diff --git a/crates/ra_parser/src/grammar/items/consts.rs b/crates/ra_parser/src/grammar/items/consts.rs index 1f802246f..b4908ebba 100644 --- a/crates/ra_parser/src/grammar/items/consts.rs +++ b/crates/ra_parser/src/grammar/items/consts.rs @@ -1,22 +1,22 @@ use super::*; pub(super) fn static_def(p: &mut Parser, m: Marker) { - const_or_static(p, m, STATIC_KW, STATIC_DEF) + const_or_static(p, m, T![static], STATIC_DEF) } pub(super) fn const_def(p: &mut Parser, m: Marker) { - const_or_static(p, m, CONST_KW, CONST_DEF) + const_or_static(p, m, T![const], CONST_DEF) } fn const_or_static(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { assert!(p.at(kw)); p.bump(); - p.eat(MUT_KW); // FIXME: validator to forbid const mut + p.eat(T![mut]); // FIXME: validator to forbid const mut name(p); types::ascription(p); - if p.eat(EQ) { + if p.eat(T![=]) { expressions::expr(p); } - p.expect(SEMI); + p.expect(T![;]); m.complete(p, def); } -- cgit v1.2.3