-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMacroToolkitExample.swift
More file actions
38 lines (30 loc) · 1.41 KB
/
MacroToolkitExample.swift
File metadata and controls
38 lines (30 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@attached(peer, names: overloaded)
public macro AddAsync() =
#externalMacro(module: "MacroToolkitExamplePlugin", type: "AddAsyncMacro")
@attached(member, names: arbitrary)
public macro CaseDetection() =
#externalMacro(module: "MacroToolkitExamplePlugin", type: "CaseDetectionMacro")
@attached(peer, names: overloaded)
public macro AddCompletionHandler() =
#externalMacro(module: "MacroToolkitExamplePlugin", type: "AddCompletionHandlerMacro")
@freestanding(expression)
public macro addBlocker<T>(_ value: T) -> T =
#externalMacro(module: "MacroToolkitExamplePlugin", type: "AddBlockerMacro")
@attached(member, names: arbitrary)
@attached(extension)
public macro MyOptionSet<RawType>() =
#externalMacro(module: "MacroToolkitExamplePlugin", type: "OptionSetMacro")
@attached(member, names: named(Meta))
public macro MetaEnum() =
#externalMacro(module: "MacroToolkitExamplePlugin", type: "MetaEnumMacro")
@attached(member)
public macro CodableKey(name: String) =
#externalMacro(module: "MacroToolkitExamplePlugin", type: "CodableKeyMacro")
@attached(member, names: named(CodingKeys))
public macro CustomCodable() =
#externalMacro(module: "MacroToolkitExamplePlugin", type: "CustomCodableMacro")
@attached(accessor)
@attached(member, names: named(_storage))
@attached(memberAttribute)
public macro DictionaryStorage() =
#externalMacro(module: "MacroToolkitExamplePlugin", type: "DictionaryStorageMacro")