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

Providing non-deprecated code sample in README.md #538

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

niklasschloegel
Copy link

As stated in #523 the README.md provides a code sample with the usage of a deprecated class, which leads to confusion
for new developers.

README.md Outdated

// Create the lexer and parser
let inputStream = new ANTLRInputStream("text");
let buffer = Buffer.from("text");
let inputStream = CodePointCharStream.fromBuffer(new CodePointBuffer(buffer, buffer.length));
Copy link

@AJamesPhillips AJamesPhillips Oct 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also found the deprecated code confusing so thanks for this PR.
My IDE's recommended replacement was

const inputStream = CharStreams.fromString("text")

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you're right, that one is even better.

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

Successfully merging this pull request may close these issues.

None yet

2 participants