diff --git a/context-free-parser.html b/context-free-parser.html index 6aa8185..f7b05a3 100644 --- a/context-free-parser.html +++ b/context-free-parser.html @@ -1,3 +1,12 @@ + diff --git a/context-free-parser.js b/context-free-parser.js index 666ebb5..bd70d4b 100644 --- a/context-free-parser.js +++ b/context-free-parser.js @@ -1,3 +1,13 @@ +/* + * @license + * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. + * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + * Code distributed by Google as part of the polymer project is also + * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt + */ + (function(scope) { var ContextFreeParser = { @@ -69,6 +79,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: diff --git a/demo.html b/demo.html index 2a50156..4b3d3c4 100644 --- a/demo.html +++ b/demo.html @@ -1,3 +1,12 @@ + diff --git a/index.html b/index.html index 85106b5..58856f3 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,6 @@ -