Allow parsing TS-style generics in JSDoc

Fixes #6814

(cherry picked from commit 6e06bb39a1)

# Conflicts:
#	tests/cases/fourslash/jsDocGenerics1.ts
This commit is contained in:
Ryan Cavanaugh
2016-02-05 10:47:09 -08:00
parent 78237739ba
commit 4035bf3006

View File

@@ -5765,16 +5765,22 @@ namespace ts {
const result = <JSDocTypeReference>createNode(SyntaxKind.JSDocTypeReference);
result.name = parseSimplePropertyName();
while (parseOptional(SyntaxKind.DotToken)) {
if (token === SyntaxKind.LessThanToken) {
result.typeArguments = parseTypeArguments();
break;
}
else {
result.name = parseQualifiedName(result.name);
if (token === SyntaxKind.LessThanToken) {
result.typeArguments = parseTypeArguments();
}
else {
while (parseOptional(SyntaxKind.DotToken)) {
if (token === SyntaxKind.LessThanToken) {
result.typeArguments = parseTypeArguments();
break;
}
else {
result.name = parseQualifiedName(result.name);
}
}
}
return finishNode(result);
}