Add @interface support

This commit is contained in:
John Firebaugh 2016-03-14 18:25:57 -07:00
parent e9d17e8795
commit 40af71635f
2 changed files with 18 additions and 1 deletions

View File

@ -79,7 +79,12 @@ var flatteners = {
'instance': function (result) {
result.scope = 'instance';
},
// 'interface'
'interface': function (result, tag) {
result.interface = true;
if (tag.description) {
result.name = tag.description;
}
},
'kind': function (result, tag) {
result.kind = tag.kind;
},

View File

@ -254,6 +254,18 @@ test('parse - @instance', function (t) {
t.end();
});
test('parse - @interface', function (t) {
t.deepEqual(evaluate(function () {
/** @interface */
})[0].interface, true, 'anonymous');
t.deepEqual(evaluate(function () {
/** @interface Foo */
})[0].name, 'Foo', 'named');
t.end();
});
test('parse - @kind', function (t) {
t.equal(evaluate(function () {
/** @kind class */