diff options
author | Wesley Moore <wes@wezm.net> | 2019-07-09 08:30:20 +1000 |
---|---|---|
committer | Wesley Moore <wes@wezm.net> | 2019-07-09 08:30:20 +1000 |
commit | 2630b8dde7000c4bc63312cc0de9eda599748634 (patch) | |
tree | 6cd445578406d9f4131fc025ce729cd8ecbf21a5 /src/annotate.rs | |
parent | 034d15a1a135bda84f45c768a1786f1548fe5156 (diff) |
Add Visitor
Diffstat (limited to 'src/annotate.rs')
-rw-r--r-- | src/annotate.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/annotate.rs b/src/annotate.rs index a11d9b7..9e1e831 100644 --- a/src/annotate.rs +++ b/src/annotate.rs @@ -1,4 +1,6 @@ use serde::Serialize; +use syn::visit::Visit; +use syn::FnDecl; #[derive(Serialize)] #[serde(tag = "type")] @@ -21,3 +23,11 @@ pub enum Annotation { content: String, }, } + +pub struct FnVisitor; + +impl<'ast> Visit<'ast> for FnVisitor { + fn visit_fn_decl(&mut self, i: &'ast FnDecl) { + dbg!(i); + } +} |