mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 07:02:28 +03:00
29 lines
460 B
Rust
29 lines
460 B
Rust
#![allow(clippy::ptr_arg)]
|
|
|
|
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 vec_opt1: Vec<Option<Item>>,
|
|
pub vec_opt2: Vec<Option<Enum>>,
|
|
}
|
|
pub enum Enum {
|
|
Item(Item),
|
|
}
|
|
|
|
define!({
|
|
pub struct Item {
|
|
pub vec_opt1: Vec<Option<Item>>,
|
|
pub vec_opt2: Vec<Option<Enum>>,
|
|
}
|
|
pub enum Enum {
|
|
Item(Item),
|
|
}
|
|
});
|