- Notifications
You must be signed in to change notification settings - Fork254
Commitb2091bd
committed
Fix up AttributeTypeSyntax handling
There's a few issues here:1. Type specifiers can now have arguments (eg. `nonisolated(nonsending)`)2. Some type specifiers can be specified "late", which are currently unhandled3. We were using a mix of `.same` and `.continue` breaks (`.continue` for specifiers and `.same` for attributes)4. Attributes were grouped separately to specifiersFixes#10811 parent1058a40 commitb2091bd
File tree
2 files changed
+136
-30
lines changed- Sources/SwiftFormat/PrettyPrint
- Tests/SwiftFormatTests/PrettyPrint
2 files changed
+136
-30
lines changedLines changed: 75 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2395 | 2395 | | |
2396 | 2396 | | |
2397 | 2397 | | |
2398 | | - | |
| 2398 | + | |
| 2399 | + | |
2399 | 2400 | | |
2400 | 2401 | | |
2401 | | - | |
2402 | | - | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
2403 | 2411 | | |
2404 | 2412 | | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
2405 | 2417 | | |
2406 | 2418 | | |
2407 | 2419 | | |
| |||
3067 | 3079 | | |
3068 | 3080 | | |
3069 | 3081 | | |
3070 | | - | |
| 3082 | + | |
| 3083 | + | |
3071 | 3084 | | |
3072 | | - | |
3073 | | - | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
3074 | 3106 | | |
3075 | | - | |
3076 | | - | |
3077 | | - | |
3078 | | - | |
3079 | | - | |
3080 | | - | |
3081 | | - | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
| 3119 | + | |
3082 | 3120 | | |
3083 | | - | |
3084 | | - | |
3085 | | - | |
3086 | | - | |
3087 | | - | |
3088 | | - | |
3089 | | - | |
3090 | | - | |
3091 | | - | |
3092 | | - | |
3093 | | - | |
| 3121 | + | |
| 3122 | + | |
| 3123 | + | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
| 3128 | + | |
| 3129 | + | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
3094 | 3133 | | |
3095 | | - | |
3096 | | - | |
3097 | 3134 | | |
| 3135 | + | |
| 3136 | + | |
3098 | 3137 | | |
3099 | 3138 | | |
3100 | | - | |
3101 | | - | |
3102 | | - | |
3103 | | - | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
3104 | 3149 | | |
3105 | 3150 | | |
3106 | 3151 | | |
| |||
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
286 | 347 | | |
0 commit comments
Comments
(0)