Renaming syntax elements.

This commit is contained in:
Cyrus Najmabadi 2014-11-29 15:52:46 -08:00
parent e1011aa2f0
commit 1d61ac5d5f
4 changed files with 15 additions and 15 deletions

View file

@ -1061,7 +1061,7 @@ module ts {
function getTypeAliasForTypeLiteral(type: Type): Symbol {
if (type.symbol && type.symbol.flags & SymbolFlags.TypeLiteral) {
var node = type.symbol.declarations[0].parent;
while (node.kind === SyntaxKind.ParenType) {
while (node.kind === SyntaxKind.ParenthesizedType) {
node = node.parent;
}
if (node.kind === SyntaxKind.TypeAliasDeclaration) {
@ -3041,8 +3041,8 @@ module ts {
return getTypeFromTupleTypeNode(<TupleTypeNode>node);
case SyntaxKind.UnionType:
return getTypeFromUnionTypeNode(<UnionTypeNode>node);
case SyntaxKind.ParenType:
return getTypeFromTypeNode((<ParenTypeNode>node).type);
case SyntaxKind.ParenthesizedType:
return getTypeFromTypeNode((<ParenthesizedTypeNode>node).type);
case SyntaxKind.FunctionType:
case SyntaxKind.ConstructorType:
case SyntaxKind.TypeLiteral:
@ -8402,8 +8402,8 @@ module ts {
return checkTupleType(<TupleTypeNode>node);
case SyntaxKind.UnionType:
return checkUnionType(<UnionTypeNode>node);
case SyntaxKind.ParenType:
return checkSourceElement((<ParenTypeNode>node).type);
case SyntaxKind.ParenthesizedType:
return checkSourceElement((<ParenthesizedTypeNode>node).type);
case SyntaxKind.FunctionDeclaration:
return checkFunctionDeclaration(<FunctionDeclaration>node);
case SyntaxKind.Block:

View file

@ -518,8 +518,8 @@ module ts {
return emitTupleType(<TupleTypeNode>type);
case SyntaxKind.UnionType:
return emitUnionType(<UnionTypeNode>type);
case SyntaxKind.ParenType:
return emitParenType(<ParenTypeNode>type);
case SyntaxKind.ParenthesizedType:
return emitParenType(<ParenthesizedTypeNode>type);
case SyntaxKind.FunctionType:
case SyntaxKind.ConstructorType:
return emitSignatureDeclarationWithJsDocComments(<SignatureDeclaration>type);
@ -583,7 +583,7 @@ module ts {
emitSeparatedList(type.types, " | ", emitType);
}
function emitParenType(type: ParenTypeNode) {
function emitParenType(type: ParenthesizedTypeNode) {
write("(");
emitType(type.type);
write(")");

View file

@ -253,8 +253,8 @@ module ts {
return children((<TupleTypeNode>node).elementTypes);
case SyntaxKind.UnionType:
return children((<UnionTypeNode>node).types);
case SyntaxKind.ParenType:
return child((<ParenTypeNode>node).type);
case SyntaxKind.ParenthesizedType:
return child((<ParenthesizedTypeNode>node).type);
case SyntaxKind.ArrayLiteral:
return children((<ArrayLiteral>node).elements);
case SyntaxKind.ObjectLiteral:
@ -1996,8 +1996,8 @@ module ts {
return finishNode(node);
}
function parseParenType(): ParenTypeNode {
var node = <ParenTypeNode>createNode(SyntaxKind.ParenType);
function parseParenType(): ParenthesizedTypeNode {
var node = <ParenthesizedTypeNode>createNode(SyntaxKind.ParenthesizedType);
parseExpected(SyntaxKind.OpenParenToken);
node.type = parseType();
parseExpected(SyntaxKind.CloseParenToken);

View file

@ -163,7 +163,7 @@ module ts {
ArrayType,
TupleType,
UnionType,
ParenType,
ParenthesizedType,
// Expression
ArrayLiteral,
ObjectLiteral,
@ -243,7 +243,7 @@ module ts {
FirstFutureReservedWord = ImplementsKeyword,
LastFutureReservedWord = YieldKeyword,
FirstTypeNode = TypeReference,
LastTypeNode = ParenType,
LastTypeNode = ParenthesizedType,
FirstPunctuation = OpenBraceToken,
LastPunctuation = CaretEqualsToken,
FirstToken = EndOfFileToken,
@ -425,7 +425,7 @@ module ts {
types: NodeArray<TypeNode>;
}
export interface ParenTypeNode extends TypeNode {
export interface ParenthesizedTypeNode extends TypeNode {
type: TypeNode;
}