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

Commit

Permalink
Merge pull request #7 from ulybu/add_support_for_return
Browse files Browse the repository at this point in the history
Add support for @return pragma
  • Loading branch information
ebidel committed Jan 29, 2015
2 parents d1f2875 + d87494f commit ac739bb
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 ac739bb

Please sign in to comment.