swc/crates/swc_visit/tests/opt_vec.rs
Donny/강동윤 9b76783281
refactor(common): Cleanup & rustfmt (#3495)
swc_common:
 - Merge identical source codes.

swc_css_parser:
 - Deny `clippy::all`.
 - Fix lints.
2022-02-09 06:33:32 +00:00

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),
}
});