Commit 9b7c48f
Relax precondition in
The only place where we were dropping unexpected tokens or trivia around a string segment was when inferring the indentation of the closing quote. Instead of having a precondition, add the conditions that the last segment doesn’t have any of these here and fall back to the same logic that is used when the indentaiton could not be inferred.
Fixes #3097postProcessMultilineStringLiteral
1 parent 3a79e39 commit 9b7c48f
File tree
2 files changed
+40
-24
lines changed- Sources/SwiftParser
- Tests/SwiftParserTest/translated
2 files changed
+40
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | 343 | | |
360 | 344 | | |
361 | 345 | | |
| |||
395 | 379 | | |
396 | 380 | | |
397 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
398 | 385 | | |
399 | 386 | | |
400 | 387 | | |
| |||
409 | 396 | | |
410 | 397 | | |
411 | 398 | | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
416 | 402 | | |
417 | 403 | | |
418 | 404 | | |
| |||
703 | 689 | | |
704 | 690 | | |
705 | 691 | | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
| 692 | + | |
710 | 693 | | |
711 | 694 | | |
712 | 695 | | |
| |||
Lines changed: 33 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
246 | 279 | | |
0 commit comments