11//! Defines input for code generation process.
22
3- #[ cfg( not( feature = "in-rust-tree" ) ) ]
43pub ( crate ) struct KindsSrc < ' a > {
54 pub ( crate ) punct : & ' a [ ( & ' a str , & ' a str ) ] ,
65 pub ( crate ) keywords : & ' a [ & ' a str ] ,
@@ -10,7 +9,6 @@ pub(crate) struct KindsSrc<'a> {
109 pub ( crate ) nodes : & ' a [ & ' a str ] ,
1110}
1211
13- #[ cfg( not( feature = "in-rust-tree" ) ) ]
1412pub ( crate ) const KINDS_SRC : KindsSrc < ' _ > = KindsSrc {
1513 punct : & [
1614 ( ";" , "SEMICOLON" ) ,
@@ -218,15 +216,13 @@ pub(crate) const KINDS_SRC: KindsSrc<'_> = KindsSrc {
218216 ] ,
219217} ;
220218
221- #[ cfg( not( feature = "in-rust-tree" ) ) ]
222219#[ derive( Default , Debug ) ]
223220pub ( crate ) struct AstSrc {
224221 pub ( crate ) tokens : Vec < String > ,
225222 pub ( crate ) nodes : Vec < AstNodeSrc > ,
226223 pub ( crate ) enums : Vec < AstEnumSrc > ,
227224}
228225
229- #[ cfg( not( feature = "in-rust-tree" ) ) ]
230226#[ derive( Debug ) ]
231227pub ( crate ) struct AstNodeSrc {
232228 pub ( crate ) doc : Vec < String > ,
@@ -235,21 +231,18 @@ pub(crate) struct AstNodeSrc {
235231 pub ( crate ) fields : Vec < Field > ,
236232}
237233
238- #[ cfg( not( feature = "in-rust-tree" ) ) ]
239234#[ derive( Debug , Eq , PartialEq ) ]
240235pub ( crate ) enum Field {
241236 Token ( String ) ,
242237 Node { name : String , ty : String , cardinality : Cardinality } ,
243238}
244239
245- #[ cfg( not( feature = "in-rust-tree" ) ) ]
246240#[ derive( Debug , Eq , PartialEq ) ]
247241pub ( crate ) enum Cardinality {
248242 Optional ,
249243 Many ,
250244}
251245
252- #[ cfg( not( feature = "in-rust-tree" ) ) ]
253246#[ derive( Debug ) ]
254247pub ( crate ) struct AstEnumSrc {
255248 pub ( crate ) doc : Vec < String > ,
0 commit comments