Skip to content

Commit

Permalink
updated variable naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Slone committed Jun 7, 2023
1 parent 3ca5c44 commit da53fa8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/ReuseIdentifierMacros/ReuseIdentifierMacro.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public struct ReuseIdentifierMacro: MemberMacro {
providingMembersOf declaration: some DeclGroupSyntax,
in context: some MacroExpansionContext
) throws -> [SwiftSyntax.DeclSyntax] {
guard let enumDecl = declaration.as(ClassDeclSyntax.self) else {
guard let classDecl = declaration.as(ClassDeclSyntax.self) else {
throw ReuseIdentifierError.onlyApplicableToClass
}

let reuseID = try VariableDeclSyntax("static var reuseID: String") {
StringLiteralExprSyntax(content: enumDecl.identifier.text)
StringLiteralExprSyntax(content: classDecl.identifier.text)
}

return [
Expand Down

0 comments on commit da53fa8

Please sign in to comment.