From e79ec8e4cba6db185d7bf887ab577bb6fd0b68dd Mon Sep 17 00:00:00 2001 From: Adam Kelly Date: Sun, 29 Jul 2018 08:48:28 +0100 Subject: [PATCH] Suppress unused variable warnings. --- parser/src/python.lalrpop | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/src/python.lalrpop b/parser/src/python.lalrpop index 92bdfbca0..8106a5cc0 100644 --- a/parser/src/python.lalrpop +++ b/parser/src/python.lalrpop @@ -161,7 +161,7 @@ ForStatement: ast::Statement = { }; WithStatement: ast::Statement = { - "with" "as" ":" => ast::Statement::With { items: t, body: s }, + "with" "as" <_e:Expression> ":" => ast::Statement::With { items: t, body: s }, }; FuncDef: ast::Statement = { @@ -177,7 +177,7 @@ TypedArgsList: Vec = { }; ClassDef: ast::Statement = { - "class" ":" => ast::Statement::ClassDef { name: n }, + "class" <_a:("(" ")")?> ":" <_s:Suite> => ast::Statement::ClassDef { name: n }, }; Test: ast::Expression = {