1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use crate::ast::Span;
use crate::compile::Meta;
use crate::SourceId;
pub trait CompileVisitor {
fn register_meta(&mut self, _meta: &Meta) {}
fn visit_meta(&mut self, _source_id: SourceId, _meta: &Meta, _span: Span) {}
fn visit_variable_use(&mut self, _source_id: SourceId, _var_span: Span, _span: Span) {}
fn visit_mod(&mut self, _source_id: SourceId, _span: Span) {}
}
pub(crate) struct NoopCompileVisitor(());
impl NoopCompileVisitor {
pub(crate) const fn new() -> Self {
Self(())
}
}
impl CompileVisitor for NoopCompileVisitor {}