bAthi
bAthi

Reputation: 381

How to add @available(*,deprecated) attribute to my struct

I have created a macro like below

@MyMacro(true)
struct X {

}

should expand like

@available(*,deprecated)
struct X {
    
}

Here i am passsing a boolean flag, according to that flag @available attribute should show/hide.How can i implement this functionality by uisng AttachedMacro.

Upvotes: 0

Views: 58

Answers (0)

Related Questions