Skip to content

Commit ba90e05

Browse files
committed
Fix style.
1 parent 671afc4 commit ba90e05

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/compiler/parser.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,14 +1932,15 @@ namespace ts {
19321932
let node = <TypeReferenceNode>createNode(SyntaxKind.TypeReference, typeName.pos);
19331933
if (typeName.flags & NodeFlags.Missing) {
19341934
errorOnInvalidTypeReference(typeName);
1935-
} else {
1935+
}
1936+
else {
19361937
node.typeName = typeName;
19371938
if (token === SyntaxKind.LessThanToken && !scanner.hasPrecedingLineBreak()) {
19381939
node.typeArguments = parseBracketedList(ParsingContext.TypeArguments, parseType, SyntaxKind.LessThanToken, SyntaxKind.GreaterThanToken);
19391940
}
19401941
}
19411942
if ((<QualifiedName>typeName).right && ((<QualifiedName>typeName).right.flags & NodeFlags.Missing)) {
1942-
errorOnQualifiedTypeIdentifier()
1943+
errorOnInvalidTypeQualifiedName()
19431944
}
19441945
return finishNode(node);
19451946
}
@@ -1951,25 +1952,28 @@ namespace ts {
19511952
}
19521953
else if (token === SyntaxKind.NewKeyword) {
19531954
parseFunctionOrConstructorType(SyntaxKind.ConstructorType);
1954-
} else {
1955+
}
1956+
else {
19551957
needsParentheses = false;
19561958
}
19571959
if (needsParentheses) {
19581960
let hint = "(" + sourceFile.text.substring(node.pos, scanner.getStartPos()).trim() + ")";
19591961
parseErrorAtPosition(node.pos, scanner.getStartPos() - node.pos, Diagnostics.Invalid_type_To_avoid_ambiguity_add_parentheses_Colon_0, hint);
1960-
} else {
1962+
}
1963+
else {
19611964
parseErrorAtCurrentToken(Diagnostics.Type_expected);
19621965
}
19631966
}
19641967

1965-
function errorOnQualifiedTypeIdentifier(): void {
1968+
function errorOnInvalidTypeQualifiedName(): void {
19661969
if (scanner.isReservedWord()) {
19671970
parseErrorAtCurrentToken(Diagnostics.Identifier_expected_reserved_word_0_not_allowed_here, tokenToString(token));
19681971
}
19691972
else {
19701973
if (scanner.hasPrecedingLineBreak()) {
19711974
parseErrorAtPosition(scanner.getStartPos(), 0, Diagnostics.Identifier_expected);
1972-
} else {
1975+
}
1976+
else {
19731977
parseErrorAtCurrentToken(Diagnostics.Identifier_expected);
19741978
}
19751979
}

0 commit comments

Comments
 (0)