Periphery cleanup (#5893)

This commit is contained in:
Mauro
2026-07-20 11:16:11 +02:00
committed by GitHub
parent 175aca596e
commit 9093631f8b
275 changed files with 381 additions and 2268 deletions
@@ -14,7 +14,7 @@ import SwiftSyntaxMacros
///
/// A `volatile` preference instead reads and writes through a generated in-memory store, so its
/// value is never persisted and resets on each launch.
public enum UserPreferenceMacro {
enum UserPreferenceMacro {
enum DiagnosticError: Error, CustomStringConvertible {
case notAStoredProperty
case missingTypeAnnotation
@@ -85,9 +85,9 @@ public enum UserPreferenceMacro {
}
extension UserPreferenceMacro: AccessorMacro {
public static func expansion(of node: AttributeSyntax,
providingAccessorsOf declaration: some DeclSyntaxProtocol,
in context: some MacroExpansionContext) throws -> [AccessorDeclSyntax] {
static func expansion(of node: AttributeSyntax,
providingAccessorsOf declaration: some DeclSyntaxProtocol,
in context: some MacroExpansionContext) throws -> [AccessorDeclSyntax] {
let preference = try preference(for: declaration, node: node)
if preference.isVolatile {
@@ -137,9 +137,9 @@ extension UserPreferenceMacro: AccessorMacro {
}
extension UserPreferenceMacro: PeerMacro {
public static func expansion(of node: AttributeSyntax,
providingPeersOf declaration: some DeclSyntaxProtocol,
in context: some MacroExpansionContext) throws -> [DeclSyntax] {
static func expansion(of node: AttributeSyntax,
providingPeersOf declaration: some DeclSyntaxProtocol,
in context: some MacroExpansionContext) throws -> [DeclSyntax] {
let preference = try preference(for: declaration, node: node)
let type = preference.type
let name = preference.name