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

Add Go accessor for IntervalSet.intervals #3800

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

JamesRTaylor
Copy link
Contributor

Signed-off-by: James Taylor jamestaylor@apache.org

Unlike the Java version, in the Go-based version of interval_sets, there's no way to access the IntervalSets.intervals field. This field is useful when using Parser.getExpectedTokens(). The alternative is to use IntervalSets#StringVerbose and parse the string returned (which is much more expensive).

Signed-off-by: James Taylor <jamestaylor@apache.org>
@parrt
Copy link
Member

parrt commented Aug 4, 2022

Makes sense. thanks.

@parrt parrt merged commit 2e23faa into antlr:dev Aug 4, 2022
@jimidle
Copy link
Collaborator

jimidle commented Aug 22, 2022

In Go, we should either make the field visible or use an accessor called Intervals() rather than GetIntervals(). However, I guess we can close #3801 now?

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

Successfully merging this pull request may close these issues.

3 participants