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

Feat: Clean up go input streams to be a little more efficient #4233

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

jimidle
Copy link
Collaborator

@jimidle jimidle commented Apr 17, 2023

feat: Clean up input streams

  • The input streams were inefficient, making more copies of the incoming data than they needed to.
  • Add new Go idiomatic IO stream, though this cannot be open-ended such as a socket, it is easier for go programmers
    in certain situations.

  - FileStream reader was reading in to bytes, then converting to string, then converting to runes
  - Created a stream that can initialize directly from an io.Reader, which is more idiomatic go
  - Cleaned up InputStream creation

Signed-off-by: Jim.Idle <jimi@idle.ws>
Signed-off-by: Jim.Idle <jimi@idle.ws>
@jimidle
Copy link
Collaborator Author

jimidle commented Apr 18, 2023

@parrt Would you merge please?

@parrt parrt added this to the 4.12.1 milestone Apr 18, 2023
@parrt parrt merged commit 518121f into antlr:dev Apr 18, 2023
45 checks passed
@jimidle jimidle deleted the feature/ioreader branch April 19, 2023 02:21
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.

None yet

2 participants