pub trait Gen: GetSpan {
// Required method
fn gen(&self, p: &mut Codegen<'_>, ctx: Context);
// Provided method
fn print(&self, p: &mut Codegen<'_>, ctx: Context) { ... }
}Expand description
Generate source code for an AST node.
pub trait Gen: GetSpan {
// Required method
fn gen(&self, p: &mut Codegen<'_>, ctx: Context);
// Provided method
fn print(&self, p: &mut Codegen<'_>, ctx: Context) { ... }
}Generate source code for an AST node.