File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -364,16 +364,21 @@ extension FunctionCallExprSyntax {
364364/// NOTE: It is required that '##' is not a valid substring of display-string
365365/// or type-string. If this ends up not the case for some reason, we can consider
366366/// adding escaping for '##'.
367- fileprivate enum EditorPlaceholderData {
367+ @_spi ( SourceKitLSP)
368+ public enum EditorPlaceholderData {
368369 case basic( text: Substring )
369370 case typed( text: Substring , type: TypeSyntax )
370371
371372 init ? ( token: TokenSyntax ) {
372- guard isPlaceholder ( token. text) else {
373+ self . init ( text: token. text)
374+ }
375+
376+ @_spi ( SourceKitLSP)
377+ public init ? ( text: String ) {
378+ guard isPlaceholder ( text) else {
373379 return nil
374380 }
375-
376- var text = token. text. dropFirst ( 2 ) . dropLast ( 2 )
381+ var text = text. dropFirst ( 2 ) . dropLast ( 2 )
377382
378383 if !text. hasPrefix ( " T## " ) {
379384 // No type information
You can’t perform that action at this time.
0 commit comments