File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -1029,7 +1029,7 @@ extension Lexer.Cursor {
1029
1029
}
1030
1030
if !self . isAtEndOfFile, self . peek ( ) == UInt8 ( ascii: " \\ " ) &&
1031
1031
TmpPtr . delimiterMatches ( customDelimiterLength) &&
1032
- TmpPtr . advance ( ) == UInt8 ( ascii: " ( " ) {
1032
+ TmpPtr . peek ( ) == UInt8 ( ascii: " ( " ) {
1033
1033
// Consume tokens until we hit the corresponding ')'.
1034
1034
self = Self . skipToEndOfInterpolatedExpression ( TmpPtr, IsMultilineString)
1035
1035
if self . advance ( if: { $0 == Unicode . Scalar ( " ) " ) } ) {
Original file line number Diff line number Diff line change @@ -194,6 +194,24 @@ final class ExpressionTests: XCTestCase {
194
194
return "Fixit: \(range.debugDescription) Text: \"\(text)\""
195
195
"""#
196
196
}
197
+
198
+ try AssertParse ( { $0. parseExpression ( ) } ) {
199
+ #"""
200
+ "text \(array.map({ "\($0)" }).joined(separator: ",")) text"
201
+ """#
202
+ }
203
+
204
+ try AssertParse ( { $0. parseExpression ( ) } ) {
205
+ #"""
206
+ """
207
+ \(gen(xx) { (x) in
208
+ return """
209
+ case
210
+ """
211
+ })
212
+ """
213
+ """#
214
+ }
197
215
}
198
216
199
217
func testStringLiterals( ) throws {
You can’t perform that action at this time.
0 commit comments