Skip to content
This repository was archived by the owner on Dec 25, 2019. It is now read-only.

Commit aa9b649

Browse files
authored
Merge pull request #11 from MaterializeInc/mut-visit
Support mutable visitation
2 parents 3e1f469 + 731370b commit aa9b649

3 files changed

Lines changed: 1684 additions & 1618 deletions

File tree

src/ast/mod.rs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,26 @@ mod ddl;
1717
mod operator;
1818
mod query;
1919
mod value;
20-
pub mod visit;
20+
#[macro_use]
21+
mod visit_macro;
22+
23+
pub mod visit {
24+
// Visiting an enum struct variant with many arguments forces our hand here.
25+
// If, over time, we convert these large variants to dedicated structs, we
26+
// can remove this escape hatch.
27+
#![allow(clippy::too_many_arguments)]
28+
// Disable lints that want us to rewrite `&Ident` as `&str`, as `&str` is not as
29+
// self-documenting as &Ident.
30+
#![allow(clippy::ptr_arg)]
31+
make_visitor!(Visit: &);
32+
}
33+
34+
pub mod visit_mut {
35+
// See justification for these attributes in the `visit` module.
36+
#![allow(clippy::too_many_arguments)]
37+
#![allow(clippy::ptr_arg)]
38+
make_visitor!(VisitMut: &mut);
39+
}
2140

2241
use std::fmt;
2342

0 commit comments

Comments
 (0)