Include symbols from oli.js using interface and implements tags

Instead of regex parsing, we define tags for interface and
implements.
This commit is contained in:
Andreas Hocevar
2014-04-11 23:02:49 +02:00
committed by Tim Schaub
parent b758d92790
commit aaf6101d0f
3 changed files with 35 additions and 16 deletions

View File

@@ -0,0 +1,23 @@
var util = require('util');
exports.defineTags = function(dictionary) {
var classTag = dictionary.lookUp('class');
dictionary.defineTag('interface', {
mustHaveValue: false,
onTagged: function(doclet, tag) {
classTag.onTagged.apply(this, arguments);
doclet.interface = true;
}
});
dictionary.defineTag('implements', {
mustHaveValue: true,
onTagged: function(doclet, tag) {
if (!doclet.implements) {
doclet.implements = [];
}
doclet.implements.push(tag.value.match(/^{(.*)}$/)[1]);
}
});
};