Files
swift-mirror/test/SourceKit/SemanticTokens/semantic_tokens.swift
Alex Hoppen 4bc03f8392 [SourceKit] Add a request to get the semantic tokens of a file
We need this request for semantic highlighting in LSP. Previously, we were getting the semantic tokens using a 0,0 edit after a document update notification but that will no longer be possible if we open the documents in syntactic only mode.
2023-10-20 10:38:08 -07:00

18 lines
371 B
Swift

// RUN: %sourcekitd-test -req=semantic-tokens %s -- %s | %FileCheck %s
class MyClass {}
let x: String = "test"
var y = MyClass()
// String in line 5
// CHECK: key.kind: source.lang.swift.ref.struct
// CHECK: key.length: 6,
// CHECK key.is_system: 1
// CHECK-LABEL: },
// MyClass in line 6
// CHECK: key.kind: source.lang.swift.ref.class,
// CHECK: key.length: 7