swc/crates/rplugin/tests/macro.rs
2021-11-09 20:42:49 +09:00

34 lines
463 B
Rust

pub struct BinExpr {
pub left: Box<Expr>,
pub op: String,
pub right: Box<Expr>,
}
pub enum Expr {
Lit(Lit),
Bin(BinExpr),
}
pub enum Lit {
Number(usize),
}
#[rplugin::ast_for_plugin(crate)]
mod plugin {
pub struct BinExpr {
pub left: Box<Expr>,
pub op: String,
pub right: Box<Expr>,
}
pub enum Expr {
Lit(Lit),
Bin(BinExpr),
}
pub enum Lit {
Number(usize),
}
}