You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create a DeclProtocol protocol for generically operating on declarations #10
At the moment there is nothing shared between the toolkit's declaration wrappers; StructDecl, EnumDecl, VariableDecl, and maybe others by the time someone gets to this issue. A protocol would enable much more powerful generic programming to enable developers to create more flexible macros. Here's a rough idea of what such a protocol might look like (pretty simple for now);
publicprotocolDeclProtocol{varidentifier:String{get}varaccessLevel:AccessLevel?{get}}publicenumAccessLevel{case public
case private
case internal
}
Once you've created the protocol, make sure to update existing declaration wrappers (including Decl) to conform to the protocol. Additionally, if DeclGroupProtocol exists by the time that someone is tackling this issue, it should be updated to inherit from DeclProtocol as well.
Activity