apollo-rs icon indicating copy to clipboard operation
apollo-rs copied to clipboard

refactor(parser): Use peek_token() to streamline peek operations

Open surajk-m opened this issue 5 months ago • 3 comments

Closes #830

This PR refactors parser to use peek_token() instead of separate peek() and peek_data() calls.

Changes:

  • Replaced instances of peek() / peek_data() call pairs.
  • Removed unwrap() by working directly with the peek_token(). This ensures that the token's kind and data are always in sync and that no intermediate changes can occur between the checks.

surajk-m avatar Aug 27 '24 17:08 surajk-m