parse jsdoc param tag even without a param name

This commit is contained in:
zhengbli
2015-08-21 13:07:41 -07:00
parent d1253d56ac
commit 582b0aa31e
3 changed files with 14 additions and 2 deletions

View File

@@ -5831,7 +5831,6 @@ namespace ts {
if (!name) {
parseErrorAtPosition(pos, 0, Diagnostics.Identifier_expected);
return undefined;
}
let preName: Identifier, postName: Identifier;

View File

@@ -2989,7 +2989,8 @@ namespace ts {
switch (tag.kind) {
case SyntaxKind.JSDocTypeTag:
case SyntaxKind.JSDocParameterTag:
let tagWithExpression = <JSDocTypeTag | JSDocParameterTag>tag;
case SyntaxKind.JSDocReturnTag:
let tagWithExpression = <JSDocTypeTag | JSDocParameterTag | JSDocReturnTag>tag;
if (tagWithExpression.typeExpression) {
insideJsDocTagExpression = tagWithExpression.typeExpression.pos < position && position < tagWithExpression.typeExpression.end;
}