Files
swift-mirror/test/SourceKit/CursorInfo/cursor_spi.swift
Rintaro Ishizaki 37a2748e0d [ASTPrinter] Print SPI by default
`PrintOptions.InterfaceContentKind` was not initialized. Set it to
`InteraceMode::Private` by default, so SPI declarations and their `@_spi`
attribues are printed. This basically restores the behavior before
aba3b6c24e , and is align with
`AccessFilter` being `AccessLevel::Private` by default.

rdar://131726756
2025-01-22 21:37:54 -08:00

8 lines
481 B
Swift

@_spi(Hello)
public struct World {}
// RUN: %sourcekitd-test -req=cursor -pos=2:15 %s -- %s | %FileCheck -check-prefix=CHECK %s
// CHECK: source.lang.swift.decl.struct (2:15-2:20)
// CHECK: <Declaration>@_spi(Hello) public struct World</Declaration>
// CHECK: <decl.struct><syntaxtype.attribute.name>@_spi</syntaxtype.attribute.name>(Hello) <syntaxtype.keyword>public</syntaxtype.keyword> <syntaxtype.keyword>struct</syntaxtype.keyword> <decl.name>World</decl.name></decl.struct>