mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
9b76783281
swc_common: - Merge identical source codes. swc_css_parser: - Deny `clippy::all`. - Fix lints.
27 lines
432 B
Rust
27 lines
432 B
Rust
use std::any::Any;
|
|
|
|
use swc_visit::define;
|
|
|
|
/// Visitable nodes.
|
|
pub trait Node: Any {}
|
|
|
|
impl<T: ?Sized> Node for T where T: Any {}
|
|
|
|
pub struct Item {
|
|
pub opt_vec1: Option<Vec<Item>>,
|
|
pub opt_vec2: Option<Vec<Enum>>,
|
|
}
|
|
pub enum Enum {
|
|
Item(Item),
|
|
}
|
|
|
|
define!({
|
|
pub struct Item {
|
|
pub opt_vec1: Option<Vec<Item>>,
|
|
pub opt_vec2: Option<Vec<Enum>>,
|
|
}
|
|
pub enum Enum {
|
|
Item(Item),
|
|
}
|
|
});
|