Skip to content

Commit 609cca7

Browse files
committed
fix crash on nested interpolation
1 parent 8c76dc3 commit 609cca7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftParser/Lexer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ extension Lexer.Cursor {
10291029
}
10301030
if !self.isAtEndOfFile, self.peek() == UInt8(ascii: "\\") &&
10311031
TmpPtr.delimiterMatches(customDelimiterLength) &&
1032-
TmpPtr.advance() == UInt8(ascii: "(") {
1032+
TmpPtr.peek() == UInt8(ascii: "(") {
10331033
// Consume tokens until we hit the corresponding ')'.
10341034
self = Self.skipToEndOfInterpolatedExpression(TmpPtr, IsMultilineString)
10351035
if self.advance(if: { $0 == Unicode.Scalar(")") }) {

0 commit comments

Comments
 (0)