mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 20:51:43 -06:00
Merge pull request #1065 from Microsoft/shorthandProperties
Add support for parsing shorthand property assignments.
This commit is contained in:
commit
147550e2d3
@ -1,5 +1,4 @@
|
||||
/// <reference path="core.ts"/>
|
||||
/// <reference path="scanner.ts"/>
|
||||
|
||||
module ts {
|
||||
|
||||
|
||||
@ -95,6 +95,7 @@ module TypeScript {
|
||||
Expression_expected: "Expression expected.",
|
||||
Type_expected: "Type expected.",
|
||||
Template_literal_cannot_be_used_as_an_element_name: "Template literal cannot be used as an element name.",
|
||||
Computed_property_names_cannot_be_used_here: "Computed property names cannot be used here.",
|
||||
Duplicate_identifier_0: "Duplicate identifier '{0}'.",
|
||||
The_name_0_does_not_exist_in_the_current_scope: "The name '{0}' does not exist in the current scope.",
|
||||
The_name_0_does_not_refer_to_a_value: "The name '{0}' does not refer to a value.",
|
||||
|
||||
@ -97,6 +97,7 @@ module TypeScript {
|
||||
"Expression expected.": { "code": 1109, "category": DiagnosticCategory.Error },
|
||||
"Type expected.": { "code": 1110, "category": DiagnosticCategory.Error },
|
||||
"Template literal cannot be used as an element name.": { "code": 1111, "category": DiagnosticCategory.Error },
|
||||
"Computed property names cannot be used here.": { "code": 1112, "category": DiagnosticCategory.Error },
|
||||
"Duplicate identifier '{0}'.": { "code": 2000, "category": DiagnosticCategory.Error },
|
||||
"The name '{0}' does not exist in the current scope.": { "code": 2001, "category": DiagnosticCategory.Error },
|
||||
"The name '{0}' does not refer to a value.": { "code": 2002, "category": DiagnosticCategory.Error },
|
||||
|
||||
@ -375,6 +375,10 @@
|
||||
"category": "Error",
|
||||
"code": 1111
|
||||
},
|
||||
"Computed property names cannot be used here.": {
|
||||
"category": "Error",
|
||||
"code": 1112
|
||||
},
|
||||
"Duplicate identifier '{0}'.": {
|
||||
"category": "Error",
|
||||
"code": 2000
|
||||
|
||||
@ -620,8 +620,9 @@ var TypeScript;
|
||||
SyntaxKind[SyntaxKind["Parameter"] = 208] = "Parameter";
|
||||
SyntaxKind[SyntaxKind["EnumElement"] = 209] = "EnumElement";
|
||||
SyntaxKind[SyntaxKind["TypeAnnotation"] = 210] = "TypeAnnotation";
|
||||
SyntaxKind[SyntaxKind["ExternalModuleReference"] = 211] = "ExternalModuleReference";
|
||||
SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 212] = "ModuleNameModuleReference";
|
||||
SyntaxKind[SyntaxKind["ComputedPropertyName"] = 211] = "ComputedPropertyName";
|
||||
SyntaxKind[SyntaxKind["ExternalModuleReference"] = 212] = "ExternalModuleReference";
|
||||
SyntaxKind[SyntaxKind["ModuleNameModuleReference"] = 213] = "ModuleNameModuleReference";
|
||||
SyntaxKind[SyntaxKind["FirstStandardKeyword"] = SyntaxKind.BreakKeyword] = "FirstStandardKeyword";
|
||||
SyntaxKind[SyntaxKind["LastStandardKeyword"] = SyntaxKind.WithKeyword] = "LastStandardKeyword";
|
||||
SyntaxKind[SyntaxKind["FirstFutureReservedKeyword"] = SyntaxKind.ClassKeyword] = "FirstFutureReservedKeyword";
|
||||
@ -1040,7 +1041,7 @@ var definitions = [
|
||||
name: 'VariableDeclaratorSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecific: true },
|
||||
{ name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true }
|
||||
]
|
||||
@ -1376,7 +1377,7 @@ var definitions = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['ITypeMemberSyntax'],
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'questionToken', isToken: true, isOptional: true, itTypeScriptSpecific: true },
|
||||
{ name: 'callSignature', type: 'CallSignatureSyntax' }
|
||||
]
|
||||
@ -1398,7 +1399,7 @@ var definitions = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['ITypeMemberSyntax'],
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'questionToken', isToken: true, isOptional: true },
|
||||
{ name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true }
|
||||
],
|
||||
@ -1500,7 +1501,7 @@ var definitions = [
|
||||
interfaces: ['IMemberDeclarationSyntax'],
|
||||
children: [
|
||||
{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken' },
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
{ name: 'block', type: 'BlockSyntax', isOptional: true },
|
||||
{ name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true }
|
||||
@ -1514,7 +1515,7 @@ var definitions = [
|
||||
children: [
|
||||
{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true },
|
||||
{ name: 'getKeyword', isToken: true, excludeFromAST: true },
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
{ name: 'block', type: 'BlockSyntax' }
|
||||
]
|
||||
@ -1526,7 +1527,7 @@ var definitions = [
|
||||
children: [
|
||||
{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true },
|
||||
{ name: 'setKeyword', isToken: true, excludeFromAST: true },
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
{ name: 'block', type: 'BlockSyntax' }
|
||||
],
|
||||
@ -1713,7 +1714,7 @@ var definitions = [
|
||||
name: 'EnumElementSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true }
|
||||
]
|
||||
},
|
||||
@ -1739,12 +1740,22 @@ var definitions = [
|
||||
{ name: 'closeBraceToken', isToken: true, excludeFromAST: true }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'ComputedPropertyNameSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyNameSyntax'],
|
||||
children: [
|
||||
{ name: 'openBracketToken', isToken: true },
|
||||
{ name: 'expression', type: 'IExpressionSyntax' },
|
||||
{ name: 'closeBracketToken', isToken: true }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'SimplePropertyAssignmentSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyAssignmentSyntax'],
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'colonToken', isToken: true, excludeFromAST: true },
|
||||
{ name: 'expression', type: 'IExpressionSyntax' }
|
||||
]
|
||||
@ -1754,7 +1765,7 @@ var definitions = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyAssignmentSyntax'],
|
||||
children: [
|
||||
{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
{ name: 'block', type: 'BlockSyntax' }
|
||||
]
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1005,7 +1005,7 @@ module TypeScript.Parser {
|
||||
return true;
|
||||
}
|
||||
|
||||
return isPropertyName(currentToken(), inErrorRecovery);
|
||||
return isPropertyName(/*peekToken:*/ 0, inErrorRecovery);
|
||||
}
|
||||
|
||||
function tryParseEnumElementEqualsValueClause(): EqualsValueClauseSyntax {
|
||||
@ -1019,11 +1019,11 @@ module TypeScript.Parser {
|
||||
return <EnumElementSyntax>node;
|
||||
}
|
||||
|
||||
if (!isPropertyName(currentToken(), inErrorRecovery)) {
|
||||
if (!isPropertyName(/*peekToken:*/ 0, inErrorRecovery)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return new EnumElementSyntax(parseNodeData, eatPropertyName(), tryParseEnumElementEqualsValueClause());
|
||||
return new EnumElementSyntax(parseNodeData, parsePropertyName(), tryParseEnumElementEqualsValueClause());
|
||||
}
|
||||
|
||||
function isModifierKind(kind: SyntaxKind): boolean {
|
||||
@ -1131,7 +1131,7 @@ module TypeScript.Parser {
|
||||
return false;
|
||||
}
|
||||
|
||||
return isPropertyName(peekToken(modifierCount + 1), inErrorRecovery);
|
||||
return isPropertyName(/*peekIndex:*/ modifierCount + 1, inErrorRecovery);
|
||||
}
|
||||
|
||||
function parseAccessor(checkForStrictMode: boolean): IAccessorSyntax {
|
||||
@ -1152,14 +1152,14 @@ module TypeScript.Parser {
|
||||
|
||||
function parseGetMemberAccessorDeclaration(modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, checkForStrictMode: boolean): GetAccessorSyntax {
|
||||
return new GetAccessorSyntax(parseNodeData,
|
||||
modifiers, consumeToken(getKeyword), eatPropertyName(),
|
||||
modifiers, consumeToken(getKeyword), parsePropertyName(),
|
||||
parseCallSignature(/*requireCompleteTypeParameterList:*/ false),
|
||||
parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, checkForStrictMode));
|
||||
}
|
||||
|
||||
function parseSetMemberAccessorDeclaration(modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, checkForStrictMode: boolean): SetAccessorSyntax {
|
||||
return new SetAccessorSyntax(parseNodeData,
|
||||
modifiers, consumeToken(setKeyword), eatPropertyName(),
|
||||
modifiers, consumeToken(setKeyword), parsePropertyName(),
|
||||
parseCallSignature(/*requireCompleteTypeParameterList:*/ false),
|
||||
parseBlock(/*parseStatementsEvenWithNoOpenBrace:*/ false, checkForStrictMode));
|
||||
}
|
||||
@ -1173,10 +1173,48 @@ module TypeScript.Parser {
|
||||
// checks for a subset of the conditions of the previous two calls.
|
||||
var _modifierCount = modifierCount();
|
||||
return isConstructorDeclaration(_modifierCount) ||
|
||||
isMemberFunctionDeclaration(_modifierCount, inErrorRecovery) ||
|
||||
isAccessor(_modifierCount, inErrorRecovery) ||
|
||||
isMemberVariableDeclaration(_modifierCount, inErrorRecovery) ||
|
||||
isIndexMemberDeclaration(_modifierCount);
|
||||
isIndexMemberDeclaration(_modifierCount) ||
|
||||
isMemberVariableOrFunctionDeclaration(_modifierCount, inErrorRecovery);
|
||||
}
|
||||
|
||||
function isMemberVariableOrFunctionDeclaration(peekIndex: number, inErrorRecovery: boolean) {
|
||||
// Check if its the start of a property or method. Both must start with a property name.
|
||||
if (!isPropertyName(peekIndex, inErrorRecovery)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SyntaxFacts.isAnyKeyword(peekToken(peekIndex).kind)) {
|
||||
// It wasn't a keyword. So this is definitely a member variable or function.
|
||||
return true;
|
||||
}
|
||||
|
||||
// Keywords *can* technically start properties and methods. However, they often
|
||||
// are actually intended to start a real ts/js construct. Only accept a keyword
|
||||
// if it is definitely a property or method.
|
||||
// keywords are also property names. Only accept a keyword as a property
|
||||
// name if is of the form:
|
||||
// public;
|
||||
// public=
|
||||
// public:
|
||||
// public }
|
||||
// public(
|
||||
// public<
|
||||
// public <eof>
|
||||
// public <newline>
|
||||
var nextToken = peekToken(peekIndex + 1);
|
||||
switch (nextToken.kind) {
|
||||
case SyntaxKind.SemicolonToken:
|
||||
case SyntaxKind.EqualsToken:
|
||||
case SyntaxKind.ColonToken:
|
||||
case SyntaxKind.CloseBraceToken:
|
||||
case SyntaxKind.OpenParenToken:
|
||||
case SyntaxKind.LessThanToken:
|
||||
case SyntaxKind.EndOfFileToken:
|
||||
return true;
|
||||
default:
|
||||
return previousTokenHasTrailingNewLine(nextToken);
|
||||
}
|
||||
}
|
||||
|
||||
function tryParseClassElement(inErrorRecovery: boolean): IClassElementSyntax {
|
||||
@ -1186,21 +1224,28 @@ module TypeScript.Parser {
|
||||
return <IClassElementSyntax>node;
|
||||
}
|
||||
|
||||
// Have to check for indexers before anything else. That way if we see "[foo:" we
|
||||
// parse it out as an indexer and not a member function or variable.
|
||||
var _modifierCount = modifierCount();
|
||||
if (isConstructorDeclaration(_modifierCount)) {
|
||||
return parseConstructorDeclaration();
|
||||
}
|
||||
else if (isMemberFunctionDeclaration(_modifierCount, inErrorRecovery)) {
|
||||
return parseMemberFunctionDeclaration();
|
||||
else if (isIndexMemberDeclaration(_modifierCount)) {
|
||||
return parseIndexMemberDeclaration();
|
||||
}
|
||||
else if (isAccessor(_modifierCount, inErrorRecovery)) {
|
||||
return parseAccessor(/*checkForStrictMode:*/ false);
|
||||
}
|
||||
else if (isMemberVariableDeclaration(_modifierCount, inErrorRecovery)) {
|
||||
return parseMemberVariableDeclaration();
|
||||
}
|
||||
else if (isIndexMemberDeclaration(_modifierCount)) {
|
||||
return parseIndexMemberDeclaration();
|
||||
else if (isMemberVariableOrFunctionDeclaration(/*peekIndex:*/ _modifierCount, inErrorRecovery)) {
|
||||
var modifiers = parseModifiers();
|
||||
var propertyName = parsePropertyName();
|
||||
|
||||
if (isCallSignature(/*peekIndex:*/ 0)) {
|
||||
return parseMemberFunctionDeclaration(modifiers, propertyName);
|
||||
}
|
||||
else {
|
||||
return parseMemberVariableDeclaration(modifiers, propertyName);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
@ -1233,13 +1278,7 @@ module TypeScript.Parser {
|
||||
return new ConstructorDeclarationSyntax(parseNodeData, modifiers, constructorKeyword, callSignature, block, semicolonToken);
|
||||
}
|
||||
|
||||
function isMemberFunctionDeclaration(modifierCount: number, inErrorRecovery: boolean): boolean {
|
||||
return isPropertyName(peekToken(modifierCount), inErrorRecovery) && isCallSignature(modifierCount + 1);
|
||||
}
|
||||
|
||||
function parseMemberFunctionDeclaration(): MemberFunctionDeclarationSyntax {
|
||||
var modifiers = parseModifiers();
|
||||
var propertyName = eatPropertyName();
|
||||
function parseMemberFunctionDeclaration(modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax): MemberFunctionDeclarationSyntax {
|
||||
var callSignature = parseCallSignature(/*requireCompleteTypeParameterList:*/ false);
|
||||
|
||||
// If we got an errant => then we want to parse what's coming up without requiring an
|
||||
@ -1259,42 +1298,13 @@ module TypeScript.Parser {
|
||||
return new MemberFunctionDeclarationSyntax(parseNodeData, modifiers, propertyName, callSignature, block, semicolon);
|
||||
}
|
||||
|
||||
function isDefinitelyMemberVariablePropertyName(index: number): boolean {
|
||||
// keywords are also property names. Only accept a keyword as a property
|
||||
// name if is of the form:
|
||||
// public;
|
||||
// public=
|
||||
// public:
|
||||
// public }
|
||||
// public <eof>
|
||||
// public <newline>
|
||||
if (SyntaxFacts.isAnyKeyword(peekToken(index).kind)) {
|
||||
var nextToken = peekToken(index + 1);
|
||||
switch (nextToken.kind) {
|
||||
case SyntaxKind.SemicolonToken:
|
||||
case SyntaxKind.EqualsToken:
|
||||
case SyntaxKind.ColonToken:
|
||||
case SyntaxKind.CloseBraceToken:
|
||||
case SyntaxKind.EndOfFileToken:
|
||||
return true;
|
||||
default:
|
||||
return previousTokenHasTrailingNewLine(nextToken);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// If was a property name and not a keyword, then we're good to go.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function isMemberVariableDeclaration(modifierCount: number, inErrorRecover: boolean): boolean {
|
||||
return isPropertyName(peekToken(modifierCount), inErrorRecover) && isDefinitelyMemberVariablePropertyName(modifierCount);
|
||||
}
|
||||
|
||||
function parseMemberVariableDeclaration(): MemberVariableDeclarationSyntax {
|
||||
function parseMemberVariableDeclaration(modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax): MemberVariableDeclarationSyntax {
|
||||
return new MemberVariableDeclarationSyntax(parseNodeData,
|
||||
parseModifiers(),
|
||||
tryParseVariableDeclarator(/*allowIn:*/ true, /*allowPropertyName:*/ true), eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false));
|
||||
modifiers,
|
||||
new VariableDeclaratorSyntax(parseNodeData, propertyName,
|
||||
parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false),
|
||||
isEqualsValueClause(/*inParameter*/ false) ? parseEqualsValueClause(/*allowIn:*/ true) : undefined),
|
||||
eatExplicitOrAutomaticSemicolon(/*allowWithoutNewline:*/ false));
|
||||
}
|
||||
|
||||
function isIndexMemberDeclaration(modifierCount: number): boolean {
|
||||
@ -1429,8 +1439,36 @@ module TypeScript.Parser {
|
||||
return isCallSignature(/*tokenIndex:*/ 0) ||
|
||||
isConstructSignature() ||
|
||||
isIndexSignature(/*tokenIndex:*/ 0) ||
|
||||
isMethodSignature(inErrorRecovery) ||
|
||||
isPropertySignature(inErrorRecovery);
|
||||
isMethodOrPropertySignature(inErrorRecovery);
|
||||
}
|
||||
|
||||
function isMethodOrPropertySignature(inErrorRecovery: boolean): boolean {
|
||||
var _currentToken = currentToken();
|
||||
|
||||
// Keywords can start properties. However, they're often intended to start something
|
||||
// else. If we see a modifier before something that can be a property, then don't
|
||||
// try parse it out as a property. For example, if we have:
|
||||
//
|
||||
// public foo
|
||||
//
|
||||
// Then don't parse 'public' as a property name. Note: if you have:
|
||||
//
|
||||
// public
|
||||
// foo
|
||||
//
|
||||
// Then we *should* parse it as a property name, as ASI takes effect here.
|
||||
if (isModifier(_currentToken, /*index:*/ 0)) {
|
||||
var token1 = peekToken(1);
|
||||
if (!existsNewLineBetweenTokens(_currentToken, token1, source.text) &&
|
||||
isPropertyNameToken(token1, inErrorRecovery)) {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Note: property names also start function signatures. So it's important that we call this
|
||||
// after we calll isFunctionSignature.
|
||||
return isPropertyName(/*peekIndex:*/ 0, inErrorRecovery);
|
||||
}
|
||||
|
||||
function tryParseTypeMember(inErrorRecovery: boolean): ITypeMemberSyntax {
|
||||
@ -1449,13 +1487,16 @@ module TypeScript.Parser {
|
||||
else if (isIndexSignature(/*tokenIndex:*/ 0)) {
|
||||
return parseIndexSignature();
|
||||
}
|
||||
else if (isMethodSignature(inErrorRecovery)) {
|
||||
// Note: it is important that isFunctionSignature is called before isPropertySignature.
|
||||
// isPropertySignature checks for a subset of isFunctionSignature.
|
||||
return parseMethodSignature();
|
||||
}
|
||||
else if (isPropertySignature(inErrorRecovery)) {
|
||||
return parsePropertySignature();
|
||||
else if (isMethodOrPropertySignature(inErrorRecovery)) {
|
||||
var propertyName = parsePropertyName();
|
||||
var questionToken = tryEatToken(SyntaxKind.QuestionToken);
|
||||
|
||||
if (isCallSignature(/*peekIndex:*/ 0)) {
|
||||
return parseMethodSignature(propertyName, questionToken);
|
||||
}
|
||||
else {
|
||||
return parsePropertySignature(propertyName, questionToken);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
@ -1477,14 +1518,14 @@ module TypeScript.Parser {
|
||||
openBracketToken, parameters, eatToken(SyntaxKind.CloseBracketToken), parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false));
|
||||
}
|
||||
|
||||
function parseMethodSignature(): MethodSignatureSyntax {
|
||||
function parseMethodSignature(propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken): MethodSignatureSyntax {
|
||||
return new MethodSignatureSyntax(parseNodeData,
|
||||
eatPropertyName(), tryEatToken(SyntaxKind.QuestionToken), parseCallSignature(/*requireCompleteTypeParameterList:*/ false));
|
||||
propertyName, questionToken, parseCallSignature(/*requireCompleteTypeParameterList:*/ false));
|
||||
}
|
||||
|
||||
function parsePropertySignature(): PropertySignatureSyntax {
|
||||
function parsePropertySignature(propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken): PropertySignatureSyntax {
|
||||
return new PropertySignatureSyntax(parseNodeData,
|
||||
eatPropertyName(), tryEatToken(SyntaxKind.QuestionToken), parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false));
|
||||
propertyName, questionToken, parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false));
|
||||
}
|
||||
|
||||
function isCallSignature(peekIndex: number): boolean {
|
||||
@ -1501,54 +1542,36 @@ module TypeScript.Parser {
|
||||
}
|
||||
|
||||
function isIndexSignature(peekIndex: number): boolean {
|
||||
return peekToken(peekIndex).kind === SyntaxKind.OpenBracketToken;
|
||||
}
|
||||
|
||||
function isMethodSignature(inErrorRecovery: boolean): boolean {
|
||||
if (isPropertyName(currentToken(), inErrorRecovery)) {
|
||||
// id(
|
||||
if (isCallSignature(1)) {
|
||||
// In order to be considered an index signature, we need to see at least:
|
||||
//
|
||||
// [a:
|
||||
// [...
|
||||
// [a,
|
||||
// [public a
|
||||
// []
|
||||
//
|
||||
// Otherwise, we will think that this is the start of a computed property name
|
||||
// for a function or variable.
|
||||
if (peekToken(peekIndex).kind === SyntaxKind.OpenBracketToken) {
|
||||
var token1 = peekToken(peekIndex + 1);
|
||||
if (token1.kind === SyntaxKind.DotDotDotToken || token1.kind === SyntaxKind.CloseBracketToken) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// id?(
|
||||
if (peekToken(1).kind === SyntaxKind.QuestionToken &&
|
||||
isCallSignature(2)) {
|
||||
return true;
|
||||
if (isIdentifier(token1)) {
|
||||
var token2 = peekToken(peekIndex + 2);
|
||||
if (token2.kind === SyntaxKind.ColonToken || token2.kind === SyntaxKind.CommaToken) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (token1.kind === SyntaxKind.PublicKeyword || token1.kind === SyntaxKind.PrivateKeyword) {
|
||||
var token2 = peekToken(peekIndex + 2);
|
||||
return isIdentifier(token2);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function isPropertySignature(inErrorRecovery: boolean): boolean {
|
||||
var _currentToken = currentToken();
|
||||
|
||||
// Keywords can start properties. However, they're often intended to start something
|
||||
// else. If we see a modifier before something that can be a property, then don't
|
||||
// try parse it out as a property. For example, if we have:
|
||||
//
|
||||
// public foo
|
||||
//
|
||||
// Then don't parse 'public' as a property name. Note: if you have:
|
||||
//
|
||||
// public
|
||||
// foo
|
||||
//
|
||||
// Then we *should* parse it as a property name, as ASI takes effect here.
|
||||
if (isModifier(_currentToken, /*index:*/ 0)) {
|
||||
if (!existsNewLineBetweenTokens(_currentToken, peekToken(1), source.text) &&
|
||||
isPropertyName(peekToken(1), inErrorRecovery)) {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Note: property names also start function signatures. So it's important that we call this
|
||||
// after we calll isFunctionSignature.
|
||||
return isPropertyName(_currentToken, inErrorRecovery);
|
||||
}
|
||||
|
||||
function isHeritageClause(): boolean {
|
||||
var tokenKind = currentToken().kind;
|
||||
return tokenKind === SyntaxKind.ExtendsKeyword || tokenKind === SyntaxKind.ImplementsKeyword;
|
||||
@ -1986,7 +2009,17 @@ module TypeScript.Parser {
|
||||
|
||||
consumeToken(switchKeyword);
|
||||
var openParenToken = eatToken(SyntaxKind.OpenParenToken);
|
||||
var expression = parseExpression(/*allowIn:*/ true);
|
||||
var expression: IExpressionSyntax;
|
||||
|
||||
// if we have "switch {"
|
||||
// then don't try to consume the { as the start of an expression.
|
||||
if (openParenToken.fullWidth() === 0 && currentToken().kind === SyntaxKind.OpenBraceToken) {
|
||||
expression = eatIdentifierToken();
|
||||
}
|
||||
else {
|
||||
expression = parseExpression(/*allowIn:*/ true);
|
||||
}
|
||||
|
||||
var closeParenToken = eatToken(SyntaxKind.CloseParenToken);
|
||||
var openBraceToken = eatToken(SyntaxKind.OpenBraceToken);
|
||||
|
||||
@ -2258,7 +2291,7 @@ module TypeScript.Parser {
|
||||
return variableDeclarator.equalsValueClause === undefined;
|
||||
}
|
||||
|
||||
function tryParseVariableDeclarator(allowIn: boolean, allowPropertyName: boolean): VariableDeclaratorSyntax {
|
||||
function tryParseVariableDeclarator(allowIn: boolean): VariableDeclaratorSyntax {
|
||||
// TODO(cyrusn): What if the 'allowIn' context has changed between when we last parsed
|
||||
// and now? We could end up with an incorrect tree. For example, say we had in the old
|
||||
// tree "var i = a in b". Then, in the new tree the declarator portion moved into:
|
||||
@ -2271,19 +2304,15 @@ module TypeScript.Parser {
|
||||
return <VariableDeclaratorSyntax>node;
|
||||
}
|
||||
|
||||
if (allowPropertyName) {
|
||||
// Debug.assert(isPropertyName(currentToken(), /*inErrorRecovery:*/ false));
|
||||
}
|
||||
|
||||
if (!allowPropertyName && !isIdentifier(currentToken())) {
|
||||
if (!isIdentifier(currentToken())) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var propertyName = allowPropertyName ? eatPropertyName() : eatIdentifierToken();
|
||||
var propertyName = eatIdentifierToken();
|
||||
var equalsValueClause: EqualsValueClauseSyntax = undefined;
|
||||
var typeAnnotation: TypeAnnotationSyntax = undefined;
|
||||
|
||||
if (propertyName.fullWidth() > 0) {
|
||||
if (fullWidth(propertyName) > 0) {
|
||||
typeAnnotation = parseOptionalTypeAnnotation(/*allowStringLiteral:*/ false);
|
||||
|
||||
if (isEqualsValueClause(/*inParameter*/ false)) {
|
||||
@ -3309,51 +3338,73 @@ module TypeScript.Parser {
|
||||
if (isAccessor(modifierCount(), inErrorRecovery)) {
|
||||
return parseAccessor(/*checkForStrictMode:*/ true);
|
||||
}
|
||||
else if (isFunctionPropertyAssignment(inErrorRecovery)) {
|
||||
return parseFunctionPropertyAssignment();
|
||||
|
||||
// Note: we don't want to call parsePropertyName here yet as it will convert a keyword
|
||||
// to an identifier name. We don't want to do that yet as a keyword is not legal as a
|
||||
// shorthand property assignment.
|
||||
|
||||
var _currentToken = currentToken();
|
||||
if (isIdentifier(_currentToken)) {
|
||||
var token1 = peekToken(1);
|
||||
if (token1.kind !== SyntaxKind.ColonToken &&
|
||||
token1.kind !== SyntaxKind.OpenParenToken &&
|
||||
token1.kind !== SyntaxKind.LessThanToken) {
|
||||
|
||||
// If we don't have one of:
|
||||
//
|
||||
// id:
|
||||
// id(
|
||||
// id<
|
||||
//
|
||||
// then this is a shorthand property assignment. Just return the identifier
|
||||
// token as is.
|
||||
return consumeToken(_currentToken);
|
||||
}
|
||||
}
|
||||
else if (isSimplePropertyAssignment(inErrorRecovery)) {
|
||||
return parseSimplePropertyAssignment();
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
|
||||
// All the rest of the property assignments start with property names. They are:
|
||||
// id: e
|
||||
// [e1]: e2
|
||||
// id() { }
|
||||
// [e]() { }
|
||||
if (isPropertyName(/*peekIndex:*/ 0, inErrorRecovery)) {
|
||||
var propertyName = parsePropertyName();
|
||||
|
||||
if (isCallSignature(/*peekIndex:*/ 0)) {
|
||||
return parseFunctionPropertyAssignment(propertyName);
|
||||
}
|
||||
else {
|
||||
// If we didn't have an identifier, then we must have gotten a keyword or a
|
||||
// literal. Neither of these are allowed in a shorthand property, so this must
|
||||
// be a simple property assignment.
|
||||
//
|
||||
// Also, if we have an identifier and it is followed by a colon then this is
|
||||
// definitely a simple property assignment.
|
||||
return new SimplePropertyAssignmentSyntax(parseNodeData,
|
||||
propertyName, eatToken(SyntaxKind.ColonToken), tryParseAssignmentExpressionOrHigher(/*force:*/ true, /*allowIn:*/ true));
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function isPropertyAssignment(inErrorRecovery: boolean): boolean {
|
||||
return isAccessor(modifierCount(), inErrorRecovery) ||
|
||||
isFunctionPropertyAssignment(inErrorRecovery) ||
|
||||
isSimplePropertyAssignment(inErrorRecovery);
|
||||
isPropertyName(/*peekIndex:*/ 0, inErrorRecovery);
|
||||
}
|
||||
|
||||
function eatPropertyName(): ISyntaxToken {
|
||||
var _currentToken = currentToken();
|
||||
return SyntaxFacts.isIdentifierNameOrAnyKeyword(_currentToken)
|
||||
? eatIdentifierNameToken()
|
||||
: consumeToken(_currentToken);
|
||||
function isPropertyName(peekIndex: number, inErrorRecovery: boolean): boolean {
|
||||
var token = peekToken(peekIndex);
|
||||
if (token.kind === SyntaxKind.OpenBracketToken) {
|
||||
// A '[' only starts a property name as long as we're sure it doesn't start an
|
||||
// index signature.
|
||||
return !isIndexSignature(peekIndex);
|
||||
}
|
||||
|
||||
return isPropertyNameToken(token, inErrorRecovery);
|
||||
}
|
||||
|
||||
function isFunctionPropertyAssignment(inErrorRecovery: boolean): boolean {
|
||||
return isPropertyName(currentToken(), inErrorRecovery) &&
|
||||
isCallSignature(/*peekIndex:*/ 1);
|
||||
}
|
||||
|
||||
function parseFunctionPropertyAssignment(): FunctionPropertyAssignmentSyntax {
|
||||
return new FunctionPropertyAssignmentSyntax(parseNodeData,
|
||||
eatPropertyName(), parseCallSignature(/*requireCompleteTypeParameterList:*/ false),
|
||||
parseBlock(/*parseBlockEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ true));
|
||||
}
|
||||
|
||||
function isSimplePropertyAssignment(inErrorRecovery: boolean): boolean {
|
||||
return isPropertyName(currentToken(), inErrorRecovery);
|
||||
}
|
||||
|
||||
function parseSimplePropertyAssignment(): SimplePropertyAssignmentSyntax {
|
||||
return new SimplePropertyAssignmentSyntax(parseNodeData,
|
||||
eatPropertyName(), eatToken(SyntaxKind.ColonToken), tryParseAssignmentExpressionOrHigher(/*force:*/ true, /*allowIn:*/ true));
|
||||
}
|
||||
|
||||
function isPropertyName(token: ISyntaxToken, inErrorRecovery: boolean): boolean {
|
||||
function isPropertyNameToken(token: ISyntaxToken, inErrorRecovery: boolean): boolean {
|
||||
// NOTE: we do *not* want to check "isIdentifier" here. Any IdentifierName is
|
||||
// allowed here, even reserved words like keywords.
|
||||
if (SyntaxFacts.isIdentifierNameOrAnyKeyword(token)) {
|
||||
@ -3372,12 +3423,42 @@ module TypeScript.Parser {
|
||||
}
|
||||
}
|
||||
|
||||
return isLiteralPropertyName(token);
|
||||
}
|
||||
|
||||
function isLiteralPropertyName(token: ISyntaxToken): boolean {
|
||||
// We allow a template literal while parser for error tolerance. We'll report errors
|
||||
// on this later in the grammar checker walker.
|
||||
var kind = token.kind;
|
||||
return kind === SyntaxKind.StringLiteral || kind === SyntaxKind.NumericLiteral || kind === SyntaxKind.NoSubstitutionTemplateToken;
|
||||
}
|
||||
|
||||
function parsePropertyName(): IPropertyNameSyntax {
|
||||
var _currentToken = currentToken();
|
||||
if (_currentToken.kind === SyntaxKind.OpenBracketToken) {
|
||||
return parseComputedPropertyName(_currentToken);
|
||||
}
|
||||
else if (SyntaxFacts.isIdentifierNameOrAnyKeyword(_currentToken)) {
|
||||
// If it was a keyword, convert it to an identifier name.
|
||||
return eatIdentifierNameToken();
|
||||
}
|
||||
else {
|
||||
// Must have been a literal.
|
||||
return consumeToken(_currentToken);
|
||||
}
|
||||
}
|
||||
|
||||
function parseComputedPropertyName(openBracketToken: ISyntaxToken): ComputedPropertyNameSyntax {
|
||||
return new ComputedPropertyNameSyntax(parseNodeData,
|
||||
consumeToken(openBracketToken), tryParseAssignmentExpressionOrHigher(/*force:*/ true, /*allowIn:*/ true), eatToken(SyntaxKind.CloseBracketToken));
|
||||
}
|
||||
|
||||
function parseFunctionPropertyAssignment(propertyName: IPropertyNameSyntax): FunctionPropertyAssignmentSyntax {
|
||||
return new FunctionPropertyAssignmentSyntax(parseNodeData,
|
||||
propertyName, parseCallSignature(/*requireCompleteTypeParameterList:*/ false),
|
||||
parseBlock(/*parseBlockEvenWithNoOpenBrace:*/ false, /*checkForStrictMode:*/ true));
|
||||
}
|
||||
|
||||
function parseArrayLiteralExpression(openBracketToken: ISyntaxToken): ArrayLiteralExpressionSyntax {
|
||||
// Debug.assert(currentToken().kind === SyntaxKind.OpenBracketToken);
|
||||
consumeToken(openBracketToken);
|
||||
@ -4339,8 +4420,8 @@ module TypeScript.Parser {
|
||||
case ListParsingState.ObjectType_TypeMembers: return tryParseTypeMember(inErrorRecovery);
|
||||
case ListParsingState.ClassOrInterfaceDeclaration_HeritageClauses: return tryParseHeritageClause();
|
||||
case ListParsingState.HeritageClause_TypeNameList: return tryParseHeritageClauseTypeName();
|
||||
case ListParsingState.VariableDeclaration_VariableDeclarators_AllowIn: return tryParseVariableDeclarator(/*allowIn:*/ true, /*allowIdentifierName:*/ false);
|
||||
case ListParsingState.VariableDeclaration_VariableDeclarators_DisallowIn: return tryParseVariableDeclarator(/*allowIn:*/ false, /*allowIdentifierName:*/ false);
|
||||
case ListParsingState.VariableDeclaration_VariableDeclarators_AllowIn: return tryParseVariableDeclarator(/*allowIn:*/ true);
|
||||
case ListParsingState.VariableDeclaration_VariableDeclarators_DisallowIn: return tryParseVariableDeclarator(/*allowIn:*/ false);
|
||||
case ListParsingState.ArgumentList_AssignmentExpressions: return tryParseArgumentListExpression();
|
||||
case ListParsingState.ObjectLiteralExpression_PropertyAssignments: return tryParsePropertyAssignment(inErrorRecovery);
|
||||
case ListParsingState.ArrayLiteralExpression_AssignmentExpressions: return tryParseAssignmentOrOmittedExpression();
|
||||
|
||||
@ -353,7 +353,7 @@ module TypeScript.PrettyPrinter {
|
||||
}
|
||||
|
||||
public visitVariableDeclarator(node: VariableDeclaratorSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.appendNode(node.equalsValueClause);
|
||||
}
|
||||
|
||||
@ -579,7 +579,7 @@ module TypeScript.PrettyPrinter {
|
||||
}
|
||||
|
||||
public visitMethodSignature(node: MethodSignatureSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.appendToken(node.questionToken);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
}
|
||||
@ -592,7 +592,7 @@ module TypeScript.PrettyPrinter {
|
||||
}
|
||||
|
||||
public visitPropertySignature(node: PropertySignatureSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.appendToken(node.questionToken);
|
||||
this.appendNode(node.typeAnnotation);
|
||||
}
|
||||
@ -684,7 +684,7 @@ module TypeScript.PrettyPrinter {
|
||||
public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): void {
|
||||
this.appendSpaceList(node.modifiers);
|
||||
this.ensureSpace();
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
this.appendBlockOrSemicolon(node.block, node.semicolonToken);
|
||||
}
|
||||
@ -694,7 +694,7 @@ module TypeScript.PrettyPrinter {
|
||||
this.ensureSpace();
|
||||
this.appendToken(node.getKeyword);
|
||||
this.ensureSpace();
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
this.ensureSpace();
|
||||
visitNodeOrToken(this, node.block);
|
||||
@ -705,7 +705,7 @@ module TypeScript.PrettyPrinter {
|
||||
this.ensureSpace();
|
||||
this.appendToken(node.setKeyword);
|
||||
this.ensureSpace();
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature)
|
||||
this.ensureSpace();
|
||||
visitNodeOrToken(this, node.block);
|
||||
@ -895,7 +895,7 @@ module TypeScript.PrettyPrinter {
|
||||
}
|
||||
|
||||
public visitEnumElement(node: EnumElementSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.ensureSpace();
|
||||
this.appendNode(node.equalsValueClause);
|
||||
}
|
||||
@ -926,15 +926,21 @@ module TypeScript.PrettyPrinter {
|
||||
this.appendToken(node.closeBraceToken);
|
||||
}
|
||||
|
||||
public visitComputedPropertyName(node: ComputedPropertyNameSyntax): void {
|
||||
this.appendToken(node.openBracketToken);
|
||||
visitNodeOrToken(this, node.expression);
|
||||
this.appendToken(node.closeBracketToken);
|
||||
}
|
||||
|
||||
public visitSimplePropertyAssignment(node: SimplePropertyAssignmentSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.appendToken(node.colonToken);
|
||||
this.ensureSpace();
|
||||
visitNodeOrToken(this, node.expression);
|
||||
}
|
||||
|
||||
public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): void {
|
||||
this.appendToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
this.ensureSpace();
|
||||
visitNodeOrToken(this, node.block);
|
||||
|
||||
@ -219,7 +219,7 @@ module TypeScript.Scanner {
|
||||
}
|
||||
|
||||
class FixedWidthTokenWithNoTrivia implements ISyntaxToken {
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any;
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any; public _propertyAssignmentBrand: any; public _propertyNameBrand: any;
|
||||
public parent: ISyntaxElement;
|
||||
public childCount: number;
|
||||
|
||||
@ -254,7 +254,7 @@ module TypeScript.Scanner {
|
||||
FixedWidthTokenWithNoTrivia.prototype.childCount = 0;
|
||||
|
||||
class LargeScannerToken implements ISyntaxToken {
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any;
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any; public _propertyAssignmentBrand: any; public _propertyNameBrand: any;
|
||||
public parent: ISyntaxElement;
|
||||
public childCount: number;
|
||||
|
||||
|
||||
@ -450,7 +450,7 @@ module TypeScript {
|
||||
_memberDeclarationBrand: any;
|
||||
}
|
||||
|
||||
export interface IPropertyAssignmentSyntax extends ISyntaxNode {
|
||||
export interface IPropertyAssignmentSyntax extends ISyntaxNodeOrToken {
|
||||
_propertyAssignmentBrand: any;
|
||||
}
|
||||
|
||||
@ -458,7 +458,7 @@ module TypeScript {
|
||||
_accessorBrand: any;
|
||||
|
||||
modifiers: ISyntaxToken[];
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
callSignature: CallSignatureSyntax;
|
||||
block: BlockSyntax;
|
||||
}
|
||||
@ -504,4 +504,8 @@ module TypeScript {
|
||||
export interface INameSyntax extends ITypeSyntax {
|
||||
_nameBrand: any;
|
||||
}
|
||||
|
||||
export interface IPropertyNameSyntax extends ISyntaxNodeOrToken {
|
||||
_propertyNameBrand: any;
|
||||
}
|
||||
}
|
||||
@ -187,7 +187,7 @@ var definitions:ITypeDefinition[] = [
|
||||
name: 'VariableDeclaratorSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true, isTypeScriptSpecific: true },
|
||||
<any>{ name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true }
|
||||
]
|
||||
@ -525,7 +525,7 @@ var definitions:ITypeDefinition[] = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['ITypeMemberSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'questionToken', isToken: true, isOptional: true, itTypeScriptSpecific: true },
|
||||
<any>{ name: 'callSignature', type: 'CallSignatureSyntax' }
|
||||
]
|
||||
@ -547,7 +547,7 @@ var definitions:ITypeDefinition[] = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['ITypeMemberSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'questionToken', isToken: true, isOptional: true },
|
||||
<any>{ name: 'typeAnnotation', type: 'TypeAnnotationSyntax', isOptional: true }
|
||||
],
|
||||
@ -650,7 +650,7 @@ var definitions:ITypeDefinition[] = [
|
||||
interfaces: ['IMemberDeclarationSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken' },
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
<any>{ name: 'block', type: 'BlockSyntax', isOptional: true },
|
||||
<any>{ name: 'semicolonToken', isToken: true, isOptional: true, excludeFromAST: true }
|
||||
@ -664,7 +664,7 @@ var definitions:ITypeDefinition[] = [
|
||||
children: [
|
||||
<any>{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true },
|
||||
<any>{ name: 'getKeyword', isToken: true, excludeFromAST: true },
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
<any>{ name: 'block', type: 'BlockSyntax' }
|
||||
]
|
||||
@ -676,7 +676,7 @@ var definitions:ITypeDefinition[] = [
|
||||
children: [
|
||||
<any>{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true },
|
||||
<any>{ name: 'setKeyword', isToken: true, excludeFromAST: true },
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
<any>{ name: 'block', type: 'BlockSyntax' }
|
||||
],
|
||||
@ -863,7 +863,7 @@ var definitions:ITypeDefinition[] = [
|
||||
name: 'EnumElementSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'equalsValueClause', type: 'EqualsValueClauseSyntax', isOptional: true }
|
||||
]
|
||||
},
|
||||
@ -889,12 +889,22 @@ var definitions:ITypeDefinition[] = [
|
||||
<any>{ name: 'closeBraceToken', isToken: true, excludeFromAST: true }
|
||||
]
|
||||
},
|
||||
<any>{
|
||||
name: 'ComputedPropertyNameSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyNameSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'openBracketToken', isToken: true },
|
||||
<any>{ name: 'expression', type: 'IExpressionSyntax' },
|
||||
<any>{ name: 'closeBracketToken', isToken: true }
|
||||
]
|
||||
},
|
||||
<any>{
|
||||
name: 'SimplePropertyAssignmentSyntax',
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyAssignmentSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'colonToken', isToken: true, excludeFromAST: true },
|
||||
<any>{ name: 'expression', type: 'IExpressionSyntax' }
|
||||
]
|
||||
@ -904,7 +914,7 @@ var definitions:ITypeDefinition[] = [
|
||||
baseType: 'ISyntaxNode',
|
||||
interfaces: ['IPropertyAssignmentSyntax'],
|
||||
children: [
|
||||
<any>{ name: 'propertyName', isToken: true, tokenKinds: ['IdentifierName', 'StringLiteral', 'NumericLiteral'] },
|
||||
<any>{ name: 'propertyName', type: 'IPropertyNameSyntax' },
|
||||
<any>{ name: 'callSignature', type: 'CallSignatureSyntax' },
|
||||
<any>{ name: 'block', type: 'BlockSyntax' }
|
||||
]
|
||||
|
||||
@ -152,12 +152,12 @@ module TypeScript {
|
||||
|
||||
export interface MemberFunctionDeclarationSyntax extends ISyntaxNode, IMemberDeclarationSyntax {
|
||||
modifiers: ISyntaxToken[];
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
callSignature: CallSignatureSyntax;
|
||||
block: BlockSyntax;
|
||||
semicolonToken: ISyntaxToken;
|
||||
}
|
||||
export interface MemberFunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): MemberFunctionDeclarationSyntax }
|
||||
export interface MemberFunctionDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken): MemberFunctionDeclarationSyntax }
|
||||
|
||||
export interface MemberVariableDeclarationSyntax extends ISyntaxNode, IMemberDeclarationSyntax {
|
||||
modifiers: ISyntaxToken[];
|
||||
@ -185,27 +185,27 @@ module TypeScript {
|
||||
export interface GetAccessorSyntax extends ISyntaxNode, IAccessorSyntax {
|
||||
modifiers: ISyntaxToken[];
|
||||
getKeyword: ISyntaxToken;
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
callSignature: CallSignatureSyntax;
|
||||
block: BlockSyntax;
|
||||
}
|
||||
export interface GetAccessorConstructor { new (data: number, modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): GetAccessorSyntax }
|
||||
export interface GetAccessorConstructor { new (data: number, modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax): GetAccessorSyntax }
|
||||
|
||||
export interface SetAccessorSyntax extends ISyntaxNode, IAccessorSyntax {
|
||||
modifiers: ISyntaxToken[];
|
||||
setKeyword: ISyntaxToken;
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
callSignature: CallSignatureSyntax;
|
||||
block: BlockSyntax;
|
||||
}
|
||||
export interface SetAccessorConstructor { new (data: number, modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): SetAccessorSyntax }
|
||||
export interface SetAccessorConstructor { new (data: number, modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax): SetAccessorSyntax }
|
||||
|
||||
export interface PropertySignatureSyntax extends ISyntaxNode, ITypeMemberSyntax {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
questionToken: ISyntaxToken;
|
||||
typeAnnotation: TypeAnnotationSyntax;
|
||||
}
|
||||
export interface PropertySignatureConstructor { new (data: number, propertyName: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): PropertySignatureSyntax }
|
||||
export interface PropertySignatureConstructor { new (data: number, propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): PropertySignatureSyntax }
|
||||
|
||||
export interface CallSignatureSyntax extends ISyntaxNode, ITypeMemberSyntax {
|
||||
typeParameterList: TypeParameterListSyntax;
|
||||
@ -229,11 +229,11 @@ module TypeScript {
|
||||
export interface IndexSignatureConstructor { new (data: number, openBracketToken: ISyntaxToken, parameters: ISeparatedSyntaxList<ParameterSyntax>, closeBracketToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax): IndexSignatureSyntax }
|
||||
|
||||
export interface MethodSignatureSyntax extends ISyntaxNode, ITypeMemberSyntax {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
questionToken: ISyntaxToken;
|
||||
callSignature: CallSignatureSyntax;
|
||||
}
|
||||
export interface MethodSignatureConstructor { new (data: number, propertyName: ISyntaxToken, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax): MethodSignatureSyntax }
|
||||
export interface MethodSignatureConstructor { new (data: number, propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax): MethodSignatureSyntax }
|
||||
|
||||
export interface BlockSyntax extends ISyntaxNode, IStatementSyntax {
|
||||
openBraceToken: ISyntaxToken;
|
||||
@ -535,11 +535,11 @@ module TypeScript {
|
||||
export interface VariableDeclarationConstructor { new (data: number, varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList<VariableDeclaratorSyntax>): VariableDeclarationSyntax }
|
||||
|
||||
export interface VariableDeclaratorSyntax extends ISyntaxNode {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
typeAnnotation: TypeAnnotationSyntax;
|
||||
equalsValueClause: EqualsValueClauseSyntax;
|
||||
}
|
||||
export interface VariableDeclaratorConstructor { new (data: number, propertyName: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): VariableDeclaratorSyntax }
|
||||
export interface VariableDeclaratorConstructor { new (data: number, propertyName: IPropertyNameSyntax, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): VariableDeclaratorSyntax }
|
||||
|
||||
export interface ArgumentListSyntax extends ISyntaxNode {
|
||||
typeArgumentList: TypeArgumentListSyntax;
|
||||
@ -638,18 +638,18 @@ module TypeScript {
|
||||
export interface ConstraintConstructor { new (data: number, extendsKeyword: ISyntaxToken, typeOrExpression: ISyntaxNodeOrToken): ConstraintSyntax }
|
||||
|
||||
export interface SimplePropertyAssignmentSyntax extends ISyntaxNode, IPropertyAssignmentSyntax {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
colonToken: ISyntaxToken;
|
||||
expression: IExpressionSyntax;
|
||||
}
|
||||
export interface SimplePropertyAssignmentConstructor { new (data: number, propertyName: ISyntaxToken, colonToken: ISyntaxToken, expression: IExpressionSyntax): SimplePropertyAssignmentSyntax }
|
||||
export interface SimplePropertyAssignmentConstructor { new (data: number, propertyName: IPropertyNameSyntax, colonToken: ISyntaxToken, expression: IExpressionSyntax): SimplePropertyAssignmentSyntax }
|
||||
|
||||
export interface FunctionPropertyAssignmentSyntax extends ISyntaxNode, IPropertyAssignmentSyntax {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
callSignature: CallSignatureSyntax;
|
||||
block: BlockSyntax;
|
||||
}
|
||||
export interface FunctionPropertyAssignmentConstructor { new (data: number, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax }
|
||||
export interface FunctionPropertyAssignmentConstructor { new (data: number, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax): FunctionPropertyAssignmentSyntax }
|
||||
|
||||
export interface ParameterSyntax extends ISyntaxNode {
|
||||
dotDotDotToken: ISyntaxToken;
|
||||
@ -662,10 +662,10 @@ module TypeScript {
|
||||
export interface ParameterConstructor { new (data: number, dotDotDotToken: ISyntaxToken, modifiers: ISyntaxToken[], identifier: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax): ParameterSyntax }
|
||||
|
||||
export interface EnumElementSyntax extends ISyntaxNode {
|
||||
propertyName: ISyntaxToken;
|
||||
propertyName: IPropertyNameSyntax;
|
||||
equalsValueClause: EqualsValueClauseSyntax;
|
||||
}
|
||||
export interface EnumElementConstructor { new (data: number, propertyName: ISyntaxToken, equalsValueClause: EqualsValueClauseSyntax): EnumElementSyntax }
|
||||
export interface EnumElementConstructor { new (data: number, propertyName: IPropertyNameSyntax, equalsValueClause: EqualsValueClauseSyntax): EnumElementSyntax }
|
||||
|
||||
export interface TypeAnnotationSyntax extends ISyntaxNode {
|
||||
colonToken: ISyntaxToken;
|
||||
@ -673,6 +673,13 @@ module TypeScript {
|
||||
}
|
||||
export interface TypeAnnotationConstructor { new (data: number, colonToken: ISyntaxToken, type: ITypeSyntax): TypeAnnotationSyntax }
|
||||
|
||||
export interface ComputedPropertyNameSyntax extends ISyntaxNode, IPropertyNameSyntax {
|
||||
openBracketToken: ISyntaxToken;
|
||||
expression: IExpressionSyntax;
|
||||
closeBracketToken: ISyntaxToken;
|
||||
}
|
||||
export interface ComputedPropertyNameConstructor { new (data: number, openBracketToken: ISyntaxToken, expression: IExpressionSyntax, closeBracketToken: ISyntaxToken): ComputedPropertyNameSyntax }
|
||||
|
||||
export interface ExternalModuleReferenceSyntax extends ISyntaxNode, IModuleReferenceSyntax {
|
||||
requireKeyword: ISyntaxToken;
|
||||
openParenToken: ISyntaxToken;
|
||||
|
||||
@ -261,14 +261,13 @@ module TypeScript {
|
||||
|
||||
// Property Assignment
|
||||
SimplePropertyAssignment,
|
||||
// GetAccessorPropertyAssignment,
|
||||
// SetAccessorPropertyAssignment,
|
||||
FunctionPropertyAssignment,
|
||||
|
||||
// Misc.
|
||||
Parameter,
|
||||
EnumElement,
|
||||
TypeAnnotation,
|
||||
ComputedPropertyName,
|
||||
ExternalModuleReference,
|
||||
ModuleNameModuleReference,
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
///<reference path='references.ts' />
|
||||
|
||||
module TypeScript {
|
||||
export var SourceUnitSyntax: SourceUnitConstructor = <any>function (data: number, moduleElements: IModuleElementSyntax[], endOfFileToken: ISyntaxToken) {
|
||||
export var SourceUnitSyntax: SourceUnitConstructor = <any>function(data: number, moduleElements: IModuleElementSyntax[], endOfFileToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.moduleElements = moduleElements,
|
||||
this.endOfFileToken = endOfFileToken,
|
||||
@ -17,7 +17,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var QualifiedNameSyntax: QualifiedNameConstructor = <any>function (data: number, left: INameSyntax, dotToken: ISyntaxToken, right: ISyntaxToken) {
|
||||
export var QualifiedNameSyntax: QualifiedNameConstructor = <any>function(data: number, left: INameSyntax, dotToken: ISyntaxToken, right: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.left = left,
|
||||
this.dotToken = dotToken,
|
||||
@ -36,7 +36,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ObjectTypeSyntax: ObjectTypeConstructor = <any>function (data: number, openBraceToken: ISyntaxToken, typeMembers: ISeparatedSyntaxList<ITypeMemberSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
export var ObjectTypeSyntax: ObjectTypeConstructor = <any>function(data: number, openBraceToken: ISyntaxToken, typeMembers: ISeparatedSyntaxList<ITypeMemberSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBraceToken = openBraceToken,
|
||||
this.typeMembers = typeMembers,
|
||||
@ -55,7 +55,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var FunctionTypeSyntax: FunctionTypeConstructor = <any>function (data: number, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
export var FunctionTypeSyntax: FunctionTypeConstructor = <any>function(data: number, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.typeParameterList = typeParameterList,
|
||||
this.parameterList = parameterList,
|
||||
@ -77,7 +77,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ArrayTypeSyntax: ArrayTypeConstructor = <any>function (data: number, type: ITypeSyntax, openBracketToken: ISyntaxToken, closeBracketToken: ISyntaxToken) {
|
||||
export var ArrayTypeSyntax: ArrayTypeConstructor = <any>function(data: number, type: ITypeSyntax, openBracketToken: ISyntaxToken, closeBracketToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.type = type,
|
||||
this.openBracketToken = openBracketToken,
|
||||
@ -96,7 +96,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ConstructorTypeSyntax: ConstructorTypeConstructor = <any>function (data: number, newKeyword: ISyntaxToken, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
export var ConstructorTypeSyntax: ConstructorTypeConstructor = <any>function(data: number, newKeyword: ISyntaxToken, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, equalsGreaterThanToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.newKeyword = newKeyword,
|
||||
this.typeParameterList = typeParameterList,
|
||||
@ -121,7 +121,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var GenericTypeSyntax: GenericTypeConstructor = <any>function (data: number, name: INameSyntax, typeArgumentList: TypeArgumentListSyntax) {
|
||||
export var GenericTypeSyntax: GenericTypeConstructor = <any>function(data: number, name: INameSyntax, typeArgumentList: TypeArgumentListSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.name = name,
|
||||
this.typeArgumentList = typeArgumentList,
|
||||
@ -137,7 +137,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeQuerySyntax: TypeQueryConstructor = <any>function (data: number, typeOfKeyword: ISyntaxToken, name: INameSyntax) {
|
||||
export var TypeQuerySyntax: TypeQueryConstructor = <any>function(data: number, typeOfKeyword: ISyntaxToken, name: INameSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.typeOfKeyword = typeOfKeyword,
|
||||
this.name = name,
|
||||
@ -153,7 +153,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TupleTypeSyntax: TupleTypeConstructor = <any>function (data: number, openBracketToken: ISyntaxToken, types: ISeparatedSyntaxList<ITypeSyntax>, closeBracketToken: ISyntaxToken) {
|
||||
export var TupleTypeSyntax: TupleTypeConstructor = <any>function(data: number, openBracketToken: ISyntaxToken, types: ISeparatedSyntaxList<ITypeSyntax>, closeBracketToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBracketToken = openBracketToken,
|
||||
this.types = types,
|
||||
@ -172,7 +172,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var UnionTypeSyntax: UnionTypeConstructor = <any>function (data: number, left: ITypeSyntax, barToken: ISyntaxToken, right: ITypeSyntax) {
|
||||
export var UnionTypeSyntax: UnionTypeConstructor = <any>function(data: number, left: ITypeSyntax, barToken: ISyntaxToken, right: ITypeSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.left = left,
|
||||
this.barToken = barToken,
|
||||
@ -191,7 +191,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ParenthesizedTypeSyntax: ParenthesizedTypeConstructor = <any>function (data: number, openParenToken: ISyntaxToken, type: ITypeSyntax, closeParenToken: ISyntaxToken) {
|
||||
export var ParenthesizedTypeSyntax: ParenthesizedTypeConstructor = <any>function(data: number, openParenToken: ISyntaxToken, type: ITypeSyntax, closeParenToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openParenToken = openParenToken,
|
||||
this.type = type,
|
||||
@ -210,7 +210,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var InterfaceDeclarationSyntax: InterfaceDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], interfaceKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: HeritageClauseSyntax[], body: ObjectTypeSyntax) {
|
||||
export var InterfaceDeclarationSyntax: InterfaceDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], interfaceKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: HeritageClauseSyntax[], body: ObjectTypeSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.interfaceKeyword = interfaceKeyword,
|
||||
@ -238,7 +238,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var FunctionDeclarationSyntax: FunctionDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var FunctionDeclarationSyntax: FunctionDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.functionKeyword = functionKeyword,
|
||||
@ -266,7 +266,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ModuleDeclarationSyntax: ModuleDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], moduleKeyword: ISyntaxToken, name: INameSyntax, stringLiteral: ISyntaxToken, openBraceToken: ISyntaxToken, moduleElements: IModuleElementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
export var ModuleDeclarationSyntax: ModuleDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], moduleKeyword: ISyntaxToken, name: INameSyntax, stringLiteral: ISyntaxToken, openBraceToken: ISyntaxToken, moduleElements: IModuleElementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.moduleKeyword = moduleKeyword,
|
||||
@ -297,7 +297,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ClassDeclarationSyntax: ClassDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], classKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: HeritageClauseSyntax[], openBraceToken: ISyntaxToken, classElements: IClassElementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
export var ClassDeclarationSyntax: ClassDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], classKeyword: ISyntaxToken, identifier: ISyntaxToken, typeParameterList: TypeParameterListSyntax, heritageClauses: HeritageClauseSyntax[], openBraceToken: ISyntaxToken, classElements: IClassElementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.classKeyword = classKeyword,
|
||||
@ -331,7 +331,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var EnumDeclarationSyntax: EnumDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], enumKeyword: ISyntaxToken, identifier: ISyntaxToken, openBraceToken: ISyntaxToken, enumElements: ISeparatedSyntaxList<EnumElementSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
export var EnumDeclarationSyntax: EnumDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], enumKeyword: ISyntaxToken, identifier: ISyntaxToken, openBraceToken: ISyntaxToken, enumElements: ISeparatedSyntaxList<EnumElementSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.enumKeyword = enumKeyword,
|
||||
@ -359,7 +359,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ImportDeclarationSyntax: ImportDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], importKeyword: ISyntaxToken, identifier: ISyntaxToken, equalsToken: ISyntaxToken, moduleReference: IModuleReferenceSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var ImportDeclarationSyntax: ImportDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], importKeyword: ISyntaxToken, identifier: ISyntaxToken, equalsToken: ISyntaxToken, moduleReference: IModuleReferenceSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.importKeyword = importKeyword,
|
||||
@ -387,7 +387,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ExportAssignmentSyntax: ExportAssignmentConstructor = <any>function (data: number, exportKeyword: ISyntaxToken, equalsToken: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
export var ExportAssignmentSyntax: ExportAssignmentConstructor = <any>function(data: number, exportKeyword: ISyntaxToken, equalsToken: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.exportKeyword = exportKeyword,
|
||||
this.equalsToken = equalsToken,
|
||||
@ -409,7 +409,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var MemberFunctionDeclarationSyntax: MemberFunctionDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var MemberFunctionDeclarationSyntax: MemberFunctionDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.propertyName = propertyName,
|
||||
@ -434,7 +434,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var MemberVariableDeclarationSyntax: MemberVariableDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], variableDeclarator: VariableDeclaratorSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var MemberVariableDeclarationSyntax: MemberVariableDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], variableDeclarator: VariableDeclaratorSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.variableDeclarator = variableDeclarator,
|
||||
@ -453,7 +453,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ConstructorDeclarationSyntax: ConstructorDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], constructorKeyword: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var ConstructorDeclarationSyntax: ConstructorDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], constructorKeyword: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.constructorKeyword = constructorKeyword,
|
||||
@ -478,7 +478,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var IndexMemberDeclarationSyntax: IndexMemberDeclarationConstructor = <any>function (data: number, modifiers: ISyntaxToken[], indexSignature: IndexSignatureSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var IndexMemberDeclarationSyntax: IndexMemberDeclarationConstructor = <any>function(data: number, modifiers: ISyntaxToken[], indexSignature: IndexSignatureSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.indexSignature = indexSignature,
|
||||
@ -497,7 +497,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var GetAccessorSyntax: GetAccessorConstructor = <any>function (data: number, modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
export var GetAccessorSyntax: GetAccessorConstructor = <any>function(data: number, modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.getKeyword = getKeyword,
|
||||
@ -522,7 +522,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var SetAccessorSyntax: SetAccessorConstructor = <any>function (data: number, modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
export var SetAccessorSyntax: SetAccessorConstructor = <any>function(data: number, modifiers: ISyntaxToken[], setKeyword: ISyntaxToken, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.setKeyword = setKeyword,
|
||||
@ -547,7 +547,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var PropertySignatureSyntax: PropertySignatureConstructor = <any>function (data: number, propertyName: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax) {
|
||||
export var PropertySignatureSyntax: PropertySignatureConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.questionToken = questionToken,
|
||||
@ -566,7 +566,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var CallSignatureSyntax: CallSignatureConstructor = <any>function (data: number, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax) {
|
||||
export var CallSignatureSyntax: CallSignatureConstructor = <any>function(data: number, typeParameterList: TypeParameterListSyntax, parameterList: ParameterListSyntax, typeAnnotation: TypeAnnotationSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.typeParameterList = typeParameterList,
|
||||
this.parameterList = parameterList,
|
||||
@ -585,7 +585,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ConstructSignatureSyntax: ConstructSignatureConstructor = <any>function (data: number, newKeyword: ISyntaxToken, callSignature: CallSignatureSyntax) {
|
||||
export var ConstructSignatureSyntax: ConstructSignatureConstructor = <any>function(data: number, newKeyword: ISyntaxToken, callSignature: CallSignatureSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.newKeyword = newKeyword,
|
||||
this.callSignature = callSignature,
|
||||
@ -601,7 +601,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var IndexSignatureSyntax: IndexSignatureConstructor = <any>function (data: number, openBracketToken: ISyntaxToken, parameters: ISeparatedSyntaxList<ParameterSyntax>, closeBracketToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax) {
|
||||
export var IndexSignatureSyntax: IndexSignatureConstructor = <any>function(data: number, openBracketToken: ISyntaxToken, parameters: ISeparatedSyntaxList<ParameterSyntax>, closeBracketToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBracketToken = openBracketToken,
|
||||
this.parameters = parameters,
|
||||
@ -623,7 +623,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var MethodSignatureSyntax: MethodSignatureConstructor = <any>function (data: number, propertyName: ISyntaxToken, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax) {
|
||||
export var MethodSignatureSyntax: MethodSignatureConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, questionToken: ISyntaxToken, callSignature: CallSignatureSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.questionToken = questionToken,
|
||||
@ -642,7 +642,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var BlockSyntax: BlockConstructor = <any>function (data: number, openBraceToken: ISyntaxToken, statements: IStatementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
export var BlockSyntax: BlockConstructor = <any>function(data: number, openBraceToken: ISyntaxToken, statements: IStatementSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBraceToken = openBraceToken,
|
||||
this.statements = statements,
|
||||
@ -661,7 +661,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var IfStatementSyntax: IfStatementConstructor = <any>function (data: number, ifKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, elseClause: ElseClauseSyntax) {
|
||||
export var IfStatementSyntax: IfStatementConstructor = <any>function(data: number, ifKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax, elseClause: ElseClauseSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.ifKeyword = ifKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@ -689,7 +689,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var VariableStatementSyntax: VariableStatementConstructor = <any>function (data: number, modifiers: ISyntaxToken[], variableDeclaration: VariableDeclarationSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var VariableStatementSyntax: VariableStatementConstructor = <any>function(data: number, modifiers: ISyntaxToken[], variableDeclaration: VariableDeclarationSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.modifiers = modifiers,
|
||||
this.variableDeclaration = variableDeclaration,
|
||||
@ -708,7 +708,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ExpressionStatementSyntax: ExpressionStatementConstructor = <any>function (data: number, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var ExpressionStatementSyntax: ExpressionStatementConstructor = <any>function(data: number, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.semicolonToken = semicolonToken,
|
||||
@ -724,7 +724,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ReturnStatementSyntax: ReturnStatementConstructor = <any>function (data: number, returnKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var ReturnStatementSyntax: ReturnStatementConstructor = <any>function(data: number, returnKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.returnKeyword = returnKeyword,
|
||||
this.expression = expression,
|
||||
@ -743,7 +743,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var SwitchStatementSyntax: SwitchStatementConstructor = <any>function (data: number, switchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, openBraceToken: ISyntaxToken, switchClauses: ISwitchClauseSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
export var SwitchStatementSyntax: SwitchStatementConstructor = <any>function(data: number, switchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, openBraceToken: ISyntaxToken, switchClauses: ISwitchClauseSyntax[], closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.switchKeyword = switchKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@ -774,7 +774,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var BreakStatementSyntax: BreakStatementConstructor = <any>function (data: number, breakKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
export var BreakStatementSyntax: BreakStatementConstructor = <any>function(data: number, breakKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.breakKeyword = breakKeyword,
|
||||
this.identifier = identifier,
|
||||
@ -793,7 +793,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ContinueStatementSyntax: ContinueStatementConstructor = <any>function (data: number, continueKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
export var ContinueStatementSyntax: ContinueStatementConstructor = <any>function(data: number, continueKeyword: ISyntaxToken, identifier: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.continueKeyword = continueKeyword,
|
||||
this.identifier = identifier,
|
||||
@ -812,7 +812,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ForStatementSyntax: ForStatementConstructor = <any>function (data: number, forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, initializer: IExpressionSyntax, firstSemicolonToken: ISyntaxToken, condition: IExpressionSyntax, secondSemicolonToken: ISyntaxToken, incrementor: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var ForStatementSyntax: ForStatementConstructor = <any>function(data: number, forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, initializer: IExpressionSyntax, firstSemicolonToken: ISyntaxToken, condition: IExpressionSyntax, secondSemicolonToken: ISyntaxToken, incrementor: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.forKeyword = forKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@ -852,7 +852,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ForInStatementSyntax: ForInStatementConstructor = <any>function (data: number, forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, left: IExpressionSyntax, inKeyword: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var ForInStatementSyntax: ForInStatementConstructor = <any>function(data: number, forKeyword: ISyntaxToken, openParenToken: ISyntaxToken, variableDeclaration: VariableDeclarationSyntax, left: IExpressionSyntax, inKeyword: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.forKeyword = forKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@ -886,7 +886,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var EmptyStatementSyntax: EmptyStatementConstructor = <any>function (data: number, semicolonToken: ISyntaxToken) {
|
||||
export var EmptyStatementSyntax: EmptyStatementConstructor = <any>function(data: number, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.semicolonToken = semicolonToken,
|
||||
semicolonToken.parent = this;
|
||||
@ -899,7 +899,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ThrowStatementSyntax: ThrowStatementConstructor = <any>function (data: number, throwKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
export var ThrowStatementSyntax: ThrowStatementConstructor = <any>function(data: number, throwKeyword: ISyntaxToken, expression: IExpressionSyntax, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.throwKeyword = throwKeyword,
|
||||
this.expression = expression,
|
||||
@ -918,7 +918,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var WhileStatementSyntax: WhileStatementConstructor = <any>function (data: number, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var WhileStatementSyntax: WhileStatementConstructor = <any>function(data: number, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.whileKeyword = whileKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@ -943,7 +943,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TryStatementSyntax: TryStatementConstructor = <any>function (data: number, tryKeyword: ISyntaxToken, block: BlockSyntax, catchClause: CatchClauseSyntax, finallyClause: FinallyClauseSyntax) {
|
||||
export var TryStatementSyntax: TryStatementConstructor = <any>function(data: number, tryKeyword: ISyntaxToken, block: BlockSyntax, catchClause: CatchClauseSyntax, finallyClause: FinallyClauseSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.tryKeyword = tryKeyword,
|
||||
this.block = block,
|
||||
@ -965,7 +965,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var LabeledStatementSyntax: LabeledStatementConstructor = <any>function (data: number, identifier: ISyntaxToken, colonToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var LabeledStatementSyntax: LabeledStatementConstructor = <any>function(data: number, identifier: ISyntaxToken, colonToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.identifier = identifier,
|
||||
this.colonToken = colonToken,
|
||||
@ -984,7 +984,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var DoStatementSyntax: DoStatementConstructor = <any>function (data: number, doKeyword: ISyntaxToken, statement: IStatementSyntax, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
export var DoStatementSyntax: DoStatementConstructor = <any>function(data: number, doKeyword: ISyntaxToken, statement: IStatementSyntax, whileKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.doKeyword = doKeyword,
|
||||
this.statement = statement,
|
||||
@ -1015,7 +1015,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var DebuggerStatementSyntax: DebuggerStatementConstructor = <any>function (data: number, debuggerKeyword: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
export var DebuggerStatementSyntax: DebuggerStatementConstructor = <any>function(data: number, debuggerKeyword: ISyntaxToken, semicolonToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.debuggerKeyword = debuggerKeyword,
|
||||
this.semicolonToken = semicolonToken,
|
||||
@ -1031,7 +1031,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var WithStatementSyntax: WithStatementConstructor = <any>function (data: number, withKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var WithStatementSyntax: WithStatementConstructor = <any>function(data: number, withKeyword: ISyntaxToken, openParenToken: ISyntaxToken, condition: IExpressionSyntax, closeParenToken: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.withKeyword = withKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@ -1056,7 +1056,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var PrefixUnaryExpressionSyntax: PrefixUnaryExpressionConstructor = <any>function (data: number, operatorToken: ISyntaxToken, operand: IUnaryExpressionSyntax) {
|
||||
export var PrefixUnaryExpressionSyntax: PrefixUnaryExpressionConstructor = <any>function(data: number, operatorToken: ISyntaxToken, operand: IUnaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.operatorToken = operatorToken,
|
||||
this.operand = operand,
|
||||
@ -1072,7 +1072,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var DeleteExpressionSyntax: DeleteExpressionConstructor = <any>function (data: number, deleteKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
export var DeleteExpressionSyntax: DeleteExpressionConstructor = <any>function(data: number, deleteKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.deleteKeyword = deleteKeyword,
|
||||
this.expression = expression,
|
||||
@ -1088,7 +1088,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeOfExpressionSyntax: TypeOfExpressionConstructor = <any>function (data: number, typeOfKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
export var TypeOfExpressionSyntax: TypeOfExpressionConstructor = <any>function(data: number, typeOfKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.typeOfKeyword = typeOfKeyword,
|
||||
this.expression = expression,
|
||||
@ -1104,7 +1104,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var VoidExpressionSyntax: VoidExpressionConstructor = <any>function (data: number, voidKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
export var VoidExpressionSyntax: VoidExpressionConstructor = <any>function(data: number, voidKeyword: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.voidKeyword = voidKeyword,
|
||||
this.expression = expression,
|
||||
@ -1120,7 +1120,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ConditionalExpressionSyntax: ConditionalExpressionConstructor = <any>function (data: number, condition: IExpressionSyntax, questionToken: ISyntaxToken, whenTrue: IExpressionSyntax, colonToken: ISyntaxToken, whenFalse: IExpressionSyntax) {
|
||||
export var ConditionalExpressionSyntax: ConditionalExpressionConstructor = <any>function(data: number, condition: IExpressionSyntax, questionToken: ISyntaxToken, whenTrue: IExpressionSyntax, colonToken: ISyntaxToken, whenFalse: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.condition = condition,
|
||||
this.questionToken = questionToken,
|
||||
@ -1145,7 +1145,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var BinaryExpressionSyntax: BinaryExpressionConstructor = <any>function (data: number, left: IExpressionSyntax, operatorToken: ISyntaxToken, right: IExpressionSyntax) {
|
||||
export var BinaryExpressionSyntax: BinaryExpressionConstructor = <any>function(data: number, left: IExpressionSyntax, operatorToken: ISyntaxToken, right: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.left = left,
|
||||
this.operatorToken = operatorToken,
|
||||
@ -1164,7 +1164,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var PostfixUnaryExpressionSyntax: PostfixUnaryExpressionConstructor = <any>function (data: number, operand: ILeftHandSideExpressionSyntax, operatorToken: ISyntaxToken) {
|
||||
export var PostfixUnaryExpressionSyntax: PostfixUnaryExpressionConstructor = <any>function(data: number, operand: ILeftHandSideExpressionSyntax, operatorToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.operand = operand,
|
||||
this.operatorToken = operatorToken,
|
||||
@ -1180,7 +1180,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var MemberAccessExpressionSyntax: MemberAccessExpressionConstructor = <any>function (data: number, expression: ILeftHandSideExpressionSyntax, dotToken: ISyntaxToken, name: ISyntaxToken) {
|
||||
export var MemberAccessExpressionSyntax: MemberAccessExpressionConstructor = <any>function(data: number, expression: ILeftHandSideExpressionSyntax, dotToken: ISyntaxToken, name: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.dotToken = dotToken,
|
||||
@ -1199,7 +1199,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var InvocationExpressionSyntax: InvocationExpressionConstructor = <any>function (data: number, expression: ILeftHandSideExpressionSyntax, argumentList: ArgumentListSyntax) {
|
||||
export var InvocationExpressionSyntax: InvocationExpressionConstructor = <any>function(data: number, expression: ILeftHandSideExpressionSyntax, argumentList: ArgumentListSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.argumentList = argumentList,
|
||||
@ -1215,7 +1215,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ArrayLiteralExpressionSyntax: ArrayLiteralExpressionConstructor = <any>function (data: number, openBracketToken: ISyntaxToken, expressions: ISeparatedSyntaxList<IExpressionSyntax>, closeBracketToken: ISyntaxToken) {
|
||||
export var ArrayLiteralExpressionSyntax: ArrayLiteralExpressionConstructor = <any>function(data: number, openBracketToken: ISyntaxToken, expressions: ISeparatedSyntaxList<IExpressionSyntax>, closeBracketToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBracketToken = openBracketToken,
|
||||
this.expressions = expressions,
|
||||
@ -1234,7 +1234,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ObjectLiteralExpressionSyntax: ObjectLiteralExpressionConstructor = <any>function (data: number, openBraceToken: ISyntaxToken, propertyAssignments: ISeparatedSyntaxList<IPropertyAssignmentSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
export var ObjectLiteralExpressionSyntax: ObjectLiteralExpressionConstructor = <any>function(data: number, openBraceToken: ISyntaxToken, propertyAssignments: ISeparatedSyntaxList<IPropertyAssignmentSyntax>, closeBraceToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBraceToken = openBraceToken,
|
||||
this.propertyAssignments = propertyAssignments,
|
||||
@ -1253,7 +1253,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ObjectCreationExpressionSyntax: ObjectCreationExpressionConstructor = <any>function (data: number, newKeyword: ISyntaxToken, expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax) {
|
||||
export var ObjectCreationExpressionSyntax: ObjectCreationExpressionConstructor = <any>function(data: number, newKeyword: ISyntaxToken, expression: IMemberExpressionSyntax, argumentList: ArgumentListSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.newKeyword = newKeyword,
|
||||
this.expression = expression,
|
||||
@ -1272,7 +1272,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ParenthesizedExpressionSyntax: ParenthesizedExpressionConstructor = <any>function (data: number, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken) {
|
||||
export var ParenthesizedExpressionSyntax: ParenthesizedExpressionConstructor = <any>function(data: number, openParenToken: ISyntaxToken, expression: IExpressionSyntax, closeParenToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openParenToken = openParenToken,
|
||||
this.expression = expression,
|
||||
@ -1291,7 +1291,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ParenthesizedArrowFunctionExpressionSyntax: ParenthesizedArrowFunctionExpressionConstructor = <any>function (data: number, callSignature: CallSignatureSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax) {
|
||||
export var ParenthesizedArrowFunctionExpressionSyntax: ParenthesizedArrowFunctionExpressionConstructor = <any>function(data: number, callSignature: CallSignatureSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.callSignature = callSignature,
|
||||
this.equalsGreaterThanToken = equalsGreaterThanToken,
|
||||
@ -1313,7 +1313,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var SimpleArrowFunctionExpressionSyntax: SimpleArrowFunctionExpressionConstructor = <any>function (data: number, parameter: ParameterSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax) {
|
||||
export var SimpleArrowFunctionExpressionSyntax: SimpleArrowFunctionExpressionConstructor = <any>function(data: number, parameter: ParameterSyntax, equalsGreaterThanToken: ISyntaxToken, block: BlockSyntax, expression: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.parameter = parameter,
|
||||
this.equalsGreaterThanToken = equalsGreaterThanToken,
|
||||
@ -1335,7 +1335,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var CastExpressionSyntax: CastExpressionConstructor = <any>function (data: number, lessThanToken: ISyntaxToken, type: ITypeSyntax, greaterThanToken: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
export var CastExpressionSyntax: CastExpressionConstructor = <any>function(data: number, lessThanToken: ISyntaxToken, type: ITypeSyntax, greaterThanToken: ISyntaxToken, expression: IUnaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.lessThanToken = lessThanToken,
|
||||
this.type = type,
|
||||
@ -1357,7 +1357,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ElementAccessExpressionSyntax: ElementAccessExpressionConstructor = <any>function (data: number, expression: ILeftHandSideExpressionSyntax, openBracketToken: ISyntaxToken, argumentExpression: IExpressionSyntax, closeBracketToken: ISyntaxToken) {
|
||||
export var ElementAccessExpressionSyntax: ElementAccessExpressionConstructor = <any>function(data: number, expression: ILeftHandSideExpressionSyntax, openBracketToken: ISyntaxToken, argumentExpression: IExpressionSyntax, closeBracketToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.openBracketToken = openBracketToken,
|
||||
@ -1379,7 +1379,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var FunctionExpressionSyntax: FunctionExpressionConstructor = <any>function (data: number, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
export var FunctionExpressionSyntax: FunctionExpressionConstructor = <any>function(data: number, functionKeyword: ISyntaxToken, identifier: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.functionKeyword = functionKeyword,
|
||||
this.identifier = identifier,
|
||||
@ -1401,7 +1401,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var OmittedExpressionSyntax: OmittedExpressionConstructor = <any>function (data: number) {
|
||||
export var OmittedExpressionSyntax: OmittedExpressionConstructor = <any>function(data: number) {
|
||||
if (data) { this.__data = data; }
|
||||
};
|
||||
OmittedExpressionSyntax.prototype.kind = SyntaxKind.OmittedExpression;
|
||||
@ -1410,7 +1410,7 @@ module TypeScript {
|
||||
throw Errors.invalidOperation();
|
||||
}
|
||||
|
||||
export var TemplateExpressionSyntax: TemplateExpressionConstructor = <any>function (data: number, templateStartToken: ISyntaxToken, templateClauses: TemplateClauseSyntax[]) {
|
||||
export var TemplateExpressionSyntax: TemplateExpressionConstructor = <any>function(data: number, templateStartToken: ISyntaxToken, templateClauses: TemplateClauseSyntax[]) {
|
||||
if (data) { this.__data = data; }
|
||||
this.templateStartToken = templateStartToken,
|
||||
this.templateClauses = templateClauses,
|
||||
@ -1426,7 +1426,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TemplateAccessExpressionSyntax: TemplateAccessExpressionConstructor = <any>function (data: number, expression: ILeftHandSideExpressionSyntax, templateExpression: IPrimaryExpressionSyntax) {
|
||||
export var TemplateAccessExpressionSyntax: TemplateAccessExpressionConstructor = <any>function(data: number, expression: ILeftHandSideExpressionSyntax, templateExpression: IPrimaryExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.templateExpression = templateExpression,
|
||||
@ -1442,7 +1442,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var VariableDeclarationSyntax: VariableDeclarationConstructor = <any>function (data: number, varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList<VariableDeclaratorSyntax>) {
|
||||
export var VariableDeclarationSyntax: VariableDeclarationConstructor = <any>function(data: number, varKeyword: ISyntaxToken, variableDeclarators: ISeparatedSyntaxList<VariableDeclaratorSyntax>) {
|
||||
if (data) { this.__data = data; }
|
||||
this.varKeyword = varKeyword,
|
||||
this.variableDeclarators = variableDeclarators,
|
||||
@ -1458,7 +1458,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var VariableDeclaratorSyntax: VariableDeclaratorConstructor = <any>function (data: number, propertyName: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
export var VariableDeclaratorSyntax: VariableDeclaratorConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.typeAnnotation = typeAnnotation,
|
||||
@ -1477,7 +1477,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ArgumentListSyntax: ArgumentListConstructor = <any>function (data: number, typeArgumentList: TypeArgumentListSyntax, openParenToken: ISyntaxToken, _arguments: ISeparatedSyntaxList<IExpressionSyntax>, closeParenToken: ISyntaxToken) {
|
||||
export var ArgumentListSyntax: ArgumentListConstructor = <any>function(data: number, typeArgumentList: TypeArgumentListSyntax, openParenToken: ISyntaxToken, _arguments: ISeparatedSyntaxList<IExpressionSyntax>, closeParenToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.typeArgumentList = typeArgumentList,
|
||||
this.openParenToken = openParenToken,
|
||||
@ -1499,7 +1499,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ParameterListSyntax: ParameterListConstructor = <any>function (data: number, openParenToken: ISyntaxToken, parameters: ISeparatedSyntaxList<ParameterSyntax>, closeParenToken: ISyntaxToken) {
|
||||
export var ParameterListSyntax: ParameterListConstructor = <any>function(data: number, openParenToken: ISyntaxToken, parameters: ISeparatedSyntaxList<ParameterSyntax>, closeParenToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openParenToken = openParenToken,
|
||||
this.parameters = parameters,
|
||||
@ -1518,7 +1518,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeArgumentListSyntax: TypeArgumentListConstructor = <any>function (data: number, lessThanToken: ISyntaxToken, typeArguments: ISeparatedSyntaxList<ITypeSyntax>, greaterThanToken: ISyntaxToken) {
|
||||
export var TypeArgumentListSyntax: TypeArgumentListConstructor = <any>function(data: number, lessThanToken: ISyntaxToken, typeArguments: ISeparatedSyntaxList<ITypeSyntax>, greaterThanToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.lessThanToken = lessThanToken,
|
||||
this.typeArguments = typeArguments,
|
||||
@ -1537,7 +1537,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeParameterListSyntax: TypeParameterListConstructor = <any>function (data: number, lessThanToken: ISyntaxToken, typeParameters: ISeparatedSyntaxList<TypeParameterSyntax>, greaterThanToken: ISyntaxToken) {
|
||||
export var TypeParameterListSyntax: TypeParameterListConstructor = <any>function(data: number, lessThanToken: ISyntaxToken, typeParameters: ISeparatedSyntaxList<TypeParameterSyntax>, greaterThanToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.lessThanToken = lessThanToken,
|
||||
this.typeParameters = typeParameters,
|
||||
@ -1556,7 +1556,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var HeritageClauseSyntax: HeritageClauseConstructor = <any>function (data: number, extendsOrImplementsKeyword: ISyntaxToken, typeNames: ISeparatedSyntaxList<INameSyntax>) {
|
||||
export var HeritageClauseSyntax: HeritageClauseConstructor = <any>function(data: number, extendsOrImplementsKeyword: ISyntaxToken, typeNames: ISeparatedSyntaxList<INameSyntax>) {
|
||||
if (data) { this.__data = data; }
|
||||
this.extendsOrImplementsKeyword = extendsOrImplementsKeyword,
|
||||
this.typeNames = typeNames,
|
||||
@ -1572,7 +1572,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var EqualsValueClauseSyntax: EqualsValueClauseConstructor = <any>function (data: number, equalsToken: ISyntaxToken, value: IExpressionSyntax) {
|
||||
export var EqualsValueClauseSyntax: EqualsValueClauseConstructor = <any>function(data: number, equalsToken: ISyntaxToken, value: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.equalsToken = equalsToken,
|
||||
this.value = value,
|
||||
@ -1588,7 +1588,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var CaseSwitchClauseSyntax: CaseSwitchClauseConstructor = <any>function (data: number, caseKeyword: ISyntaxToken, expression: IExpressionSyntax, colonToken: ISyntaxToken, statements: IStatementSyntax[]) {
|
||||
export var CaseSwitchClauseSyntax: CaseSwitchClauseConstructor = <any>function(data: number, caseKeyword: ISyntaxToken, expression: IExpressionSyntax, colonToken: ISyntaxToken, statements: IStatementSyntax[]) {
|
||||
if (data) { this.__data = data; }
|
||||
this.caseKeyword = caseKeyword,
|
||||
this.expression = expression,
|
||||
@ -1610,7 +1610,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var DefaultSwitchClauseSyntax: DefaultSwitchClauseConstructor = <any>function (data: number, defaultKeyword: ISyntaxToken, colonToken: ISyntaxToken, statements: IStatementSyntax[]) {
|
||||
export var DefaultSwitchClauseSyntax: DefaultSwitchClauseConstructor = <any>function(data: number, defaultKeyword: ISyntaxToken, colonToken: ISyntaxToken, statements: IStatementSyntax[]) {
|
||||
if (data) { this.__data = data; }
|
||||
this.defaultKeyword = defaultKeyword,
|
||||
this.colonToken = colonToken,
|
||||
@ -1629,7 +1629,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ElseClauseSyntax: ElseClauseConstructor = <any>function (data: number, elseKeyword: ISyntaxToken, statement: IStatementSyntax) {
|
||||
export var ElseClauseSyntax: ElseClauseConstructor = <any>function(data: number, elseKeyword: ISyntaxToken, statement: IStatementSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.elseKeyword = elseKeyword,
|
||||
this.statement = statement,
|
||||
@ -1645,7 +1645,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var CatchClauseSyntax: CatchClauseConstructor = <any>function (data: number, catchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, identifier: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, closeParenToken: ISyntaxToken, block: BlockSyntax) {
|
||||
export var CatchClauseSyntax: CatchClauseConstructor = <any>function(data: number, catchKeyword: ISyntaxToken, openParenToken: ISyntaxToken, identifier: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, closeParenToken: ISyntaxToken, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.catchKeyword = catchKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@ -1673,7 +1673,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var FinallyClauseSyntax: FinallyClauseConstructor = <any>function (data: number, finallyKeyword: ISyntaxToken, block: BlockSyntax) {
|
||||
export var FinallyClauseSyntax: FinallyClauseConstructor = <any>function(data: number, finallyKeyword: ISyntaxToken, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.finallyKeyword = finallyKeyword,
|
||||
this.block = block,
|
||||
@ -1689,7 +1689,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TemplateClauseSyntax: TemplateClauseConstructor = <any>function (data: number, expression: IExpressionSyntax, templateMiddleOrEndToken: ISyntaxToken) {
|
||||
export var TemplateClauseSyntax: TemplateClauseConstructor = <any>function(data: number, expression: IExpressionSyntax, templateMiddleOrEndToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.expression = expression,
|
||||
this.templateMiddleOrEndToken = templateMiddleOrEndToken,
|
||||
@ -1705,7 +1705,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeParameterSyntax: TypeParameterConstructor = <any>function (data: number, identifier: ISyntaxToken, constraint: ConstraintSyntax) {
|
||||
export var TypeParameterSyntax: TypeParameterConstructor = <any>function(data: number, identifier: ISyntaxToken, constraint: ConstraintSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.identifier = identifier,
|
||||
this.constraint = constraint,
|
||||
@ -1721,7 +1721,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ConstraintSyntax: ConstraintConstructor = <any>function (data: number, extendsKeyword: ISyntaxToken, typeOrExpression: ISyntaxNodeOrToken) {
|
||||
export var ConstraintSyntax: ConstraintConstructor = <any>function(data: number, extendsKeyword: ISyntaxToken, typeOrExpression: ISyntaxNodeOrToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.extendsKeyword = extendsKeyword,
|
||||
this.typeOrExpression = typeOrExpression,
|
||||
@ -1737,7 +1737,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var SimplePropertyAssignmentSyntax: SimplePropertyAssignmentConstructor = <any>function (data: number, propertyName: ISyntaxToken, colonToken: ISyntaxToken, expression: IExpressionSyntax) {
|
||||
export var SimplePropertyAssignmentSyntax: SimplePropertyAssignmentConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, colonToken: ISyntaxToken, expression: IExpressionSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.colonToken = colonToken,
|
||||
@ -1756,7 +1756,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var FunctionPropertyAssignmentSyntax: FunctionPropertyAssignmentConstructor = <any>function (data: number, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
export var FunctionPropertyAssignmentSyntax: FunctionPropertyAssignmentConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, callSignature: CallSignatureSyntax, block: BlockSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.callSignature = callSignature,
|
||||
@ -1775,7 +1775,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ParameterSyntax: ParameterConstructor = <any>function (data: number, dotDotDotToken: ISyntaxToken, modifiers: ISyntaxToken[], identifier: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
export var ParameterSyntax: ParameterConstructor = <any>function(data: number, dotDotDotToken: ISyntaxToken, modifiers: ISyntaxToken[], identifier: ISyntaxToken, questionToken: ISyntaxToken, typeAnnotation: TypeAnnotationSyntax, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.dotDotDotToken = dotDotDotToken,
|
||||
this.modifiers = modifiers,
|
||||
@ -1803,7 +1803,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var EnumElementSyntax: EnumElementConstructor = <any>function (data: number, propertyName: ISyntaxToken, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
export var EnumElementSyntax: EnumElementConstructor = <any>function(data: number, propertyName: IPropertyNameSyntax, equalsValueClause: EqualsValueClauseSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.propertyName = propertyName,
|
||||
this.equalsValueClause = equalsValueClause,
|
||||
@ -1819,7 +1819,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var TypeAnnotationSyntax: TypeAnnotationConstructor = <any>function (data: number, colonToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
export var TypeAnnotationSyntax: TypeAnnotationConstructor = <any>function(data: number, colonToken: ISyntaxToken, type: ITypeSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.colonToken = colonToken,
|
||||
this.type = type,
|
||||
@ -1835,7 +1835,26 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ExternalModuleReferenceSyntax: ExternalModuleReferenceConstructor = <any>function (data: number, requireKeyword: ISyntaxToken, openParenToken: ISyntaxToken, stringLiteral: ISyntaxToken, closeParenToken: ISyntaxToken) {
|
||||
export var ComputedPropertyNameSyntax: ComputedPropertyNameConstructor = <any>function(data: number, openBracketToken: ISyntaxToken, expression: IExpressionSyntax, closeBracketToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.openBracketToken = openBracketToken,
|
||||
this.expression = expression,
|
||||
this.closeBracketToken = closeBracketToken,
|
||||
openBracketToken.parent = this,
|
||||
expression.parent = this,
|
||||
closeBracketToken.parent = this;
|
||||
};
|
||||
ComputedPropertyNameSyntax.prototype.kind = SyntaxKind.ComputedPropertyName;
|
||||
ComputedPropertyNameSyntax.prototype.childCount = 3;
|
||||
ComputedPropertyNameSyntax.prototype.childAt = function(index: number): ISyntaxElement {
|
||||
switch (index) {
|
||||
case 0: return this.openBracketToken;
|
||||
case 1: return this.expression;
|
||||
case 2: return this.closeBracketToken;
|
||||
}
|
||||
}
|
||||
|
||||
export var ExternalModuleReferenceSyntax: ExternalModuleReferenceConstructor = <any>function(data: number, requireKeyword: ISyntaxToken, openParenToken: ISyntaxToken, stringLiteral: ISyntaxToken, closeParenToken: ISyntaxToken) {
|
||||
if (data) { this.__data = data; }
|
||||
this.requireKeyword = requireKeyword,
|
||||
this.openParenToken = openParenToken,
|
||||
@ -1857,7 +1876,7 @@ module TypeScript {
|
||||
}
|
||||
}
|
||||
|
||||
export var ModuleNameModuleReferenceSyntax: ModuleNameModuleReferenceConstructor = <any>function (data: number, moduleName: INameSyntax) {
|
||||
export var ModuleNameModuleReferenceSyntax: ModuleNameModuleReferenceConstructor = <any>function(data: number, moduleName: INameSyntax) {
|
||||
if (data) { this.__data = data; }
|
||||
this.moduleName = moduleName,
|
||||
moduleName.parent = this;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
///<reference path='references.ts' />
|
||||
|
||||
module TypeScript {
|
||||
export interface ISyntaxToken extends ISyntaxNodeOrToken, INameSyntax, IPrimaryExpressionSyntax {
|
||||
export interface ISyntaxToken extends ISyntaxNodeOrToken, INameSyntax, IPrimaryExpressionSyntax, IPropertyAssignmentSyntax, IPropertyNameSyntax {
|
||||
// Adjusts the full start of this token. Should only be called by the parser.
|
||||
setFullStart(fullStart: number): void;
|
||||
|
||||
@ -304,7 +304,8 @@ module TypeScript.Syntax {
|
||||
}
|
||||
|
||||
class EmptyToken implements ISyntaxToken {
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any;
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any; public _propertyAssignmentBrand: any; public _propertyNameBrand: any;
|
||||
|
||||
public parent: ISyntaxElement;
|
||||
public childCount: number;
|
||||
|
||||
@ -418,7 +419,7 @@ module TypeScript.Syntax {
|
||||
EmptyToken.prototype.childCount = 0;
|
||||
|
||||
class RealizedToken implements ISyntaxToken {
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any;
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any; public _propertyAssignmentBrand: any; public _propertyNameBrand: any;
|
||||
|
||||
private _fullStart: number;
|
||||
private _isKeywordConvertedToIdentifier: boolean;
|
||||
@ -430,11 +431,11 @@ module TypeScript.Syntax {
|
||||
public childCount: number;
|
||||
|
||||
constructor(fullStart: number,
|
||||
public kind: SyntaxKind,
|
||||
isKeywordConvertedToIdentifier: boolean,
|
||||
leadingTrivia: ISyntaxTriviaList,
|
||||
text: string,
|
||||
trailingTrivia: ISyntaxTriviaList) {
|
||||
public kind: SyntaxKind,
|
||||
isKeywordConvertedToIdentifier: boolean,
|
||||
leadingTrivia: ISyntaxTriviaList,
|
||||
text: string,
|
||||
trailingTrivia: ISyntaxTriviaList) {
|
||||
this._fullStart = fullStart;
|
||||
this._isKeywordConvertedToIdentifier = isKeywordConvertedToIdentifier;
|
||||
this._text = text;
|
||||
@ -491,7 +492,7 @@ module TypeScript.Syntax {
|
||||
RealizedToken.prototype.childCount = 0;
|
||||
|
||||
class ConvertedKeywordToken implements ISyntaxToken {
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any;
|
||||
public _primaryExpressionBrand: any; public _memberExpressionBrand: any; public _leftHandSideExpressionBrand: any; public _postfixExpressionBrand: any; public _unaryExpressionBrand: any; public _expressionBrand: any; public _typeBrand: any; public _nameBrand: any; public _propertyAssignmentBrand: any; public _propertyNameBrand: any;
|
||||
|
||||
public parent: ISyntaxElement;
|
||||
public kind: SyntaxKind;
|
||||
|
||||
@ -556,7 +556,8 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitMethodSignature(node: MethodSignatureSyntax): void {
|
||||
if (this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
if (this.checkForDisallowedTemplatePropertyName(node.propertyName) ||
|
||||
this.checkForDisallowedComputedPropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -564,7 +565,8 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitPropertySignature(node: PropertySignatureSyntax): void {
|
||||
if (this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
if (this.checkForDisallowedTemplatePropertyName(node.propertyName) ||
|
||||
this.checkForDisallowedComputedPropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -573,7 +575,7 @@ module TypeScript {
|
||||
|
||||
public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): void {
|
||||
if (this.checkClassElementModifiers(node.modifiers) ||
|
||||
this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -624,12 +626,12 @@ module TypeScript {
|
||||
|
||||
public visitGetAccessor(node: GetAccessorSyntax): void {
|
||||
if (this.checkForAccessorDeclarationInAmbientContext(node) ||
|
||||
this.checkEcmaScriptVersionIsAtLeast(node.propertyName, ts.ScriptTarget.ES5, DiagnosticCode.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher) ||
|
||||
this.checkEcmaScriptVersionIsAtLeast(node.getKeyword, ts.ScriptTarget.ES5, DiagnosticCode.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher) ||
|
||||
this.checkForDisallowedModifiers(node.modifiers) ||
|
||||
this.checkClassElementModifiers(node.modifiers) ||
|
||||
this.checkForDisallowedAccessorTypeParameters(node.callSignature) ||
|
||||
this.checkGetAccessorParameter(node) ||
|
||||
this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -691,7 +693,7 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitSimplePropertyAssignment(node: SimplePropertyAssignmentSyntax): void {
|
||||
if (this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
if (this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -700,13 +702,13 @@ module TypeScript {
|
||||
|
||||
public visitSetAccessor(node: SetAccessorSyntax): void {
|
||||
if (this.checkForAccessorDeclarationInAmbientContext(node) ||
|
||||
this.checkEcmaScriptVersionIsAtLeast(node.propertyName, ts.ScriptTarget.ES5, DiagnosticCode.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher) ||
|
||||
this.checkEcmaScriptVersionIsAtLeast(node.setKeyword, ts.ScriptTarget.ES5, DiagnosticCode.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher) ||
|
||||
this.checkForDisallowedModifiers(node.modifiers) ||
|
||||
this.checkClassElementModifiers(node.modifiers) ||
|
||||
this.checkForDisallowedAccessorTypeParameters(node.callSignature) ||
|
||||
this.checkForDisallowedSetAccessorTypeAnnotation(node) ||
|
||||
this.checkSetAccessorParameter(node) ||
|
||||
this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -747,7 +749,8 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitEnumElement(node: EnumElementSyntax): void {
|
||||
if (this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
if (this.checkForDisallowedTemplatePropertyName(node.propertyName) ||
|
||||
this.checkForDisallowedComputedPropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1338,7 +1341,7 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): void {
|
||||
if (this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
if (this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1410,16 +1413,25 @@ module TypeScript {
|
||||
public visitVariableDeclarator(node: VariableDeclaratorSyntax): void {
|
||||
if (this.checkVariableDeclaratorInitializer(node) ||
|
||||
this.checkVariableDeclaratorIdentifier(node) ||
|
||||
this.checkForTemplatePropertyName(node.propertyName)) {
|
||||
this.checkForDisallowedTemplatePropertyName(node.propertyName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
super.visitVariableDeclarator(node);
|
||||
}
|
||||
|
||||
private checkForTemplatePropertyName(token: ISyntaxToken): boolean {
|
||||
if (token.kind === SyntaxKind.NoSubstitutionTemplateToken) {
|
||||
this.pushDiagnostic(token, DiagnosticCode.Template_literal_cannot_be_used_as_an_element_name);
|
||||
private checkForDisallowedTemplatePropertyName(propertyName: IPropertyNameSyntax): boolean {
|
||||
if (propertyName.kind === SyntaxKind.NoSubstitutionTemplateToken) {
|
||||
this.pushDiagnostic(propertyName, DiagnosticCode.Template_literal_cannot_be_used_as_an_element_name);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private checkForDisallowedComputedPropertyName(propertyName: IPropertyNameSyntax): boolean {
|
||||
if (propertyName.kind === SyntaxKind.ComputedPropertyName) {
|
||||
this.pushDiagnostic(propertyName, DiagnosticCode.Computed_property_names_cannot_be_used_here);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1428,7 +1440,8 @@ module TypeScript {
|
||||
|
||||
private checkVariableDeclaratorIdentifier(node: VariableDeclaratorSyntax): boolean {
|
||||
if (node.parent.kind !== SyntaxKind.MemberVariableDeclaration) {
|
||||
if (this.checkForDisallowedEvalOrArguments(node, node.propertyName)) {
|
||||
Debug.assert(isToken(node.propertyName), "A normal variable declarator must always have a token for a name.");
|
||||
if (this.checkForDisallowedEvalOrArguments(node, <ISyntaxToken>node.propertyName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,6 +93,7 @@ module TypeScript {
|
||||
case SyntaxKind.Parameter: return visitor.visitParameter(<ParameterSyntax>element);
|
||||
case SyntaxKind.EnumElement: return visitor.visitEnumElement(<EnumElementSyntax>element);
|
||||
case SyntaxKind.TypeAnnotation: return visitor.visitTypeAnnotation(<TypeAnnotationSyntax>element);
|
||||
case SyntaxKind.ComputedPropertyName: return visitor.visitComputedPropertyName(<ComputedPropertyNameSyntax>element);
|
||||
case SyntaxKind.ExternalModuleReference: return visitor.visitExternalModuleReference(<ExternalModuleReferenceSyntax>element);
|
||||
case SyntaxKind.ModuleNameModuleReference: return visitor.visitModuleNameModuleReference(<ModuleNameModuleReferenceSyntax>element);
|
||||
default: return visitor.visitToken(<ISyntaxToken>element);
|
||||
@ -190,6 +191,7 @@ module TypeScript {
|
||||
visitParameter(node: ParameterSyntax): any;
|
||||
visitEnumElement(node: EnumElementSyntax): any;
|
||||
visitTypeAnnotation(node: TypeAnnotationSyntax): any;
|
||||
visitComputedPropertyName(node: ComputedPropertyNameSyntax): any;
|
||||
visitExternalModuleReference(node: ExternalModuleReferenceSyntax): any;
|
||||
visitModuleNameModuleReference(node: ModuleNameModuleReferenceSyntax): any;
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ module TypeScript {
|
||||
|
||||
public visitMemberFunctionDeclaration(node: MemberFunctionDeclarationSyntax): void {
|
||||
this.visitList(node.modifiers);
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
visitNodeOrToken(this, node.block);
|
||||
this.visitOptionalToken(node.semicolonToken);
|
||||
@ -180,7 +180,7 @@ module TypeScript {
|
||||
public visitGetAccessor(node: GetAccessorSyntax): void {
|
||||
this.visitList(node.modifiers);
|
||||
this.visitToken(node.getKeyword);
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
visitNodeOrToken(this, node.block);
|
||||
}
|
||||
@ -188,13 +188,13 @@ module TypeScript {
|
||||
public visitSetAccessor(node: SetAccessorSyntax): void {
|
||||
this.visitList(node.modifiers);
|
||||
this.visitToken(node.setKeyword);
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
visitNodeOrToken(this, node.block);
|
||||
}
|
||||
|
||||
public visitPropertySignature(node: PropertySignatureSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.visitOptionalToken(node.questionToken);
|
||||
visitNodeOrToken(this, node.typeAnnotation);
|
||||
}
|
||||
@ -218,7 +218,7 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitMethodSignature(node: MethodSignatureSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.visitOptionalToken(node.questionToken);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
}
|
||||
@ -483,7 +483,7 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitVariableDeclarator(node: VariableDeclaratorSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.typeAnnotation);
|
||||
visitNodeOrToken(this, node.equalsValueClause);
|
||||
}
|
||||
@ -571,13 +571,13 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitSimplePropertyAssignment(node: SimplePropertyAssignmentSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
this.visitToken(node.colonToken);
|
||||
visitNodeOrToken(this, node.expression);
|
||||
}
|
||||
|
||||
public visitFunctionPropertyAssignment(node: FunctionPropertyAssignmentSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.callSignature);
|
||||
visitNodeOrToken(this, node.block);
|
||||
}
|
||||
@ -592,7 +592,7 @@ module TypeScript {
|
||||
}
|
||||
|
||||
public visitEnumElement(node: EnumElementSyntax): void {
|
||||
this.visitToken(node.propertyName);
|
||||
visitNodeOrToken(this, node.propertyName);
|
||||
visitNodeOrToken(this, node.equalsValueClause);
|
||||
}
|
||||
|
||||
@ -601,6 +601,12 @@ module TypeScript {
|
||||
visitNodeOrToken(this, node.type);
|
||||
}
|
||||
|
||||
public visitComputedPropertyName(node: ComputedPropertyNameSyntax): void {
|
||||
this.visitToken(node.openBracketToken);
|
||||
visitNodeOrToken(this, node.expression);
|
||||
this.visitToken(node.closeBracketToken);
|
||||
}
|
||||
|
||||
public visitExternalModuleReference(node: ExternalModuleReferenceSyntax): void {
|
||||
this.visitToken(node.requireKeyword);
|
||||
this.visitToken(node.openParenToken);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user