swc/ecmascript/visit/macros/tests/vec_opt.rs
2020-05-25 22:53:48 +09:00

26 lines
443 B
Rust

use std::any::Any;
use swc_ecma_visit_macros::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),
}
});