refactor ast extractor to use rustdoc visitor