Go runtime missing export of "String()"
- Dominant language
- Java
- Stars
- 19k
- Forks
- 3.5k
- PR merge metrics
- No merged PRs in 30d
Description
ToString() is available in the Go target (commonly referred to as "Golang" in order to appease web search engines) for a token--actually BaseToken--as "[String()](https://github.com/antlr/antlr4/blob/33122ac442fdfd5884a5182dac559889de60c218/runtime/Go/antlr/token.go#L190)". It's not clear why it's missing from [Token](https://github.com/antlr/antlr4/blob/33122ac442fdfd5884a5182dac559889de60c218/runtime/Go/antlr/token.go#L21). In C# or Java, every object has ToString() available, accomplished without doing a type cast. Token.String() should be an exported function.
Contributor guide
Research direction
Start in runtime/Go/antlr/token.go, comparing the Token interface around line 21 with BaseToken.String() around line 190. Confirm the public Token API exposes String() without a type cast, and verify the Go runtime tests still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100