File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ SyntaxModelContext::SyntaxModelContext(SourceFile &SrcFile)
63
63
auto LiteralStartLoc = Optional<SourceLoc>();
64
64
for (unsigned I = 0 , E = Tokens.size (); I != E; ++I) {
65
65
auto &Tok = Tokens[I];
66
+ // Ignore empty string literals between interpolations, e.g. "\(1)\(2)"
67
+ if (!Tok.getLength ())
68
+ continue ;
66
69
SyntaxNodeKind Kind;
67
70
SourceLoc Loc;
68
71
Optional<unsigned > Length;
Original file line number Diff line number Diff line change @@ -240,6 +240,9 @@ func f(x: Int) -> Int {
240
240
"""
241
241
This is a multiline \( " interpolated " ) string
242
242
"""
243
+
244
+ // CHECK: <str>"</str>\<anchor>(</anchor><int>1</int><anchor>)</anchor>\<anchor>(</anchor><int>1</int><anchor>)</anchor><str>"</str>
245
+ " \( 1 ) \( 1 ) "
243
246
}
244
247
245
248
// CHECK: <kw>func</kw> bar(x: <type>Int</type>) -> (<type>Int</type>, <type>Float</type>) {
You can’t perform that action at this time.
0 commit comments