Skip to content

Conversation

jimidle
Copy link
Collaborator

@jimidle jimidle commented Apr 23, 2023

fix: Implement Reset in TokenStream interface and fix both it and SetTokenSource

ping: @parrt

  - 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 <[email protected]>
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.

2 participants