support docstrings

This commit is contained in:
Michael McLoughlin
2018-12-27 23:01:27 -08:00
parent 023324a4ec
commit 9f5277bf8e
6 changed files with 38 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ func (s *stubs) Print(f *avo.File) ([]byte, error) {
s.Printf("package %s\n", s.cfg.Pkg)
for _, fn := range f.Functions() {
s.NL()
s.Comment(fn.Doc...)
s.Printf("%s\n", fn.Stub())
}
return s.Result()