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

Commit

Permalink
Add event and method params
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Jul 22, 2014
1 parent 08005c1 commit 47b8eda
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions context-free-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@
case 'type':
subCurrent[pragma] = content;
break;

case 'param':
var eventParmsRe = /\{(.+)\}\s+(\w+[.\w+]+)\s+(.*)$/;

var params = content.match(eventParmsRe);
if (params) {
var subEventObj = {

This comment has been minimized.

Copy link
@addyosmani

addyosmani Jul 22, 2014

Contributor

If the subEventObj isn't being used anywhere else it may be worth avoiding the assignment here and just pass it in to makePragma lower down directly. Mostly a style choice.

This comment has been minimized.

Copy link
@ebidel

ebidel Jul 22, 2014

Author Contributor

Yea, I was trying to keep a similar format to the other sections.

type: params[1],
name: params[2],
description: params[3]
};
makePragma(subCurrent, pragma + 's', subEventObj);
}

break;

// everything else
default:
Expand Down

0 comments on commit 47b8eda

Please sign in to comment.