We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fb14ff commit 3b42639Copy full SHA for 3b42639
compiler/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -432,8 +432,12 @@ object Parsers {
432
433
def commaSeparated[T](part: () => T): List[T] = tokenSeparated(COMMA, part)
434
435
- def lookaheadIn(tokens: Token*): Boolean =
436
- tokens.contains(in.lookaheadScanner.nextToken())
+ /** Is the token following the current one in `tokens`? */
+ def lookaheadIn(tokens: Token*): Boolean = {
437
+ val lookahead = in.lookaheadScanner
438
+ lookahead.nextToken()
439
+ tokens.contains(lookahead.token)
440
+ }
441
442
/* --------- OPERAND/OPERATOR STACK --------------------------------------- */
443
0 commit comments