@@ -130,9 +130,9 @@ public class ClassificationTests: XCTestCase {
130
130
expected: [
131
131
ClassificationSpec ( source: " func " , kind: . keyword) ,
132
132
ClassificationSpec ( source: " foo " , kind: . identifier) ,
133
- ClassificationSpec ( source: " x " , kind: . identifier ) ,
133
+ ClassificationSpec ( source: " x " , kind: . argumentLabel ) ,
134
134
ClassificationSpec ( source: " Int " , kind: . type) ,
135
- ClassificationSpec ( source: " y " , kind: . identifier ) ,
135
+ ClassificationSpec ( source: " y " , kind: . argumentLabel ) ,
136
136
ClassificationSpec ( source: " Int " , kind: . type) ,
137
137
ClassificationSpec ( source: " Int " , kind: . type) ,
138
138
ClassificationSpec ( source: " return " , kind: . keyword) ,
@@ -283,13 +283,13 @@ public class ClassificationTests: XCTestCase {
283
283
" #colorLiteral(red: 0, green: 0, blue: 0, alpha: 1) " ,
284
284
expected: [
285
285
ClassificationSpec ( source: " colorLiteral " , kind: . identifier) ,
286
- ClassificationSpec ( source: " red " , kind: . identifier ) ,
286
+ ClassificationSpec ( source: " red " , kind: . argumentLabel ) ,
287
287
ClassificationSpec ( source: " 0 " , kind: . integerLiteral) ,
288
- ClassificationSpec ( source: " green " , kind: . identifier ) ,
288
+ ClassificationSpec ( source: " green " , kind: . argumentLabel ) ,
289
289
ClassificationSpec ( source: " 0 " , kind: . integerLiteral) ,
290
- ClassificationSpec ( source: " blue " , kind: . identifier ) ,
290
+ ClassificationSpec ( source: " blue " , kind: . argumentLabel ) ,
291
291
ClassificationSpec ( source: " 0 " , kind: . integerLiteral) ,
292
- ClassificationSpec ( source: " alpha " , kind: . identifier ) ,
292
+ ClassificationSpec ( source: " alpha " , kind: . argumentLabel ) ,
293
293
ClassificationSpec ( source: " 1 " , kind: . integerLiteral) ,
294
294
]
295
295
)
@@ -300,7 +300,7 @@ public class ClassificationTests: XCTestCase {
300
300
" #imageLiteral(resourceName: \" cloud.png \" ) " ,
301
301
expected: [
302
302
ClassificationSpec ( source: " imageLiteral " , kind: . identifier) ,
303
- ClassificationSpec ( source: " resourceName " , kind: . identifier ) ,
303
+ ClassificationSpec ( source: " resourceName " , kind: . argumentLabel ) ,
304
304
ClassificationSpec ( source: " \" cloud.png \" " , kind: . stringLiteral) ,
305
305
]
306
306
)
@@ -311,7 +311,7 @@ public class ClassificationTests: XCTestCase {
311
311
" #fileLiteral(resourceName: \" cloud.png \" ) " ,
312
312
expected: [
313
313
ClassificationSpec ( source: " fileLiteral " , kind: . identifier) ,
314
- ClassificationSpec ( source: " resourceName " , kind: . identifier ) ,
314
+ ClassificationSpec ( source: " resourceName " , kind: . argumentLabel ) ,
315
315
ClassificationSpec ( source: " \" cloud.png \" " , kind: . stringLiteral) ,
316
316
]
317
317
)
@@ -530,10 +530,10 @@ public class ClassificationTests: XCTestCase {
530
530
ClassificationSpec ( source: " keywordInCaseAndLocalArgLabel " , kind: . identifier) ,
531
531
ClassificationSpec ( source: " for " , kind: . identifier) ,
532
532
ClassificationSpec ( source: " Int " , kind: . type) ,
533
- ClassificationSpec ( source: " for " , kind: . identifier ) ,
533
+ ClassificationSpec ( source: " for " , kind: . argumentLabel ) ,
534
534
ClassificationSpec ( source: " in " , kind: . identifier) ,
535
535
ClassificationSpec ( source: " Int " , kind: . type) ,
536
- ClassificationSpec ( source: " class " , kind: . identifier ) ,
536
+ ClassificationSpec ( source: " class " , kind: . argumentLabel ) ,
537
537
ClassificationSpec ( source: " Int " , kind: . type) ,
538
538
]
539
539
)
@@ -577,4 +577,29 @@ public class ClassificationTests: XCTestCase {
577
577
]
578
578
)
579
579
}
580
+
581
+ public func testargumentLabel( ) {
582
+ assertClassification (
583
+ """
584
+ func foo(arg: Int) {}
585
+ """ ,
586
+ expected: [
587
+ ClassificationSpec ( source: " func " , kind: . keyword) ,
588
+ ClassificationSpec ( source: " foo " , kind: . identifier) ,
589
+ ClassificationSpec ( source: " arg " , kind: . argumentLabel) ,
590
+ ClassificationSpec ( source: " Int " , kind: . type) ,
591
+ ]
592
+ )
593
+
594
+ assertClassification (
595
+ """
596
+ foo(arg: 1)
597
+ """ ,
598
+ expected: [
599
+ ClassificationSpec ( source: " foo " , kind: . identifier) ,
600
+ ClassificationSpec ( source: " arg " , kind: . argumentLabel) ,
601
+ ClassificationSpec ( source: " 1 " , kind: . integerLiteral) ,
602
+ ]
603
+ )
604
+ }
580
605
}
0 commit comments