pipeline_script/postprocessor/
printer.rs

1use crate::ast::NodeTrait;
2use crate::postprocessor::{Stage, VisitResult, Visitor};
3
4pub struct Printer {}
5
6impl Visitor for Printer {
7    fn stage(&self) -> Stage {
8        Stage::AfterTypeInfer
9    }
10    fn match_id(&self, _: &str) -> bool {
11        true
12    }
13
14    fn visit(&self, node: &mut (impl NodeTrait + ?Sized)) -> VisitResult {
15        dbg!(node.get_id());
16        VisitResult::Break
17    }
18}