1
1
//! Defines input for code generation process.
2
2
3
- #[ cfg( not( feature = "in-rust-tree" ) ) ]
4
3
pub ( crate ) struct KindsSrc < ' a > {
5
4
pub ( crate ) punct : & ' a [ ( & ' a str , & ' a str ) ] ,
6
5
pub ( crate ) keywords : & ' a [ & ' a str ] ,
@@ -10,7 +9,6 @@ pub(crate) struct KindsSrc<'a> {
10
9
pub ( crate ) nodes : & ' a [ & ' a str ] ,
11
10
}
12
11
13
- #[ cfg( not( feature = "in-rust-tree" ) ) ]
14
12
pub ( crate ) const KINDS_SRC : KindsSrc < ' _ > = KindsSrc {
15
13
punct : & [
16
14
( ";" , "SEMICOLON" ) ,
@@ -218,15 +216,13 @@ pub(crate) const KINDS_SRC: KindsSrc<'_> = KindsSrc {
218
216
] ,
219
217
} ;
220
218
221
- #[ cfg( not( feature = "in-rust-tree" ) ) ]
222
219
#[ derive( Default , Debug ) ]
223
220
pub ( crate ) struct AstSrc {
224
221
pub ( crate ) tokens : Vec < String > ,
225
222
pub ( crate ) nodes : Vec < AstNodeSrc > ,
226
223
pub ( crate ) enums : Vec < AstEnumSrc > ,
227
224
}
228
225
229
- #[ cfg( not( feature = "in-rust-tree" ) ) ]
230
226
#[ derive( Debug ) ]
231
227
pub ( crate ) struct AstNodeSrc {
232
228
pub ( crate ) doc : Vec < String > ,
@@ -235,21 +231,18 @@ pub(crate) struct AstNodeSrc {
235
231
pub ( crate ) fields : Vec < Field > ,
236
232
}
237
233
238
- #[ cfg( not( feature = "in-rust-tree" ) ) ]
239
234
#[ derive( Debug , Eq , PartialEq ) ]
240
235
pub ( crate ) enum Field {
241
236
Token ( String ) ,
242
237
Node { name : String , ty : String , cardinality : Cardinality } ,
243
238
}
244
239
245
- #[ cfg( not( feature = "in-rust-tree" ) ) ]
246
240
#[ derive( Debug , Eq , PartialEq ) ]
247
241
pub ( crate ) enum Cardinality {
248
242
Optional ,
249
243
Many ,
250
244
}
251
245
252
- #[ cfg( not( feature = "in-rust-tree" ) ) ]
253
246
#[ derive( Debug ) ]
254
247
pub ( crate ) struct AstEnumSrc {
255
248
pub ( crate ) doc : Vec < String > ,
0 commit comments