Skip to content

Commit 3753058

Browse files
Add an IAccessorSyntax interface.
1 parent ba2bdc4 commit 3753058

File tree

6 files changed

+18
-62
lines changed

6 files changed

+18
-62
lines changed

src/services/syntax/SyntaxGenerator.js

Lines changed: 2 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/services/syntax/SyntaxGenerator.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/services/syntax/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ module TypeScript.Parser {
11341134
return isPropertyName(peekToken(modifierCount + 1), inErrorRecovery);
11351135
}
11361136

1137-
function parseAccessor(checkForStrictMode: boolean): IPropertyAssignmentSyntax {
1137+
function parseAccessor(checkForStrictMode: boolean): IAccessorSyntax {
11381138
var modifiers = parseModifiers();
11391139
var _currenToken = currentToken();
11401140
var tokenKind = _currenToken.kind;

src/services/syntax/syntaxElement.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,19 @@ module TypeScript {
450450
_memberDeclarationBrand: any;
451451
}
452452

453-
export interface IPropertyAssignmentSyntax extends IClassElementSyntax {
453+
export interface IPropertyAssignmentSyntax extends ISyntaxNode {
454454
_propertyAssignmentBrand: any;
455455
}
456456

457+
export interface IAccessorSyntax extends IPropertyAssignmentSyntax, IMemberDeclarationSyntax {
458+
_accessorBrand: any;
459+
460+
modifiers: ISyntaxToken[];
461+
propertyName: ISyntaxToken;
462+
callSignature: CallSignatureSyntax;
463+
block: BlockSyntax;
464+
}
465+
457466
export interface ISwitchClauseSyntax extends ISyntaxNode {
458467
_switchClauseBrand: any;
459468
statements: IStatementSyntax[];

src/services/syntax/syntaxGenerator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ var definitions:ITypeDefinition[] = [
660660
<any>{
661661
name: 'GetAccessorSyntax',
662662
baseType: 'ISyntaxNode',
663-
interfaces: ['IMemberDeclarationSyntax', 'IPropertyAssignmentSyntax' ],
663+
interfaces: ['IAccessorSyntax' ],
664664
children: [
665665
<any>{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true },
666666
<any>{ name: 'getKeyword', isToken: true, excludeFromAST: true },
@@ -672,7 +672,7 @@ var definitions:ITypeDefinition[] = [
672672
<any>{
673673
name: 'SetAccessorSyntax',
674674
baseType: 'ISyntaxNode',
675-
interfaces: ['IMemberDeclarationSyntax', 'IPropertyAssignmentSyntax'],
675+
interfaces: ['IAccessorSyntax'],
676676
children: [
677677
<any>{ name: 'modifiers', isList: true, elementType: 'ISyntaxToken', isTypeScriptSpecific: true },
678678
<any>{ name: 'setKeyword', isToken: true, excludeFromAST: true },

src/services/syntax/syntaxInterfaces.generated.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ module TypeScript {
182182
}
183183
export interface IndexMemberDeclarationConstructor { new (data: number, modifiers: ISyntaxToken[], indexSignature: IndexSignatureSyntax, semicolonToken: ISyntaxToken): IndexMemberDeclarationSyntax }
184184

185-
export interface GetAccessorSyntax extends ISyntaxNode, IMemberDeclarationSyntax, IPropertyAssignmentSyntax {
185+
export interface GetAccessorSyntax extends ISyntaxNode, IAccessorSyntax {
186186
modifiers: ISyntaxToken[];
187187
getKeyword: ISyntaxToken;
188188
propertyName: ISyntaxToken;
@@ -191,7 +191,7 @@ module TypeScript {
191191
}
192192
export interface GetAccessorConstructor { new (data: number, modifiers: ISyntaxToken[], getKeyword: ISyntaxToken, propertyName: ISyntaxToken, callSignature: CallSignatureSyntax, block: BlockSyntax): GetAccessorSyntax }
193193

194-
export interface SetAccessorSyntax extends ISyntaxNode, IMemberDeclarationSyntax, IPropertyAssignmentSyntax {
194+
export interface SetAccessorSyntax extends ISyntaxNode, IAccessorSyntax {
195195
modifiers: ISyntaxToken[];
196196
setKeyword: ISyntaxToken;
197197
propertyName: ISyntaxToken;

0 commit comments

Comments
 (0)