From e0f21133cd03c6160fbc97b70bbd50ccde4fe6d9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 12:02:42 +0200 Subject: Reorder --- xtask/src/codegen/rust.ungram | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'xtask/src/codegen/rust.ungram') diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index 375df301f..1c1dec80a 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -114,6 +114,11 @@ Union = Attr* Visibility? 'union' Name GenericParamList? WhereClause? RecordFieldList +AdtDef = + Struct +| Enum +| Union + Const = Attr* Visibility? 'default'? 'const' (Name | '_') ':' ty:TypeRef '=' body:Expr ';' @@ -183,6 +188,21 @@ Visibility = Attr = '#' '!'? '[' Path ('=' Literal | TokenTree)? ']' +TypeRef = + ParenType +| TupleType +| NeverType +| PathType +| PointerType +| ArrayType +| SliceType +| ReferenceType +| PlaceholderType +| FnPointerType +| ForType +| ImplTraitType +| DynTraitType + ParenType = '(' ty:TypeRef ')' @@ -469,26 +489,6 @@ LifetimeArg = ConstArg = Literal | BlockExpr BlockExpr -AdtDef = - Struct -| Enum -| Union - -TypeRef = - ParenType -| TupleType -| NeverType -| PathType -| PointerType -| ArrayType -| SliceType -| ReferenceType -| PlaceholderType -| FnPointerType -| ForType -| ImplTraitType -| DynTraitType - Stmt = LetStmt | ExprStmt -- cgit v1.2.3