[NFC] Remove peekNextToken(int).
authorManuel Klimek <klimek@google.com>
Sat, 26 Nov 2022 18:20:22 +0000 (18:20 +0000)
committerManuel Klimek <klimek@google.com>
Sat, 26 Nov 2022 18:23:42 +0000 (18:23 +0000)
commit49aca00d63e14df8bc68fc4329e6cbc9c9805eb8
treea477f7efcb9a71e90a6ca97205347e648bbdb84c
parent13593dc9dc5a8f587402bf1e5f180f2c0fc750ee
[NFC] Remove peekNextToken(int).

Arbitrary lookahead restricts the implementation of our TokenSource,
specifically getting in the way of changes to handle macros better.

Instead, use getNextToken to parse lookahead linearly, and
getPosition/setPosition to unwind our lookahead.
clang/lib/Format/UnwrappedLineParser.cpp