pub trait AstToStr {
// Required method
fn ast_to_str_impl(&self, s: &dyn Symbols) -> String;
// Provided method
fn ast_to_str(&self) -> String { ... }
}
Expand description
A trait for printing ASTs in a pretty manner.
Required Methods§
Sourcefn ast_to_str_impl(&self, s: &dyn Symbols) -> String
fn ast_to_str_impl(&self, s: &dyn Symbols) -> String
This method should serialize the struct or enum recursively, returning a tree.
Provided Methods§
Sourcefn ast_to_str(&self) -> String
fn ast_to_str(&self) -> String
This method is auto-implemented to call ast_to_str_impl
with DefaultSymbols
.