@@ -16,6 +16,10 @@ import SwiftSyntaxBuilder
16
16
struct ColumnMacro : ExpressionMacro {
17
17
static var name : String { " column " }
18
18
19
+ static var documentation : String {
20
+ " The column at which this macro is used "
21
+ }
22
+
19
23
static var genericSignature : GenericParameterClauseSyntax ? =
20
24
"""
21
25
<T: ExpressibleByIntegerLiteral>
@@ -36,6 +40,10 @@ struct ColumnMacro: ExpressionMacro {
36
40
struct LineMacro : ExpressionMacro {
37
41
static var name : String { " line " }
38
42
43
+ static var documentation : String {
44
+ " The line at which this macro is used "
45
+ }
46
+
39
47
static var genericSignature : GenericParameterClauseSyntax ? =
40
48
"""
41
49
<T: ExpressibleByIntegerLiteral>
@@ -68,6 +76,10 @@ extension PatternBindingSyntax {
68
76
struct FunctionMacro : ExpressionMacro {
69
77
static var name : String { " function " }
70
78
79
+ static var documentation : String {
80
+ " The name of the function in which this macro is used "
81
+ }
82
+
71
83
static var genericSignature : GenericParameterClauseSyntax ? =
72
84
"""
73
85
<T: ExpressibleByStringLiteral>
@@ -180,6 +192,10 @@ struct FunctionMacro: ExpressionMacro {
180
192
struct ColorLiteralMacro : ExpressionMacro {
181
193
static var name : String { " colorLiteral " }
182
194
195
+ static var documentation : String {
196
+ " A color value expressed in terms of its RGBA components "
197
+ }
198
+
183
199
static var genericSignature : GenericParameterClauseSyntax ? =
184
200
"""
185
201
<T: ExpressibleByColorLiteral>
@@ -206,6 +222,10 @@ struct ColorLiteralMacro: ExpressionMacro {
206
222
struct FileLiteralMacro : ExpressionMacro {
207
223
static var name : String { " fileLiteral " }
208
224
225
+ static var documentation : String {
226
+ " A file resource in the application bundle "
227
+ }
228
+
209
229
static var genericSignature : GenericParameterClauseSyntax ? =
210
230
"""
211
231
<T: ExpressibleByFileReferenceLiteral>
@@ -228,6 +248,10 @@ struct FileLiteralMacro: ExpressionMacro {
228
248
struct ImageLiteralMacro : ExpressionMacro {
229
249
static var name : String { " imageLiteral " }
230
250
251
+ static var documentation : String {
252
+ " An image resource in the application bundle "
253
+ }
254
+
231
255
static var genericSignature : GenericParameterClauseSyntax ? =
232
256
"""
233
257
<T: ExpressibleByImageLiteral>
@@ -250,6 +274,10 @@ struct ImageLiteralMacro: ExpressionMacro {
250
274
struct FilePathMacro : ExpressionMacro {
251
275
static var name : String { " filePath " }
252
276
277
+ static var documentation : String {
278
+ " The full path to the file in which this macro is used "
279
+ }
280
+
253
281
static var genericSignature : GenericParameterClauseSyntax ? =
254
282
"""
255
283
<T: ExpressibleByStringLiteral>
@@ -274,6 +302,10 @@ struct FilePathMacro: ExpressionMacro {
274
302
struct FileIDMacro : ExpressionMacro {
275
303
static var name : String { " fileID " }
276
304
305
+ static var documentation : String {
306
+ " The file in which this macro is used in the form ModuleName/FileName "
307
+ }
308
+
277
309
static var genericSignature : GenericParameterClauseSyntax ? =
278
310
"""
279
311
<T: ExpressibleByStringLiteral>
@@ -304,6 +336,10 @@ struct FileIDMacro: ExpressionMacro {
304
336
struct FileMacro : ExpressionMacro {
305
337
static var name : String { " file " }
306
338
339
+ static var documentation : String {
340
+ " The file in which this macro is used "
341
+ }
342
+
307
343
static var genericSignature : GenericParameterClauseSyntax ? =
308
344
"""
309
345
<T: ExpressibleByStringLiteral>
0 commit comments