asdl_rs.py to multiple file output

This commit is contained in:
Jeong YunWon 2023-05-10 17:30:28 +09:00
parent e000b1c304
commit 17c8abcec1
6 changed files with 1766 additions and 968 deletions

View file

@ -4,6 +4,10 @@ mod constant;
mod fold_helpers;
mod generic {
#![allow(clippy::derive_partial_eq_without_eq)]
pub use crate::{constant::*, Attributed};
type Ident = String;
include!("gen/generic.rs");
}
mod impls;
@ -19,9 +23,23 @@ pub use rustpython_parser_core::{text_size, ConversionFlag};
pub type Suite<U = ()> = Vec<Stmt<U>>;
#[cfg(feature = "fold")]
pub mod fold {
use super::generic::*;
include!("gen/fold.rs");
}
#[cfg(feature = "visitor")]
mod visitor {
use super::generic::*;
include!("gen/visitor.rs");
}
#[cfg(feature = "source-code")]
pub mod located {
include!("gen/located.rs");
}
pub use rustpython_parser_core::source_code;
#[cfg(feature = "visitor")]
pub use visitor::Visitor;