Skip to content

Commit 1c8964e

Browse files
committed
Fix issue in attribute parsing
We weren’t consuming the right parenthesis after skipping an attribute.
1 parent 101bbc6 commit 1c8964e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Sources/SwiftParser/Lookahead.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,9 @@ extension Parser.Lookahead {
149149
self.consumeIdentifier()
150150
if self.consume(if: .leftParen) != nil {
151151
while !self.at(.eof), !self.at(.rightParen), !self.at(.poundEndifKeyword) {
152-
if self.consume(if: .rightParen) != nil {
153-
break
154-
}
155152
self.skipSingle()
156153
}
154+
self.consume(if: .rightParen)
157155
}
158156
} while self.at(.atSign)
159157
return true

0 commit comments

Comments
 (0)