aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/codegen')
-rw-r--r--xtask/src/codegen/rust.ungram24
1 files changed, 12 insertions, 12 deletions
diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram
index b653c14a7..ef7c3e50e 100644
--- a/xtask/src/codegen/rust.ungram
+++ b/xtask/src/codegen/rust.ungram
@@ -4,7 +4,7 @@ SourceFile =
4 Item* 4 Item*
5 5
6Item = 6Item =
7 ConstDef 7 Const
8| Enum 8| Enum
9| ExternBlock 9| ExternBlock
10| ExternCrate 10| ExternCrate
@@ -12,7 +12,7 @@ Item =
12| ImplDef 12| ImplDef
13| MacroCall 13| MacroCall
14| Module 14| Module
15| StaticDef 15| Static
16| Struct 16| Struct
17| TraitDef 17| TraitDef
18| TypeAlias 18| TypeAlias
@@ -112,6 +112,14 @@ Union =
112 Attr* Visibility? 'union' Name GenericParamList? WhereClause? 112 Attr* Visibility? 'union' Name GenericParamList? WhereClause?
113 RecordFieldList 113 RecordFieldList
114 114
115Const =
116 Attr* Visibility? 'default'? 'const' (Name | '_') ':' ascribed_type:TypeRef
117 '=' body:Expr ';'
118
119Static =
120 Attr* Visibility? 'static'? 'mut'? Name ':' ascribed_type:TypeRef
121 '=' body:Expr ';'
122
115TraitDef = 123TraitDef =
116 Attr* Visibility? 'unsafe'? 'auto'? 'trait' Name GenericParamList 124 Attr* Visibility? 'unsafe'? 'auto'? 'trait' Name GenericParamList
117 (':' TypeBoundList?)? WhereClause 125 (':' TypeBoundList?)? WhereClause
@@ -120,14 +128,6 @@ TraitDef =
120AssocItemList = 128AssocItemList =
121 '{' AssocItem* '}' 129 '{' AssocItem* '}'
122 130
123ConstDef =
124 Attr* Visibility? 'default'? 'const' Name ':' ascribed_type:TypeRef
125 '=' body:Expr ';'
126
127StaticDef =
128 Attr* Visibility? 'static'? 'mut'? 'static' Name ':' ascribed_type:TypeRef
129 '=' body:Expr ';'
130
131ImplDef = 131ImplDef =
132 Attr* Visibility? 'const'? 'default'? 'unsafe'? 'impl' GenericParamList? '!'? 'for' 132 Attr* Visibility? 'const'? 'default'? 'unsafe'? 'impl' GenericParamList? '!'? 'for'
133 WhereClause? 133 WhereClause?
@@ -475,11 +475,11 @@ TypeRef =
475AssocItem = 475AssocItem =
476 Fn 476 Fn
477| TypeAlias 477| TypeAlias
478| ConstDef 478| Const
479| MacroCall 479| MacroCall
480 480
481ExternItem = 481ExternItem =
482 Fn | StaticDef 482 Fn | Static
483 483
484AttrInput = 484AttrInput =
485 Literal 485 Literal