From fcce07d2d1b07cf4578af65b00a243e743a67f05 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 20:16:04 +0200 Subject: Finalize attribute grammar --- xtask/src/codegen/rust.ungram | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'xtask') diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index a97cc80e9..42ef2fb82 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -182,10 +182,7 @@ Visibility = ')')? Attr = - '#' '!'? '[' Path ('=' input:AttrInput)? ']' - -AttrInput = - Literal | TokenTree + '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' ParenType = '(' TypeRef ')' -- cgit v1.2.3 From fbe60a2e284035d16c2a1ee743ee88db418689aa Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 20:27:39 +0200 Subject: simplify --- xtask/src/codegen/rust.ungram | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xtask') diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 42ef2fb82..8c4f953b0 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -54,9 +54,8 @@ Abi = ParamList = '('( - (Param (',' Param)* ','?)? - | SelfParam ','? - | SelfParam ',' (Param (',' Param)* ','?) + SelfParam + | (SelfParam ',')? (Param (',' Param)* ','?)? )')' SelfParam = -- cgit v1.2.3