Skip to content

Commit

Permalink
Fix error in followedByToken
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Aug 12, 2019
1 parent 9829b01 commit 6d6180d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/parsing/Parsers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,13 @@ object Parsers {
val token = lookahead.token
if (braces == 0) {
if (token == query) return true
if (stopScanTokens.contains(token) || in.token == RBRACE) return false
if (stopScanTokens.contains(token) || lookahead.token == RBRACE) return false
}
else if (token == EOF)
return false
else if (in.token == RBRACE)
else if (lookahead.token == RBRACE)
braces -= 1
if (in.token == LBRACE) braces += 1
if (lookahead.token == LBRACE) braces += 1
lookahead.nextToken()
}
false
Expand Down

0 comments on commit 6d6180d

Please sign in to comment.