Skip to content

Split ParserState::consume() into two separate methods #1001

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

Open
JakeQZ opened this issue Feb 26, 2025 · 0 comments
Open

Split ParserState::consume() into two separate methods #1001

JakeQZ opened this issue Feb 26, 2025 · 0 comments

Comments

@JakeQZ
Copy link
Collaborator

JakeQZ commented Feb 26, 2025

  • One for the string parameter;
  • One for the int parameter.

The caller should know what type they are passing and therefore be able to call the appropriate method.

Making this change would avoid having a mixed-type parameter, which is not great for static analysis.

The class has been marked as @internal since 8.7, so we can freely change the public methods.

But before doing so, we should add a dedicated TestCase for the class.

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

No branches or pull requests

1 participant