Skip to content

Commit 161643b

Browse files
committed
comment
1 parent dfab212 commit 161643b

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

Sources/SwiftParser/Attributes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ extension Parser {
895895
let decl: RawDeclSyntax
896896
if self.at(.poundIf) {
897897
// '#if' is not accepted in '@abi' attribute, but for recovery, parse it
898-
// parse it and wrap the first decl init with unexpected nodes.
898+
// and wrap the first decl in it with unexpected nodes.
899899
let ifConfig = self.parsePoundIfDirective({ parser in
900900
let decl = parser.parseDeclaration(in: .argumentList)
901901
let member = RawMemberBlockItemSyntax(decl: decl, semicolon: nil, arena: parser.arena)

Sources/SwiftParser/TopLevel.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,6 @@ extension Parser {
137137
///
138138
/// Returns `nil` if the parser did not consume any tokens while trying to
139139
/// parse the code block item.
140-
///
141-
/// `isAtTopLevel` determines whether this is trying to parse an item that's at
142-
/// the top level of the source file. If this is the case, we allow skipping
143-
/// closing braces while trying to recover to the next item.
144-
/// If we are not at the top level, such a closing brace should close the
145-
/// wrapping declaration instead of being consumed by lookahead.
146140
mutating func parseCodeBlockItem(
147141
allowInitDecl: Bool,
148142
until stopCondition: (inout Parser) -> Bool

0 commit comments

Comments
 (0)