-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow CommonTokenStream to reset properly
- There is a flag in CommonTokenStream that indicates whether EOF has already been fetched/seen. This was not being reset when a new TokenSource was given to an existing CommonTokenStream and there was no Reset() function which was unfortunately not exported and not part of the interface for TokenStream. - Reset the flag when a new source is provided - Export the Reset() function so that a TokenStream can be rewound Signed-off-by: Jim.Idle <jimi@idle.ws>
- Loading branch information
Showing
3 changed files
with
6 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters