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

Commit

Permalink
add support for the @return pragma.
Browse files Browse the repository at this point in the history
@return {type} Description
  • Loading branch information
Ulysse Prygiel committed Jan 26, 2015
1 parent f9c7c31 commit d87494f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions context-free-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@
makePragma(current, pragma, subObj);
break;

case 'return':
var returnRe = /\{(.+)\}\s+(.*)$/;

var returnReResult = content.match(returnRe);
if (returnReResult) {
var subReturnObj = {
type: returnReResult[1],
description: returnReResult[2]
};
subCurrent[pragma] = subReturnObj;
}
break;

// everything else
default:
current[pragma] = content;
Expand Down

0 comments on commit d87494f

Please sign in to comment.