diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-30 17:11:26 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-30 17:11:26 +0000 |
| commit | e28ea81b2b68a61b5c5eec3c815172b17256a25f (patch) | |
| tree | 52ff9cf9deb7a2116d7330ca36379f71808a18e5 /xtask/src/codegen | |
| parent | bc8610e2b58fe101ddc34d0ce389cfa829060c62 (diff) | |
| parent | 01d6c3836b1c540b14d9c9e17974df64afa978c0 (diff) | |
| download | rust-e28ea81b2b68a61b5c5eec3c815172b17256a25f.tar.gz rust-e28ea81b2b68a61b5c5eec3c815172b17256a25f.zip | |
Merge #5609
5609: Attrs & Vis r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Diffstat (limited to 'xtask/src/codegen')
| -rw-r--r-- | xtask/src/codegen/rust.ungram | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 4025f7f96cd..a97cc80e992 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -173,6 +173,20 @@ ConstParam = LifetimeParam = Attr* 'lifetime' +Visibility = + 'pub' ('(' + 'super' + | 'self' + | 'crate' + | 'in' Path + ')')? + +Attr = + '#' '!'? '[' Path ('=' input:AttrInput)? ']' + +AttrInput = + Literal | TokenTree + ParenType = '(' TypeRef ')' @@ -391,9 +405,6 @@ TupleStructPat = TuplePat = '(' args:Pat* ')' -Visibility = - 'pub' ('(' 'super' | 'self' | 'crate' | 'in' Path ')')? - Name = 'ident' @@ -416,9 +427,6 @@ MacroStmts = statements:Stmt* Expr? -Attr = - '#' '!'? '[' Path ('=' input:AttrInput)? ']' - TypeBound = 'lifetime' | 'const'? TypeRef @@ -465,9 +473,6 @@ LifetimeArg = ConstArg = Literal | BlockExpr BlockExpr -MetaItem = - Path '=' AttrInput nested_meta_items:MetaItem* - AdtDef = Struct | Enum @@ -488,10 +493,6 @@ TypeRef = | ImplTraitType | DynTraitType -AttrInput = - Literal -| TokenTree - Stmt = LetStmt | ExprStmt |
