Skip to content

Conversation

sinopsysHK
Copy link
Contributor

Solve issue #2291
Tested on my sample file and it works as expected

(took the opportunity to sign contributors.txt)

This is to have appropriate logs during debug and avoid crashing in some occasions when startIndex=stopIndex

range(startIndex, stopIndex) is equivalent to an array of values from startIndex to stopIndex-1 thus when startIndex=stopIndex range(startIndex, stopIndex+1) = [startIndex] which is not exactly an interval and would break getText that is expecting an interval as a Tuple.
@ericvergnaud
Copy link
Contributor

@parrt blessed

@parrt parrt added this to the 4.7.2 milestone Jul 24, 2018
@parrt parrt merged commit 4618842 into antlr:master Jul 24, 2018
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