Commit 6cf8188
committed
Store the replacement string in
IIRC the main reason that `IncrementalEdit` didn’t contain the replacement string was that the edits needed to be transferred over XPC at some point and transferring strings over XPC is always a little tricky. Since the actual contents weren’t actually needed, the actual contents weren’t actually needed.
I would like to use `ConcurrentEdits(fromSequential:)` in SourceKit-LSP and for that I need the actual replacement contents. Instead of rolling our own sequential to concurrent replacement (which is non-trivial), let’s re-use the one in SwiftSyntax.IncrementalEdit
1 parent 25ce3a2 commit 6cf8188
File tree
6 files changed
+127
-98
lines changed- Release Notes
- Sources
- SwiftParser
- SwiftSyntax
- _SwiftSyntaxTestSupport
- Tests
- SwiftParserTest
- SwiftSyntaxTestSupportTest
6 files changed
+127
-98
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
350 | 355 | | |
351 | 356 | | |
352 | 357 | | |
353 | | - | |
| 358 | + | |
354 | 359 | | |
355 | 360 | | |
356 | 361 | | |
357 | 362 | | |
358 | 363 | | |
359 | 364 | | |
360 | | - | |
| 365 | + | |
361 | 366 | | |
362 | 367 | | |
363 | 368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | | - | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | | - | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
75 | 90 | | |
76 | 91 | | |
77 | 92 | | |
| |||
Lines changed: 3 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 185 | + | |
189 | 186 | | |
190 | 187 | | |
191 | 188 | | |
| |||
213 | 210 | | |
214 | 211 | | |
215 | 212 | | |
216 | | - | |
217 | | - | |
| 213 | + | |
218 | 214 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | 215 | | |
223 | 216 | | |
224 | 217 | | |
| |||
232 | 225 | | |
233 | 226 | | |
234 | 227 | | |
235 | | - | |
| 228 | + | |
236 | 229 | | |
237 | 230 | | |
238 | 231 | | |
0 commit comments