copygen icon indicating copy to clipboard operation
copygen copied to clipboard

Parser: Fix Free Floating Comments

Open switchupcb opened this issue 2 years ago • 0 comments

Copygen allows developers to define types, structs, and more in its setup.go file and has no issues copying them to the output; except for comments. The Go AST makes it "very difficult to update the AST and retain correct comment place (from 2017)" and is not likely to change any time soon. As a result, Copygen sometimes generates free-floating comments (i.e multi.go). Copygen's comments are handled in its Parser. Feel free to use any necessary libraries or rewriting of the comment-parsing mechanism to fix this issue.

switchupcb avatar Jun 27 '22 15:06 switchupcb