Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit d87494f

Browse files
author
Ulysse Prygiel
committed
add support for the @return pragma.
@return {type} Description
1 parent f9c7c31 commit d87494f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

context-free-parser.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,19 @@
105105
makePragma(current, pragma, subObj);
106106
break;
107107

108+
case 'return':
109+
var returnRe = /\{(.+)\}\s+(.*)$/;
110+
111+
var returnReResult = content.match(returnRe);
112+
if (returnReResult) {
113+
var subReturnObj = {
114+
type: returnReResult[1],
115+
description: returnReResult[2]
116+
};
117+
subCurrent[pragma] = subReturnObj;
118+
}
119+
break;
120+
108121
// everything else
109122
default:
110123
current[pragma] = content;

0 commit comments

Comments
 (0)