From 47b8eda42d3a9728a442627b91baed8febb78970 Mon Sep 17 00:00:00 2001 From: Eric Bidelman Date: Mon, 21 Jul 2014 20:27:16 -0700 Subject: [PATCH] Add event and method params --- context-free-parser.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/context-free-parser.js b/context-free-parser.js index 666ebb5..442280c 100644 --- a/context-free-parser.js +++ b/context-free-parser.js @@ -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 = { + type: params[1], + name: params[2], + description: params[3] + }; + makePragma(subCurrent, pragma + 's', subEventObj); + } + + break; // everything else default: