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 b5753ad commit f2f8656Copy full SHA for f2f8656
Sources/SwiftParser/Types.swift
@@ -452,8 +452,7 @@ extension Parser {
452
let type = self.parseType(misplacedSpecifiers: misplacedSpecifiers)
453
let ellipsis = self.currentToken.isEllipsis ? self.consumeAnyToken() : nil
454
var trailingComma = self.consume(if: .comma)
455
- var lookahead = self.lookahead()
456
- if trailingComma == nil && lookahead.canParseType() {
+ if trailingComma == nil && self.withLookahead({ $0.canParseType() }) {
457
// If the next token does not close the tuple, it is very likely the user forgot the comma.
458
trailingComma = self.missingToken(.comma)
459
}
0 commit comments