@@ -130,9 +130,9 @@ public class ClassificationTests: XCTestCase {
130130 expected: [
131131 ClassificationSpec ( source: " func " , kind: . keyword) ,
132132 ClassificationSpec ( source: " foo " , kind: . identifier) ,
133- ClassificationSpec ( source: " x " , kind: . identifier ) ,
133+ ClassificationSpec ( source: " x " , kind: . argumentLabel ) ,
134134 ClassificationSpec ( source: " Int " , kind: . type) ,
135- ClassificationSpec ( source: " y " , kind: . identifier ) ,
135+ ClassificationSpec ( source: " y " , kind: . argumentLabel ) ,
136136 ClassificationSpec ( source: " Int " , kind: . type) ,
137137 ClassificationSpec ( source: " Int " , kind: . type) ,
138138 ClassificationSpec ( source: " return " , kind: . keyword) ,
@@ -283,13 +283,13 @@ public class ClassificationTests: XCTestCase {
283283 " #colorLiteral(red: 0, green: 0, blue: 0, alpha: 1) " ,
284284 expected: [
285285 ClassificationSpec ( source: " colorLiteral " , kind: . identifier) ,
286- ClassificationSpec ( source: " red " , kind: . identifier ) ,
286+ ClassificationSpec ( source: " red " , kind: . argumentLabel ) ,
287287 ClassificationSpec ( source: " 0 " , kind: . integerLiteral) ,
288- ClassificationSpec ( source: " green " , kind: . identifier ) ,
288+ ClassificationSpec ( source: " green " , kind: . argumentLabel ) ,
289289 ClassificationSpec ( source: " 0 " , kind: . integerLiteral) ,
290- ClassificationSpec ( source: " blue " , kind: . identifier ) ,
290+ ClassificationSpec ( source: " blue " , kind: . argumentLabel ) ,
291291 ClassificationSpec ( source: " 0 " , kind: . integerLiteral) ,
292- ClassificationSpec ( source: " alpha " , kind: . identifier ) ,
292+ ClassificationSpec ( source: " alpha " , kind: . argumentLabel ) ,
293293 ClassificationSpec ( source: " 1 " , kind: . integerLiteral) ,
294294 ]
295295 )
@@ -300,7 +300,7 @@ public class ClassificationTests: XCTestCase {
300300 " #imageLiteral(resourceName: \" cloud.png \" ) " ,
301301 expected: [
302302 ClassificationSpec ( source: " imageLiteral " , kind: . identifier) ,
303- ClassificationSpec ( source: " resourceName " , kind: . identifier ) ,
303+ ClassificationSpec ( source: " resourceName " , kind: . argumentLabel ) ,
304304 ClassificationSpec ( source: " \" cloud.png \" " , kind: . stringLiteral) ,
305305 ]
306306 )
@@ -311,7 +311,7 @@ public class ClassificationTests: XCTestCase {
311311 " #fileLiteral(resourceName: \" cloud.png \" ) " ,
312312 expected: [
313313 ClassificationSpec ( source: " fileLiteral " , kind: . identifier) ,
314- ClassificationSpec ( source: " resourceName " , kind: . identifier ) ,
314+ ClassificationSpec ( source: " resourceName " , kind: . argumentLabel ) ,
315315 ClassificationSpec ( source: " \" cloud.png \" " , kind: . stringLiteral) ,
316316 ]
317317 )
@@ -530,10 +530,10 @@ public class ClassificationTests: XCTestCase {
530530 ClassificationSpec ( source: " keywordInCaseAndLocalArgLabel " , kind: . identifier) ,
531531 ClassificationSpec ( source: " for " , kind: . identifier) ,
532532 ClassificationSpec ( source: " Int " , kind: . type) ,
533- ClassificationSpec ( source: " for " , kind: . identifier ) ,
533+ ClassificationSpec ( source: " for " , kind: . argumentLabel ) ,
534534 ClassificationSpec ( source: " in " , kind: . identifier) ,
535535 ClassificationSpec ( source: " Int " , kind: . type) ,
536- ClassificationSpec ( source: " class " , kind: . identifier ) ,
536+ ClassificationSpec ( source: " class " , kind: . argumentLabel ) ,
537537 ClassificationSpec ( source: " Int " , kind: . type) ,
538538 ]
539539 )
@@ -577,4 +577,29 @@ public class ClassificationTests: XCTestCase {
577577 ]
578578 )
579579 }
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+ }
580605}
0 commit comments