goccmack / gocc

Parser / Scanner Generator
Other
618 stars 48 forks source link

TODOs in generated code #100

Closed skius closed 3 years ago

skius commented 3 years ago

This is only a small aesthetic issue, but I don't see the point in having TODO comments in the generated code. I wasn't able to find a previous issue talking about this, so I figured I'd open a discussion.

Specifically I'm talking about parser/productionstable.go: //TODO: change type and variable names to be consistent with other tables and token/token.go: //TODO: refactor to print pos & token string properly

awalterschulze commented 3 years ago

Probably a good idea to move these from the generated code into the code generator, so we can keep the TODOs, but not expose them in user code, since a user can't really do anything about them.

awalterschulze commented 3 years ago

I am happy to accept a pull request on this, if others do not object, which I do not suspect they will.

skius commented 3 years ago

@awalterschulze I tried something in #101.