diff options
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/src/ast_src.rs | 4 | ||||
-rw-r--r-- | xtask/src/codegen/rust.ungram | 24 |
2 files changed, 14 insertions, 14 deletions
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs index 94f4d17aa..56e3f4b0a 100644 --- a/xtask/src/ast_src.rs +++ b/xtask/src/ast_src.rs | |||
@@ -101,8 +101,8 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc { | |||
101 | "EXTERN_CRATE", | 101 | "EXTERN_CRATE", |
102 | "MODULE", | 102 | "MODULE", |
103 | "USE", | 103 | "USE", |
104 | "STATIC_DEF", | 104 | "STATIC", |
105 | "CONST_DEF", | 105 | "CONST", |
106 | "TRAIT_DEF", | 106 | "TRAIT_DEF", |
107 | "IMPL_DEF", | 107 | "IMPL_DEF", |
108 | "TYPE_ALIAS", | 108 | "TYPE_ALIAS", |
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 | ||
6 | Item = | 6 | Item = |
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 | ||
115 | Const = | ||
116 | Attr* Visibility? 'default'? 'const' (Name | '_') ':' ascribed_type:TypeRef | ||
117 | '=' body:Expr ';' | ||
118 | |||
119 | Static = | ||
120 | Attr* Visibility? 'static'? 'mut'? Name ':' ascribed_type:TypeRef | ||
121 | '=' body:Expr ';' | ||
122 | |||
115 | TraitDef = | 123 | TraitDef = |
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 = | |||
120 | AssocItemList = | 128 | AssocItemList = |
121 | '{' AssocItem* '}' | 129 | '{' AssocItem* '}' |
122 | 130 | ||
123 | ConstDef = | ||
124 | Attr* Visibility? 'default'? 'const' Name ':' ascribed_type:TypeRef | ||
125 | '=' body:Expr ';' | ||
126 | |||
127 | StaticDef = | ||
128 | Attr* Visibility? 'static'? 'mut'? 'static' Name ':' ascribed_type:TypeRef | ||
129 | '=' body:Expr ';' | ||
130 | |||
131 | ImplDef = | 131 | ImplDef = |
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 = | |||
475 | AssocItem = | 475 | AssocItem = |
476 | Fn | 476 | Fn |
477 | | TypeAlias | 477 | | TypeAlias |
478 | | ConstDef | 478 | | Const |
479 | | MacroCall | 479 | | MacroCall |
480 | 480 | ||
481 | ExternItem = | 481 | ExternItem = |
482 | Fn | StaticDef | 482 | Fn | Static |
483 | 483 | ||
484 | AttrInput = | 484 | AttrInput = |
485 | Literal | 485 | Literal |