File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -364,16 +364,21 @@ extension FunctionCallExprSyntax {
364
364
/// NOTE: It is required that '##' is not a valid substring of display-string
365
365
/// or type-string. If this ends up not the case for some reason, we can consider
366
366
/// adding escaping for '##'.
367
- fileprivate enum EditorPlaceholderData {
367
+ @_spi ( SourceKitLSP)
368
+ public enum EditorPlaceholderData {
368
369
case basic( text: Substring )
369
370
case typed( text: Substring , type: TypeSyntax )
370
371
371
372
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 {
373
379
return nil
374
380
}
375
-
376
- var text = token. text. dropFirst ( 2 ) . dropLast ( 2 )
381
+ var text = text. dropFirst ( 2 ) . dropLast ( 2 )
377
382
378
383
if !text. hasPrefix ( " T## " ) {
379
384
// No type information
You can’t perform that action at this time.
0 commit comments