antlr4 icon indicating copy to clipboard operation
antlr4 copied to clipboard

Go Target Code Should Use Godoc-Style Inline Docs

Open ereyes01 opened this issue 9 years ago • 3 comments

I'm new to ANTLR and I've been having fun all night with the new Go target, thanks for that!

I've been perusing some of the Go source trying to learn the API of the generated Go code, and I noticed that some functions are documented with what appears to be Javadoc style comments. The standard in Go is to use Godoc-style comments, and the Go linter will complain when exported fields / functions do not have a Godoc comment.

Also, having Godocs gives the free benefit of a nice doc webpage that is autogenerated for any go-gettable repository via godoc.org. Here's what the current ANTLR Go code looks like in godoc.org.

All that being said, I understand it's possible that ANTLR has a project-wide policy of thou shalt use Javadoc that supercedes the language's idiom... up to the maintainers I guess.

ereyes01 avatar Nov 19 '16 07:11 ereyes01

godoc would be best for go target. feel like fixing it? ;)

parrt avatar Nov 19 '16 23:11 parrt

I'd be happy to switch the existing javadoc-style ones when I get some time soon... However, for the many undocumented exported functions, someone who actually knows what they're doing with ANTLR would probably write better docs than I :-)

ereyes01 avatar Nov 20 '16 05:11 ereyes01

I will gradually improve this over time.

jimidle avatar Aug 23 '22 03:08 jimidle