@@ -12,12 +12,26 @@ var parseMarkdown = require('./parse_markdown');
12
12
*/
13
13
var flatteners = {
14
14
'abstract' : flattenBoolean ,
15
+ /**
16
+ * Parse tag
17
+ * @private
18
+ * @param {Object } result target comment
19
+ * @param {Object } tag the tag
20
+ * @returns {undefined } has side-effects
21
+ */
15
22
'access' : function ( result , tag ) {
16
23
result . access = tag . access ;
17
24
} ,
18
25
'alias' : flattenName ,
19
26
'arg' : synonym ( 'param' ) ,
20
27
'argument' : synonym ( 'param' ) ,
28
+ /**
29
+ * Parse tag
30
+ * @private
31
+ * @param {Object } result target comment
32
+ * @param {Object } tag the tag
33
+ * @returns {undefined } has side-effects
34
+ */
21
35
'augments' : function ( result , tag ) {
22
36
if ( ! result . augments ) {
23
37
result . augments = [ ] ;
@@ -26,6 +40,13 @@ var flatteners = {
26
40
} ,
27
41
'author' : flattenDescription ,
28
42
'borrows' : todo ,
43
+ /**
44
+ * Parse tag
45
+ * @private
46
+ * @param {Object } result target comment
47
+ * @param {Object } tag the tag
48
+ * @returns {undefined } has side-effects
49
+ */
29
50
'callback' : function ( result , tag ) {
30
51
result . kind = 'typedef' ;
31
52
@@ -52,13 +73,27 @@ var flatteners = {
52
73
'description' : flattenMarkdownDescription ,
53
74
'emits' : synonym ( 'fires' ) ,
54
75
'enum' : todo ,
76
+ /**
77
+ * Parse tag
78
+ * @private
79
+ * @param {Object } result target comment
80
+ * @param {Object } tag the tag
81
+ * @returns {undefined } has side-effects
82
+ */
55
83
'event' : function ( result , tag ) {
56
84
result . kind = 'event' ;
57
85
58
86
if ( tag . description ) {
59
87
result . name = tag . description ;
60
88
}
61
89
} ,
90
+ /**
91
+ * Parse tag
92
+ * @private
93
+ * @param {Object } result target comment
94
+ * @param {Object } tag the tag
95
+ * @returns {undefined } has side-effects
96
+ */
62
97
'example' : function ( result , tag ) {
63
98
if ( ! tag . description ) {
64
99
result . errors . push ( {
@@ -85,13 +120,27 @@ var flatteners = {
85
120
'exception' : synonym ( 'throws' ) ,
86
121
'exports' : todo ,
87
122
'extends' : synonym ( 'augments' ) ,
123
+ /**
124
+ * Parse tag
125
+ * @private
126
+ * @param {Object } result target comment
127
+ * @param {Object } tag the tag
128
+ * @returns {undefined } has side-effects
129
+ */
88
130
'external' : function ( result , tag ) {
89
131
result . kind = 'external' ;
90
132
91
133
if ( tag . description ) {
92
134
result . name = tag . description ;
93
135
}
94
136
} ,
137
+ /**
138
+ * Parse tag
139
+ * @private
140
+ * @param {Object } result target comment
141
+ * @param {Object } tag the tag
142
+ * @returns {undefined } has side-effects
143
+ */
95
144
'file' : function ( result , tag ) {
96
145
result . kind = 'file' ;
97
146
@@ -103,25 +152,57 @@ var flatteners = {
103
152
'fires' : todo ,
104
153
'func' : synonym ( 'function' ) ,
105
154
'function' : flattenKindShorthand ,
155
+ /**
156
+ * Parse tag
157
+ * @private
158
+ * @param {Object } result target comment
159
+ * @returns {undefined } has side-effects
160
+ */
106
161
'global' : function ( result ) {
107
162
result . scope = 'global' ;
108
163
} ,
109
164
'host' : synonym ( 'external' ) ,
110
165
'ignore' : flattenBoolean ,
111
166
'implements' : todo ,
112
167
'inheritdoc' : todo ,
168
+ /**
169
+ * Parse tag
170
+ * @private
171
+ * @param {Object } result target comment
172
+ * @returns {undefined } has side-effects
173
+ */
113
174
'inner' : function ( result ) {
114
175
result . scope = 'inner' ;
115
176
} ,
177
+ /**
178
+ * Parse tag
179
+ * @private
180
+ * @param {Object } result target comment
181
+ * @returns {undefined } has side-effects
182
+ */
116
183
'instance' : function ( result ) {
117
184
result . scope = 'instance' ;
118
185
} ,
186
+ /**
187
+ * Parse tag
188
+ * @private
189
+ * @param {Object } result target comment
190
+ * @param {Object } tag the tag
191
+ * @returns {undefined } has side-effects
192
+ */
119
193
'interface' : function ( result , tag ) {
120
194
result . interface = true ;
121
195
if ( tag . description ) {
122
196
result . name = tag . description ;
123
197
}
124
198
} ,
199
+ /**
200
+ * Parse tag
201
+ * @private
202
+ * @param {Object } result target comment
203
+ * @param {Object } tag the tag
204
+ * @returns {undefined } has side-effects
205
+ */
125
206
'kind' : function ( result , tag ) {
126
207
result . kind = tag . kind ;
127
208
} ,
@@ -138,6 +219,13 @@ var flatteners = {
138
219
'namespace' : flattenKindShorthand ,
139
220
'override' : flattenBoolean ,
140
221
'overview' : synonym ( 'file' ) ,
222
+ /**
223
+ * Parse tag
224
+ * @private
225
+ * @param {Object } result target comment
226
+ * @param {Object } tag the tag
227
+ * @returns {undefined } has side-effects
228
+ */
141
229
'param' : function ( result , tag ) {
142
230
if ( ! result . params ) {
143
231
result . params = [ ] ;
@@ -162,6 +250,12 @@ var flatteners = {
162
250
163
251
result . params . push ( param ) ;
164
252
} ,
253
+ /**
254
+ * Parse tag
255
+ * @private
256
+ * @param {Object } result target comment
257
+ * @returns {undefined } has side-effects
258
+ */
165
259
'private' : function ( result ) {
166
260
result . access = 'private' ;
167
261
} ,
@@ -186,15 +280,34 @@ var flatteners = {
186
280
187
281
result . properties . push ( property ) ;
188
282
} ,
283
+ /**
284
+ * Parse tag
285
+ * @private
286
+ * @param {Object } result target comment
287
+ * @returns {undefined } has side-effects
288
+ */
189
289
'protected' : function ( result ) {
190
290
result . access = 'protected' ;
191
291
} ,
292
+ /**
293
+ * Parse tag
294
+ * @private
295
+ * @param {Object } result target comment
296
+ * @returns {undefined } has side-effects
297
+ */
192
298
'public' : function ( result ) {
193
299
result . access = 'public' ;
194
300
} ,
195
301
'readonly' : flattenBoolean ,
196
302
'requires' : todo ,
197
303
'return' : synonym ( 'returns' ) ,
304
+ /**
305
+ * Parse tag
306
+ * @private
307
+ * @param {Object } result target comment
308
+ * @param {Object } tag the tag
309
+ * @returns {undefined } has side-effects
310
+ */
198
311
'returns' : function ( result , tag ) {
199
312
if ( ! result . returns ) {
200
313
result . returns = [ ] ;
@@ -210,18 +323,38 @@ var flatteners = {
210
323
211
324
result . returns . push ( returns ) ;
212
325
} ,
326
+ /**
327
+ * Parse tag
328
+ * @private
329
+ * @param {Object } result target comment
330
+ * @param {Object } tag the tag
331
+ * @returns {undefined } has side-effects
332
+ */
213
333
'see' : function ( result , tag ) {
214
334
if ( ! result . sees ) {
215
335
result . sees = [ ] ;
216
336
}
217
337
result . sees . push ( parseMarkdown ( tag . description ) ) ;
218
338
} ,
219
339
'since' : flattenDescription ,
340
+ /**
341
+ * Parse tag
342
+ * @private
343
+ * @param {Object } result target comment
344
+ * @returns {undefined } has side-effects
345
+ */
220
346
'static' : function ( result ) {
221
347
result . scope = 'static' ;
222
348
} ,
223
349
'summary' : flattenMarkdownDescription ,
224
350
'this' : todo ,
351
+ /**
352
+ * Parse tag
353
+ * @private
354
+ * @param {Object } result target comment
355
+ * @param {Object } tag the tag
356
+ * @returns {undefined } has side-effects
357
+ */
225
358
'throws' : function ( result , tag ) {
226
359
if ( ! result . throws ) {
227
360
result . throws = [ ] ;
@@ -239,6 +372,13 @@ var flatteners = {
239
372
240
373
result . throws . push ( throws ) ;
241
374
} ,
375
+ /**
376
+ * Parse tag
377
+ * @private
378
+ * @param {Object } result target comment
379
+ * @param {Object } tag the tag
380
+ * @returns {undefined } has side-effects
381
+ */
242
382
'todo' : function ( result , tag ) {
243
383
if ( ! result . todos ) {
244
384
result . todos = [ ] ;
@@ -249,6 +389,13 @@ var flatteners = {
249
389
'type' : todo ,
250
390
'typedef' : flattenKindShorthand ,
251
391
'var' : synonym ( 'member' ) ,
392
+ /**
393
+ * Parse tag
394
+ * @private
395
+ * @param {Object } result target comment
396
+ * @param {Object } tag the tag
397
+ * @returns {undefined } has side-effects
398
+ */
252
399
'variation' : function ( result , tag ) {
253
400
result . variation = tag . variation ;
254
401
} ,
0 commit comments