Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Go] Type signature error #4578

Open
jonlundy opened this issue Apr 3, 2024 · 1 comment
Open

[Go] Type signature error #4578

jonlundy opened this issue Apr 3, 2024 · 1 comment

Comments

@jonlundy
Copy link

jonlundy commented Apr 3, 2024

Hi, the commit here: c96c9cc

the CharStream signature for GetTextFromInterval(Interval) string
https://github.com/antlr/antlr4/blob/dev/runtime/Go/antlr/v4/char_stream.go#L11

seems to have missed changing the pointer for NewInputStream(data string) *InputStream
https://github.com/antlr/antlr4/blob/dev/runtime/Go/antlr/v4/input_stream.go#L48

@jonlundy jonlundy changed the title type signature error [Go] Type signature error Apr 3, 2024
@jimidle
Copy link
Collaborator

jimidle commented May 18, 2024

func (is *InputStream) GetTextFromInterval(i Interval) string {
	return is.GetText(i.Start, i.Stop)
}
...


func (c *CommonTokenStream) GetTextFromInterval(interval Interval) string {

CharStream is an interface. Can you elaborate on what you mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants