@@ -200,6 +200,10 @@ ${block.description || "説明なし"}\n\n`;
200200 returns : this . _parseJsDocReturns ( jsdoc ) ,
201201 } ;
202202
203+ if ( data . description === "" ) {
204+ console . log ( `┃┃ ${ CL . yellow ( "not get description" ) } : ${ CL . brightCyan ( name ) } ` ) ;
205+ }
206+
203207 if ( type === "class" ) {
204208 const constructorJsDoc = this . _extractConstructor ( code . slice ( match . index ) ) ;
205209
@@ -291,13 +295,17 @@ ${block.description || "説明なし"}\n\n`;
291295 */
292296 static _parseJsDocParams ( code ) {
293297 const lines = code . split ( "\n" ) ;
294- const paramRegex = / @ p a r a m \s + { ( [ ^ } ] + ) } \s + ( \w + ) / ;
298+ const paramRegex = / @ p a r a m \s + { ( (?: [ ^ { } ] | \{ [ ^ { } ] * \} ) + ) } \s + (?: ( [ \w $ ] + ) | \[ ( [ \w $ ] + ) (?: = [ ^ \s ] + ?) ? \] ) / ;
299+ const notGetParamRegex = / @ p a r a m \s + { .+ ?} \s + \[ [ ^ \s . ] + ?\] / ;
295300 const params = [ ] ;
296301 for ( const line of lines ) {
297302 const match = line . match ( paramRegex ) ;
298303 if ( match ) {
299- const [ , type , name ] = match ;
304+ const type = match [ 1 ] ;
305+ const name = match [ 2 ] || match [ 3 ] ;
300306 params . push ( { name, type } ) ;
307+ } else if ( notGetParamRegex . test ( line ) ) {
308+ console . log ( `┃┃ ${ CL . red ( "not get param" ) } : ${ line . trim ( ) } ` ) ;
301309 }
302310 }
303311 return params ;
@@ -311,12 +319,15 @@ ${block.description || "説明なし"}\n\n`;
311319 static _parseJsDocReturns ( code ) {
312320 const lines = code . split ( "\n" ) ;
313321 const returnsRegex = / @ r e t u r n s ? \s + { ( [ ^ } ] + ) } / ;
322+ const notGetReturnsRegex = / @ r e t u r n s ? \s + { / ;
314323 const returns = [ ] ;
315324 for ( const line of lines ) {
316325 const match = line . match ( returnsRegex ) ;
317326 if ( match ) {
318- const [ , type ] = match ;
327+ const type = match [ 1 ] ;
319328 returns . push ( type ) ;
329+ } else if ( notGetReturnsRegex . test ( line ) ) {
330+ console . log ( `┃┃ ${ CL . red ( "not get returns" ) } : ${ line . trim ( ) } ` ) ;
320331 }
321332 }
322333 return returns ;
0 commit comments