apollo-rs
apollo-rs copied to clipboard
refactor(parser): Use peek_token() to streamline peek operations
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 thepeek_token()
. This ensures that thetoken's kind
anddata
are always insync
and that no intermediate changes can occur between the checks.