Skip to content

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

@JakeQZ

Description

@JakeQZ
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions