From 84ba547c7c80e45cc8edafcde8714973bb2a3a2f Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 20 Jan 2021 21:33:13 +0100 Subject: =?UTF-8?q?If=20expressions=20=F0=9F=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/parse/collection.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/parse/collection.rs') diff --git a/src/parse/collection.rs b/src/parse/collection.rs index 9addcef0..58fd91ae 100644 --- a/src/parse/collection.rs +++ b/src/parse/collection.rs @@ -11,7 +11,7 @@ pub fn arguments(p: &mut Parser) -> ExprArgs { /// - Dictionary literal /// - Parenthesized expression pub fn parenthesized(p: &mut Parser) -> Expr { - p.start_group(Group::Paren); + p.start_group(Group::Paren, TokenMode::Code); let state = if p.eat_if(Token::Colon) { collection(p, State::Dict(vec![])) } else { @@ -30,7 +30,7 @@ fn collection(p: &mut Parser, mut collection: T) -> T { collection.push_arg(p, arg); if let Some(pos) = missing_coma.take() { - p.diag_expected_at("comma", pos); + p.expected_at("comma", pos); } if p.eof() { -- cgit v1.2.3