diff --git a/Sources/SwiftParser/Lexer/Cursor.swift b/Sources/SwiftParser/Lexer/Cursor.swift index d55f6024068..4f1651362df 100644 --- a/Sources/SwiftParser/Lexer/Cursor.swift +++ b/Sources/SwiftParser/Lexer/Cursor.swift @@ -765,6 +765,12 @@ extension Lexer.Cursor { case "/": // Check for a '/*' if self.advance(matching: "*") { + if self.advance(matching: "/") { + depth -= 1 + if depth == 0 { + break LOOP + } + } depth += 1 }