summaryrefslogtreecommitdiffstats
path: root/src/annotate.rs
diff options
context:
space:
mode:
authorWesley Moore <wes@wezm.net>2019-07-09 08:30:20 +1000
committerWesley Moore <wes@wezm.net>2019-07-09 08:30:20 +1000
commit2630b8dde7000c4bc63312cc0de9eda599748634 (patch)
tree6cd445578406d9f4131fc025ce729cd8ecbf21a5 /src/annotate.rs
parent034d15a1a135bda84f45c768a1786f1548fe5156 (diff)
Add Visitor
Diffstat (limited to 'src/annotate.rs')
-rw-r--r--src/annotate.rs10
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);
+ }
+}