From 4771a5679188177e653262e69ed7e33b4bf60c65 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Thu, 18 Mar 2021 22:25:10 +0100 Subject: Parse extended_key_value_attributes --- crates/parser/src/grammar/attributes.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/parser/src/grammar') diff --git a/crates/parser/src/grammar/attributes.rs b/crates/parser/src/grammar/attributes.rs index dab0f62c3..96791ffc2 100644 --- a/crates/parser/src/grammar/attributes.rs +++ b/crates/parser/src/grammar/attributes.rs @@ -30,8 +30,8 @@ fn attr(p: &mut Parser, inner: bool) { match p.current() { T![=] => { p.bump(T![=]); - if expressions::literal(p).is_none() { - p.error("expected literal"); + if expressions::expr(p).0.is_none() { + p.error("expected expression"); } } T!['('] | T!['['] | T!['{'] => items::token_tree(p), -- cgit v1.2.3