@@ -67,6 +67,7 @@ module ts {
67
67
BarBarToken ,
68
68
QuestionToken ,
69
69
ColonToken ,
70
+ AtToken ,
70
71
// Assignments
71
72
EqualsToken ,
72
73
PlusEqualsToken ,
@@ -154,6 +155,7 @@ module ts {
154
155
// Signature elements
155
156
TypeParameter ,
156
157
Parameter ,
158
+ Decorator ,
157
159
// TypeMember
158
160
PropertySignature ,
159
161
PropertyDeclaration ,
@@ -244,6 +246,7 @@ module ts {
244
246
ExportDeclaration ,
245
247
NamedExports ,
246
248
ExportSpecifier ,
249
+ IncompleteDeclaration ,
247
250
248
251
// Module references
249
252
ExternalModuleReference ,
@@ -327,22 +330,25 @@ module ts {
327
330
// If this node was parsed in the parameters of a generator.
328
331
GeneratorParameter = 1 << 3 ,
329
332
333
+ // If this node was parsed as part of a decorator
334
+ Decorator = 1 << 4 ,
335
+
330
336
// If the parser encountered an error when parsing the code that created this node. Note
331
337
// the parser only sets this directly on the node it creates right after encountering the
332
338
// error.
333
- ThisNodeHasError = 1 << 4 ,
339
+ ThisNodeHasError = 1 << 5 ,
334
340
335
341
// Context flags set directly by the parser.
336
- ParserGeneratedFlags = StrictMode | DisallowIn | Yield | GeneratorParameter | ThisNodeHasError ,
342
+ ParserGeneratedFlags = StrictMode | DisallowIn | Yield | GeneratorParameter | Decorator | ThisNodeHasError ,
337
343
338
344
// Context flags computed by aggregating child flags upwards.
339
345
340
346
// Used during incremental parsing to determine if this node or any of its children had an
341
347
// error. Computed only once and then cached.
342
- ThisNodeOrAnySubNodesHasError = 1 << 5 ,
348
+ ThisNodeOrAnySubNodesHasError = 1 << 6 ,
343
349
344
350
// Used to know if we've computed data from children and cached it in this node.
345
- HasAggregatedChildData = 1 << 6
351
+ HasAggregatedChildData = 1 << 7
346
352
}
347
353
348
354
export const enum RelationComparisonResult {
@@ -357,13 +363,14 @@ module ts {
357
363
// Specific context the parser was in when this node was created. Normally undefined.
358
364
// Only set when the parser was in some interesting context (like async/yield).
359
365
parserContextFlags ?: ParserContextFlags ;
360
- modifiers ?: ModifiersArray ; // Array of modifiers
361
- id ?: number ; // Unique id (used to look up NodeLinks)
362
- parent ?: Node ; // Parent node (initialized by binding)
363
- symbol ?: Symbol ; // Symbol declared by node (initialized by binding)
364
- locals ?: SymbolTable ; // Locals associated with node (initialized by binding)
365
- nextContainer ?: Node ; // Next container in declaration order (initialized by binding)
366
- localSymbol ?: Symbol ; // Local symbol declared by node (initialized by binding only for exported nodes)
366
+ decorators ?: NodeArray < Decorator > ; // Array of decorators
367
+ modifiers ?: ModifiersArray ; // Array of modifiers
368
+ id ?: number ; // Unique id (used to look up NodeLinks)
369
+ parent ?: Node ; // Parent node (initialized by binding)
370
+ symbol ?: Symbol ; // Symbol declared by node (initialized by binding)
371
+ locals ?: SymbolTable ; // Locals associated with node (initialized by binding)
372
+ nextContainer ?: Node ; // Next container in declaration order (initialized by binding)
373
+ localSymbol ?: Symbol ; // Local symbol declared by node (initialized by binding only for exported nodes)
367
374
}
368
375
369
376
export interface NodeArray < T > extends Array < T > , TextRange {
@@ -397,6 +404,11 @@ module ts {
397
404
expression : Expression ;
398
405
}
399
406
407
+ export interface Decorator extends Node {
408
+ atToken : Node ;
409
+ expression : LeftHandSideExpression ;
410
+ }
411
+
400
412
export interface TypeParameterDeclaration extends Declaration {
401
413
name : Identifier ;
402
414
constraint ?: TypeNode ;
@@ -687,7 +699,9 @@ module ts {
687
699
}
688
700
689
701
export interface ArrayLiteralExpression extends PrimaryExpression {
702
+ openBracketToken : Node ;
690
703
elements : NodeArray < Expression > ;
704
+ closeBracketToken : Node ;
691
705
}
692
706
693
707
export interface SpreadElementExpression extends Expression {
@@ -707,7 +721,9 @@ module ts {
707
721
708
722
export interface ElementAccessExpression extends MemberExpression {
709
723
expression : LeftHandSideExpression ;
724
+ openBracketToken : Node ;
710
725
argumentExpression ?: Expression ;
726
+ closeBracketToken : Node ;
711
727
}
712
728
713
729
export interface CallExpression extends LeftHandSideExpression {
0 commit comments