@artel/artc 0.6.25219 → 0.6.25221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,6 +37,7 @@ export declare class Scanner {
37
37
  private scanBinaryDigitSequence;
38
38
  private scanMeasureUnits;
39
39
  private scanSingleLineComment;
40
+ private scanMultilineLineComment;
40
41
  private scanIdentifier;
41
42
  private scanQuotedIdentifier;
42
43
  static isWhitespaceOrTab(char: string): boolean;
@@ -24,7 +24,8 @@ export declare class CompletionService {
24
24
  private isRepeatWhileKeywordContext;
25
25
  private isModifierLevelContext;
26
26
  private isElseOrElseIfKeywordContext;
27
- private isRunStatementAccessorListContext;
27
+ private isCatchKeywordContext;
28
+ private isFinallyKeywordContext;
28
29
  private isTypeKindCompletionContext;
29
30
  private isFromKeywordContext;
30
31
  private isCaseKeywordContext;
@@ -74,8 +74,9 @@ export type VariableDeclaration = VariableDeclaration_entity | VariableDeclarati
74
74
  export declare class VariableDeclaration_entity implements IVariableDeclaration {
75
75
  readonly value: e.VariableEntity;
76
76
  readonly localization: Localization;
77
+ readonly narrowedType?: types.Type | undefined;
77
78
  readonly kind = "entity";
78
- constructor(value: e.VariableEntity, localization: Localization);
79
+ constructor(value: e.VariableEntity, localization: Localization, narrowedType?: types.Type | undefined);
79
80
  getEntity(): e.VariableEntity;
80
81
  getLocalization(): Localization;
81
82
  getType(): types.Type;
@@ -85,8 +86,9 @@ export declare class VariableDeclaration_entity implements IVariableDeclaration
85
86
  export declare class VariableDeclaration_typeMember implements IVariableDeclaration {
86
87
  readonly value: types.Variable;
87
88
  readonly localization: Localization;
89
+ readonly narrowedType?: types.Type | undefined;
88
90
  readonly kind = "type-member";
89
- constructor(value: types.Variable, localization: Localization);
91
+ constructor(value: types.Variable, localization: Localization, narrowedType?: types.Type | undefined);
90
92
  getEntity(): e.VariableEntity;
91
93
  getLocalization(): Localization;
92
94
  getType(): types.Type;
@@ -57,15 +57,17 @@ export type ReferenceTarget = EntityReferenceTarget | TypeVariableReferenceTarge
57
57
  export declare class EntityReferenceTarget {
58
58
  readonly entity: ReferencedEntity;
59
59
  readonly accessKind: AccessKind;
60
+ readonly narrowedType?: types.Type | undefined;
60
61
  readonly kind = "entity";
61
- constructor(entity: ReferencedEntity, accessKind: AccessKind);
62
+ constructor(entity: ReferencedEntity, accessKind: AccessKind, narrowedType?: types.Type | undefined);
62
63
  }
63
64
  export type ReferencedEntity = VariableEntity | VariantTypeEntity | MethodEntity | TypeParameterEntity | MethodTypeEntity | StructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
64
65
  export declare class TypeVariableReferenceTarget {
65
66
  readonly variable: types.Variable;
66
67
  readonly accessKind: AccessKind;
68
+ readonly narrowedType: types.Type | undefined;
67
69
  readonly kind = "type-variable";
68
- constructor(variable: types.Variable, accessKind: AccessKind);
70
+ constructor(variable: types.Variable, accessKind: AccessKind, narrowedType: types.Type | undefined);
69
71
  }
70
72
  export declare class TypeValueParameterReferenceTarget {
71
73
  readonly parameter: types.ValueParameter;
@@ -109,48 +109,49 @@ export declare enum NodeKind {
109
109
  IfStatement = 107,
110
110
  ElseIfClauseList = 108,
111
111
  ElseIfClause = 109,
112
- InvalidStatement = 110,
113
- NestedMethodDeclarationStatement = 111,
114
- LocalVariableDeclarationStatement = 112,
115
- LoopStatement = 113,
116
- ReturnStatement = 114,
117
- CaseClauseList = 115,
118
- SwitchStatement = 116,
119
- MatchExpressionList = 117,
120
- SwitchStatementCaseClause = 118,
121
- WhileStatement = 119,
122
- YieldStatement = 120,
123
- TranslationParameterList = 121,
124
- TranslationParameterClause = 122,
125
- ConstructorTranslation = 123,
126
- IndexerTranslationParameterClause = 124,
127
- IndexerTranslation = 125,
128
- TranslationTypeParameterList = 126,
129
- TranslationTypeParameterClause = 127,
130
- PackageMethodTranslation = 128,
131
- TypeMethodTranslation = 129,
132
- MethodTypeTranslation = 130,
133
- PackageImportTranslation = 131,
134
- QualifiedName = 132,
135
- PackageVariableTranslation = 133,
136
- TypeVariableOrVariantTranslation = 134,
137
- TypeMemberTranslationList = 135,
138
- TypeTranslation = 136,
139
- TextLiteralTranslation = 137,
140
- TextTemplateLiteralTranslation = 138,
141
- VariantDeclaration = 139,
142
- TypeParameterDeclaration = 140,
143
- ParameterDeclaration = 141,
144
- Argument = 142,
145
- TagList = 143,
146
- Tag = 144,
147
- ModifierList = 145,
148
- Modifier = 146,
149
- ParameterClause = 147,
150
- ParameterList = 148,
151
- TypeArgumentClause = 149,
152
- TypeArgumentList = 150,
153
- TypeParameterClause = 151,
154
- TypeParameterList = 152,
155
- TypeAnnotation = 153
112
+ ElseClause = 110,
113
+ InvalidStatement = 111,
114
+ NestedMethodDeclarationStatement = 112,
115
+ LocalVariableDeclarationStatement = 113,
116
+ LoopStatement = 114,
117
+ ReturnStatement = 115,
118
+ CaseClauseList = 116,
119
+ SwitchStatement = 117,
120
+ MatchExpressionList = 118,
121
+ CaseClause = 119,
122
+ WhileStatement = 120,
123
+ YieldStatement = 121,
124
+ TranslationParameterList = 122,
125
+ TranslationParameterClause = 123,
126
+ ConstructorTranslation = 124,
127
+ IndexerTranslationParameterClause = 125,
128
+ IndexerTranslation = 126,
129
+ TranslationTypeParameterList = 127,
130
+ TranslationTypeParameterClause = 128,
131
+ PackageMethodTranslation = 129,
132
+ TypeMethodTranslation = 130,
133
+ MethodTypeTranslation = 131,
134
+ PackageImportTranslation = 132,
135
+ QualifiedName = 133,
136
+ PackageVariableTranslation = 134,
137
+ TypeVariableOrVariantTranslation = 135,
138
+ TypeMemberTranslationList = 136,
139
+ TypeTranslation = 137,
140
+ TextLiteralTranslation = 138,
141
+ TextTemplateLiteralTranslation = 139,
142
+ VariantDeclaration = 140,
143
+ TypeParameterDeclaration = 141,
144
+ ParameterDeclaration = 142,
145
+ Argument = 143,
146
+ TagList = 144,
147
+ Tag = 145,
148
+ ModifierList = 146,
149
+ Modifier = 147,
150
+ ParameterClause = 148,
151
+ ParameterList = 149,
152
+ TypeArgumentClause = 150,
153
+ TypeArgumentList = 151,
154
+ TypeParameterClause = 152,
155
+ TypeParameterList = 153,
156
+ TypeAnnotation = 154
156
157
  }
@@ -310,9 +310,9 @@ export declare class PackageConstructorDeclaration extends BaseNode {
310
310
  get tagList(): TagList;
311
311
  get modifierList(): ModifierList;
312
312
  get creationKeyword(): Keyword<KeywordKind.Creation>;
313
- get body(): StatementBlock;
313
+ get block(): StatementBlock;
314
314
  protected get thisAsNode(): Node;
315
- constructor(tagList: TagList, modifierList: ModifierList, creationKeyword: Keyword<KeywordKind.Creation>, body: StatementBlock);
315
+ constructor(tagList: TagList, modifierList: ModifierList, creationKeyword: Keyword<KeywordKind.Creation>, block: StatementBlock);
316
316
  toRed(rangeStart: number, parent: red.PackageMemberDeclarationParent): red.PackageConstructorDeclaration;
317
317
  }
318
318
  export declare class PackageEntryPointDeclaration extends BaseNode {
@@ -326,9 +326,9 @@ export declare class PackageEntryPointDeclaration extends BaseNode {
326
326
  get tagList(): TagList;
327
327
  get modifierList(): ModifierList;
328
328
  get runKeyword(): Keyword<KeywordKind.Run>;
329
- get body(): StatementBlock;
329
+ get block(): StatementBlock;
330
330
  protected get thisAsNode(): Node;
331
- constructor(tagList: TagList, modifierList: ModifierList, runKeyword: Keyword<KeywordKind.Run>, body: StatementBlock);
331
+ constructor(tagList: TagList, modifierList: ModifierList, runKeyword: Keyword<KeywordKind.Run>, block: StatementBlock);
332
332
  toRed(rangeStart: number, parent: red.PackageMemberDeclarationParent): red.PackageEntryPointDeclaration;
333
333
  }
334
334
  export declare class PackageMethodDeclaration extends BaseNode {
@@ -350,9 +350,9 @@ export declare class PackageMethodDeclaration extends BaseNode {
350
350
  get typeParameterClause(): TypeParameterClause | undefined;
351
351
  get parameterClause(): ParameterClause;
352
352
  get returnTypeAnnotation(): TypeAnnotation | undefined;
353
- get body(): StatementBlock | undefined;
353
+ get block(): StatementBlock | undefined;
354
354
  protected get thisAsNode(): Node;
355
- constructor(tagList: TagList, modifierList: ModifierList, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, typeParameterClause: TypeParameterClause | undefined, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, body: StatementBlock | undefined);
355
+ constructor(tagList: TagList, modifierList: ModifierList, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, typeParameterClause: TypeParameterClause | undefined, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, block: StatementBlock | undefined);
356
356
  toRed(rangeStart: number, parent: red.PackageMemberDeclarationParent): red.PackageMethodDeclaration;
357
357
  }
358
358
  export declare class PackageMethodTypeDeclaration extends BaseNode {
@@ -497,9 +497,9 @@ export declare class PackageVariableGetterDeclaration extends BaseNode {
497
497
  get getKeyword(): Keyword<KeywordKind.Get>;
498
498
  get name(): Identifier;
499
499
  get typeAnnotation(): TypeAnnotation;
500
- get body(): StatementBlock | undefined;
500
+ get block(): StatementBlock | undefined;
501
501
  protected get thisAsNode(): Node;
502
- constructor(tagList: TagList, modifierList: ModifierList, getKeyword: Keyword<KeywordKind.Get>, name: Identifier, typeAnnotation: TypeAnnotation, body: StatementBlock | undefined);
502
+ constructor(tagList: TagList, modifierList: ModifierList, getKeyword: Keyword<KeywordKind.Get>, name: Identifier, typeAnnotation: TypeAnnotation, block: StatementBlock | undefined);
503
503
  toRed(rangeStart: number, parent: red.PackageMemberDeclarationParent): red.PackageVariableGetterDeclaration;
504
504
  }
505
505
  export declare class PackageVariableSetterDeclaration extends BaseNode {
@@ -515,9 +515,9 @@ export declare class PackageVariableSetterDeclaration extends BaseNode {
515
515
  get modifierList(): ModifierList;
516
516
  get setKeyword(): Keyword<KeywordKind.Set>;
517
517
  get name(): Identifier;
518
- get body(): StatementBlock | undefined;
518
+ get block(): StatementBlock | undefined;
519
519
  protected get thisAsNode(): Node;
520
- constructor(tagList: TagList, modifierList: ModifierList, setKeyword: Keyword<KeywordKind.Set>, name: Identifier, body: StatementBlock | undefined);
520
+ constructor(tagList: TagList, modifierList: ModifierList, setKeyword: Keyword<KeywordKind.Set>, name: Identifier, block: StatementBlock | undefined);
521
521
  toRed(rangeStart: number, parent: red.PackageMemberDeclarationParent): red.PackageVariableSetterDeclaration;
522
522
  }
523
523
  export declare class PackageVariantTypeDeclaration extends BaseNode {
@@ -640,9 +640,9 @@ export declare class TypeConstructorDeclaration extends BaseNode {
640
640
  get modifierList(): ModifierList;
641
641
  get creationKeyword(): Keyword<KeywordKind.Creation>;
642
642
  get parameterClause(): ParameterClause;
643
- get body(): StatementBlock | undefined;
643
+ get block(): StatementBlock | undefined;
644
644
  protected get thisAsNode(): Node;
645
- constructor(tagList: TagList, modifierList: ModifierList, creationKeyword: Keyword<KeywordKind.Creation>, parameterClause: ParameterClause, body: StatementBlock | undefined);
645
+ constructor(tagList: TagList, modifierList: ModifierList, creationKeyword: Keyword<KeywordKind.Creation>, parameterClause: ParameterClause, block: StatementBlock | undefined);
646
646
  toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeConstructorDeclaration;
647
647
  }
648
648
  export declare class TypeDestructorDeclaration extends BaseNode {
@@ -658,9 +658,9 @@ export declare class TypeDestructorDeclaration extends BaseNode {
658
658
  get modifierList(): ModifierList;
659
659
  get destructionKeyword(): Keyword<KeywordKind.Destruction>;
660
660
  get parameterClause(): ParameterClause;
661
- get body(): StatementBlock | undefined;
661
+ get block(): StatementBlock | undefined;
662
662
  protected get thisAsNode(): Node;
663
- constructor(tagList: TagList, modifierList: ModifierList, destructionKeyword: Keyword<KeywordKind.Destruction>, parameterClause: ParameterClause, body: StatementBlock | undefined);
663
+ constructor(tagList: TagList, modifierList: ModifierList, destructionKeyword: Keyword<KeywordKind.Destruction>, parameterClause: ParameterClause, block: StatementBlock | undefined);
664
664
  toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeDestructorDeclaration;
665
665
  }
666
666
  export declare class TypeIndexedGetterDeclaration extends BaseNode {
@@ -678,9 +678,9 @@ export declare class TypeIndexedGetterDeclaration extends BaseNode {
678
678
  get getKeyword(): Keyword<KeywordKind.Get>;
679
679
  get parameterClause(): TypeIndexerParameterClause;
680
680
  get typeAnnotation(): TypeAnnotation;
681
- get body(): StatementBlock | undefined;
681
+ get block(): StatementBlock | undefined;
682
682
  protected get thisAsNode(): Node;
683
- constructor(tagList: TagList, modifierList: ModifierList, getKeyword: Keyword<KeywordKind.Get>, parameterClause: TypeIndexerParameterClause, typeAnnotation: TypeAnnotation, body: StatementBlock | undefined);
683
+ constructor(tagList: TagList, modifierList: ModifierList, getKeyword: Keyword<KeywordKind.Get>, parameterClause: TypeIndexerParameterClause, typeAnnotation: TypeAnnotation, block: StatementBlock | undefined);
684
684
  toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeIndexedGetterDeclaration;
685
685
  }
686
686
  export declare class TypeIndexedSetterDeclaration extends BaseNode {
@@ -696,9 +696,9 @@ export declare class TypeIndexedSetterDeclaration extends BaseNode {
696
696
  get modifierList(): ModifierList;
697
697
  get setKeyword(): Keyword<KeywordKind.Set>;
698
698
  get parameterClause(): TypeIndexerParameterClause;
699
- get body(): StatementBlock | undefined;
699
+ get block(): StatementBlock | undefined;
700
700
  protected get thisAsNode(): Node;
701
- constructor(tagList: TagList, modifierList: ModifierList, setKeyword: Keyword<KeywordKind.Set>, parameterClause: TypeIndexerParameterClause, body: StatementBlock | undefined);
701
+ constructor(tagList: TagList, modifierList: ModifierList, setKeyword: Keyword<KeywordKind.Set>, parameterClause: TypeIndexerParameterClause, block: StatementBlock | undefined);
702
702
  toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeIndexedSetterDeclaration;
703
703
  }
704
704
  export declare class TypeIndexerParameterClause extends BaseNode {
@@ -730,9 +730,9 @@ export declare class TypeDereferencedVariableGetterDeclaration extends BaseNode
730
730
  get getKeyword(): Keyword<KeywordKind.Get>;
731
731
  get caretToken(): Token<TokenKind.Caret>;
732
732
  get typeAnnotation(): TypeAnnotation;
733
- get body(): StatementBlock | undefined;
733
+ get block(): StatementBlock | undefined;
734
734
  protected get thisAsNode(): Node;
735
- constructor(tagList: TagList, modifierList: ModifierList, getKeyword: Keyword<KeywordKind.Get>, caretToken: Token<TokenKind.Caret>, typeAnnotation: TypeAnnotation, body: StatementBlock | undefined);
735
+ constructor(tagList: TagList, modifierList: ModifierList, getKeyword: Keyword<KeywordKind.Get>, caretToken: Token<TokenKind.Caret>, typeAnnotation: TypeAnnotation, block: StatementBlock | undefined);
736
736
  toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeDereferencedVariableGetterDeclaration;
737
737
  }
738
738
  export declare class TypeDereferencedVariableSetterDeclaration extends BaseNode {
@@ -748,9 +748,9 @@ export declare class TypeDereferencedVariableSetterDeclaration extends BaseNode
748
748
  get modifierList(): ModifierList;
749
749
  get setKeyword(): Keyword<KeywordKind.Set>;
750
750
  get caretToken(): Token<TokenKind.Caret>;
751
- get body(): StatementBlock | undefined;
751
+ get block(): StatementBlock | undefined;
752
752
  protected get thisAsNode(): Node;
753
- constructor(tagList: TagList, modifierList: ModifierList, setKeyword: Keyword<KeywordKind.Set>, caretToken: Token<TokenKind.Caret>, body: StatementBlock | undefined);
753
+ constructor(tagList: TagList, modifierList: ModifierList, setKeyword: Keyword<KeywordKind.Set>, caretToken: Token<TokenKind.Caret>, block: StatementBlock | undefined);
754
754
  toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeDereferencedVariableSetterDeclaration;
755
755
  }
756
756
  export declare class TypeMethodDeclaration extends BaseNode {
@@ -772,9 +772,9 @@ export declare class TypeMethodDeclaration extends BaseNode {
772
772
  get typeParameterClause(): TypeParameterClause | undefined;
773
773
  get parameterClause(): ParameterClause;
774
774
  get returnTypeAnnotation(): TypeAnnotation | undefined;
775
- get body(): StatementBlock | undefined;
775
+ get block(): StatementBlock | undefined;
776
776
  protected get thisAsNode(): Node;
777
- constructor(tagList: TagList, modifierList: ModifierList, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, typeParameterClause: TypeParameterClause | undefined, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, body: StatementBlock | undefined);
777
+ constructor(tagList: TagList, modifierList: ModifierList, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, typeParameterClause: TypeParameterClause | undefined, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, block: StatementBlock | undefined);
778
778
  toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeMethodDeclaration;
779
779
  }
780
780
  export declare class OperatorDeclaration extends BaseNode {
@@ -795,9 +795,9 @@ export declare class OperatorDeclaration extends BaseNode {
795
795
  get name(): Identifier;
796
796
  get parameterClause(): ParameterClause;
797
797
  get returnTypeAnnotation(): TypeAnnotation | undefined;
798
- get body(): StatementBlock | undefined;
798
+ get block(): StatementBlock | undefined;
799
799
  protected get thisAsNode(): Node;
800
- constructor(tagList: TagList, modifierList: ModifierList, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, body: StatementBlock | undefined, operatorKind: OperatorKind);
800
+ constructor(tagList: TagList, modifierList: ModifierList, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, block: StatementBlock | undefined, operatorKind: OperatorKind);
801
801
  toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.OperatorDeclaration;
802
802
  }
803
803
  export declare class TypeVariableDeclaration extends BaseNode {
@@ -835,9 +835,9 @@ export declare class TypeVariableGetterDeclaration extends BaseNode {
835
835
  get getKeyword(): Keyword<KeywordKind.Get>;
836
836
  get name(): Identifier;
837
837
  get typeAnnotation(): TypeAnnotation;
838
- get body(): StatementBlock | undefined;
838
+ get block(): StatementBlock | undefined;
839
839
  protected get thisAsNode(): Node;
840
- constructor(tagList: TagList, modifierList: ModifierList, getKeyword: Keyword<KeywordKind.Get>, name: Identifier, typeAnnotation: TypeAnnotation, body: StatementBlock | undefined);
840
+ constructor(tagList: TagList, modifierList: ModifierList, getKeyword: Keyword<KeywordKind.Get>, name: Identifier, typeAnnotation: TypeAnnotation, block: StatementBlock | undefined);
841
841
  toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeVariableGetterDeclaration;
842
842
  }
843
843
  export declare class TypeVariableSetterDeclaration extends BaseNode {
@@ -853,9 +853,9 @@ export declare class TypeVariableSetterDeclaration extends BaseNode {
853
853
  get modifierList(): ModifierList;
854
854
  get setKeyword(): Keyword<KeywordKind.Set>;
855
855
  get name(): Identifier;
856
- get body(): StatementBlock | undefined;
856
+ get block(): StatementBlock | undefined;
857
857
  protected get thisAsNode(): Node;
858
- constructor(tagList: TagList, modifierList: ModifierList, setKeyword: Keyword<KeywordKind.Set>, name: Identifier, body: StatementBlock | undefined);
858
+ constructor(tagList: TagList, modifierList: ModifierList, setKeyword: Keyword<KeywordKind.Set>, name: Identifier, block: StatementBlock | undefined);
859
859
  toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeVariableSetterDeclaration;
860
860
  }
861
861
  export declare class InvalidTypeMemberDeclaration extends BaseNode {
@@ -887,9 +887,9 @@ export declare class NestedMethodDeclaration extends BaseNode {
887
887
  get typeParameterClause(): TypeParameterClause | undefined;
888
888
  get parameterClause(): ParameterClause;
889
889
  get returnTypeAnnotation(): TypeAnnotation | undefined;
890
- get body(): StatementBlock;
890
+ get block(): StatementBlock;
891
891
  protected get thisAsNode(): Node;
892
- constructor(asyncKeyword: Keyword<KeywordKind.Async> | undefined, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, typeParameterClause: TypeParameterClause | undefined, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, body: StatementBlock);
892
+ constructor(asyncKeyword: Keyword<KeywordKind.Async> | undefined, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, typeParameterClause: TypeParameterClause | undefined, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, block: StatementBlock);
893
893
  toRed(rangeStart: number, parent: red.NestedMethodDeclarationParent): red.NestedMethodDeclaration;
894
894
  }
895
895
  export declare class LocalVariableDeclaration extends BaseNode {
@@ -1002,9 +1002,9 @@ export declare class MethodBlockLiteral extends BaseNode {
1002
1002
  readonly children: readonly [
1003
1003
  StatementBlock
1004
1004
  ];
1005
- get body(): StatementBlock;
1005
+ get block(): StatementBlock;
1006
1006
  protected get thisAsNode(): Node;
1007
- constructor(body: StatementBlock);
1007
+ constructor(block: StatementBlock);
1008
1008
  toRed(rangeStart: number, parent: red.ExpressionParent): red.MethodBlockLiteral;
1009
1009
  }
1010
1010
  export type ArgumentListElement = Argument | Comma;
@@ -1098,9 +1098,9 @@ export declare class MethodLiteral extends BaseNode {
1098
1098
  get functionKeyword(): Keyword<KeywordKind.Function>;
1099
1099
  get parameterClause(): ParameterClause;
1100
1100
  get returnTypeAnnotation(): TypeAnnotation | undefined;
1101
- get body(): StatementBlock;
1101
+ get block(): StatementBlock;
1102
1102
  protected get thisAsNode(): Node;
1103
- constructor(asyncKeyword: Keyword<KeywordKind.Async> | undefined, functionKeyword: Keyword<KeywordKind.Function>, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, body: StatementBlock);
1103
+ constructor(asyncKeyword: Keyword<KeywordKind.Async> | undefined, functionKeyword: Keyword<KeywordKind.Function>, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, block: StatementBlock);
1104
1104
  toRed(rangeStart: number, parent: red.ExpressionParent): red.MethodLiteral;
1105
1105
  }
1106
1106
  export declare class ParenthesizedExpression extends BaseNode {
@@ -1377,9 +1377,9 @@ export declare class RunStatement extends BaseNode {
1377
1377
  StatementBlock
1378
1378
  ];
1379
1379
  get runKeyword(): Keyword<KeywordKind.Run>;
1380
- get body(): StatementBlock;
1380
+ get block(): StatementBlock;
1381
1381
  protected get thisAsNode(): Node;
1382
- constructor(runKeyword: Keyword<KeywordKind.Run>, body: StatementBlock);
1382
+ constructor(runKeyword: Keyword<KeywordKind.Run>, block: StatementBlock);
1383
1383
  toRed(rangeStart: number, parent: red.StatementParent): red.RunStatement;
1384
1384
  }
1385
1385
  export declare class TryStatement extends BaseNode {
@@ -1391,11 +1391,11 @@ export declare class TryStatement extends BaseNode {
1391
1391
  FinallyClause | undefined
1392
1392
  ];
1393
1393
  get tryKeyword(): Keyword<KeywordKind.Try>;
1394
- get body(): StatementBlock;
1394
+ get block(): StatementBlock;
1395
1395
  get catchClause(): CatchClause | undefined;
1396
1396
  get finallyClause(): FinallyClause | undefined;
1397
1397
  protected get thisAsNode(): Node;
1398
- constructor(tryKeyword: Keyword<KeywordKind.Try>, body: StatementBlock, catchClause: CatchClause | undefined, finallyClause: FinallyClause | undefined);
1398
+ constructor(tryKeyword: Keyword<KeywordKind.Try>, block: StatementBlock, catchClause: CatchClause | undefined, finallyClause: FinallyClause | undefined);
1399
1399
  toRed(rangeStart: number, parent: red.TryStatementParent): red.TryStatement;
1400
1400
  }
1401
1401
  export declare class CatchClause extends BaseNode {
@@ -1407,9 +1407,9 @@ export declare class CatchClause extends BaseNode {
1407
1407
  ];
1408
1408
  get catchKeyword(): Keyword<KeywordKind.Catch>;
1409
1409
  get errorVariable(): ErrorVariableDeclaration | undefined;
1410
- get body(): StatementBlock;
1410
+ get block(): StatementBlock;
1411
1411
  protected get thisAsNode(): Node;
1412
- constructor(catchKeyword: Keyword<KeywordKind.Catch>, errorVariable: ErrorVariableDeclaration | undefined, body: StatementBlock);
1412
+ constructor(catchKeyword: Keyword<KeywordKind.Catch>, errorVariable: ErrorVariableDeclaration | undefined, block: StatementBlock);
1413
1413
  toRed(rangeStart: number, parent: red.CatchClauseParent): red.CatchClause;
1414
1414
  }
1415
1415
  export declare class ErrorVariableDeclaration extends BaseNode {
@@ -1431,9 +1431,9 @@ export declare class FinallyClause extends BaseNode {
1431
1431
  StatementBlock
1432
1432
  ];
1433
1433
  get finallyKeyword(): Keyword<KeywordKind.Finally>;
1434
- get body(): StatementBlock;
1434
+ get block(): StatementBlock;
1435
1435
  protected get thisAsNode(): Node;
1436
- constructor(finallyKeyword: Keyword<KeywordKind.Finally>, body: StatementBlock);
1436
+ constructor(finallyKeyword: Keyword<KeywordKind.Finally>, block: StatementBlock);
1437
1437
  toRed(rangeStart: number, parent: red.FinallyClauseParent): red.FinallyClause;
1438
1438
  }
1439
1439
  export declare class EmptyStatement extends BaseNode {
@@ -1490,9 +1490,9 @@ export declare class ForStatement extends BaseNode {
1490
1490
  get enumerationVariableList(): EnumerationVariableList;
1491
1491
  get fromKeyword(): Keyword<KeywordKind.From>;
1492
1492
  get enumeratedExpression(): Expression;
1493
- get body(): StatementBlock;
1493
+ get block(): StatementBlock;
1494
1494
  protected get thisAsNode(): Node;
1495
- constructor(forKeyword: Keyword<KeywordKind.For>, enumerationVariableList: EnumerationVariableList, fromKeyword: Keyword<KeywordKind.From>, enumeratedExpression: Expression, body: StatementBlock);
1495
+ constructor(forKeyword: Keyword<KeywordKind.For>, enumerationVariableList: EnumerationVariableList, fromKeyword: Keyword<KeywordKind.From>, enumeratedExpression: Expression, block: StatementBlock);
1496
1496
  toRed(rangeStart: number, parent: red.StatementParent): red.ForStatement;
1497
1497
  }
1498
1498
  export declare class IfStatement extends BaseNode {
@@ -1502,17 +1502,15 @@ export declare class IfStatement extends BaseNode {
1502
1502
  Expression,
1503
1503
  StatementBlock,
1504
1504
  ElseIfClauseList,
1505
- Keyword<KeywordKind.Else> | undefined,
1506
- StatementBlock | undefined
1505
+ ElseClause | undefined
1507
1506
  ];
1508
1507
  get ifKeyword(): Keyword<KeywordKind.If>;
1509
1508
  get condition(): Expression;
1510
- get thenBlock(): StatementBlock;
1509
+ get block(): StatementBlock;
1511
1510
  get elseIfClauseList(): ElseIfClauseList;
1512
- get elseKeyword(): Keyword<KeywordKind.Else> | undefined;
1513
- get elseBlock(): StatementBlock | undefined;
1511
+ get elseClause(): ElseClause | undefined;
1514
1512
  protected get thisAsNode(): Node;
1515
- constructor(ifKeyword: Keyword<KeywordKind.If>, condition: Expression, thenBlock: StatementBlock, elseIfClauseList: ElseIfClauseList, elseKeyword: Keyword<KeywordKind.Else> | undefined, elseBlock: StatementBlock | undefined);
1513
+ constructor(ifKeyword: Keyword<KeywordKind.If>, condition: Expression, block: StatementBlock, elseIfClauseList: ElseIfClauseList, elseClause: ElseClause | undefined);
1516
1514
  toRed(rangeStart: number, parent: red.StatementParent): red.IfStatement;
1517
1515
  }
1518
1516
  export declare class ElseIfClauseList extends BaseNode {
@@ -1532,11 +1530,23 @@ export declare class ElseIfClause extends BaseNode {
1532
1530
  ];
1533
1531
  get elseIfKeyword(): Keyword<KeywordKind.ElseIf>;
1534
1532
  get condition(): Expression;
1535
- get thenBlock(): StatementBlock;
1533
+ get block(): StatementBlock;
1536
1534
  protected get thisAsNode(): Node;
1537
- constructor(elseIfKeyword: Keyword<KeywordKind.ElseIf>, condition: Expression, thenBlock: StatementBlock);
1535
+ constructor(elseIfKeyword: Keyword<KeywordKind.ElseIf>, condition: Expression, block: StatementBlock);
1538
1536
  toRed(rangeStart: number, parent: red.ElseIfClauseParent): red.ElseIfClause;
1539
1537
  }
1538
+ export declare class ElseClause extends BaseNode {
1539
+ readonly kind = NodeKind.ElseClause;
1540
+ readonly children: readonly [
1541
+ Keyword<KeywordKind.Else>,
1542
+ StatementBlock
1543
+ ];
1544
+ get elseKeyword(): Keyword<KeywordKind.Else>;
1545
+ get block(): StatementBlock;
1546
+ protected get thisAsNode(): Node;
1547
+ constructor(elseKeyword: Keyword<KeywordKind.Else>, block: StatementBlock);
1548
+ toRed(rangeStart: number, parent: red.ElseClauseParent): red.ElseClause;
1549
+ }
1540
1550
  export declare class InvalidStatement extends BaseNode {
1541
1551
  readonly kind = NodeKind.InvalidStatement;
1542
1552
  readonly children: never[];
@@ -1573,11 +1583,11 @@ export declare class LoopStatement extends BaseNode {
1573
1583
  Expression | undefined
1574
1584
  ];
1575
1585
  get loopKeyword(): Keyword<KeywordKind.Loop>;
1576
- get body(): StatementBlock;
1586
+ get block(): StatementBlock;
1577
1587
  get repeatWhileKeyword(): Keyword<KeywordKind.RepeatWhile> | undefined;
1578
1588
  get condition(): Expression | undefined;
1579
1589
  protected get thisAsNode(): Node;
1580
- constructor(loopKeyword: Keyword<KeywordKind.Loop>, body: StatementBlock, repeatWhileKeyword: Keyword<KeywordKind.RepeatWhile> | undefined, condition: Expression | undefined);
1590
+ constructor(loopKeyword: Keyword<KeywordKind.Loop>, block: StatementBlock, repeatWhileKeyword: Keyword<KeywordKind.RepeatWhile> | undefined, condition: Expression | undefined);
1581
1591
  toRed(rangeStart: number, parent: red.StatementParent): red.LoopStatement;
1582
1592
  }
1583
1593
  export declare class ReturnStatement extends BaseNode {
@@ -1594,10 +1604,10 @@ export declare class ReturnStatement extends BaseNode {
1594
1604
  }
1595
1605
  export declare class CaseClauseList extends BaseNode {
1596
1606
  readonly kind = NodeKind.CaseClauseList;
1597
- readonly children: readonly SwitchStatementCaseClause[];
1598
- get caseClauses(): readonly SwitchStatementCaseClause[];
1607
+ readonly children: readonly CaseClause[];
1608
+ get caseClauses(): readonly CaseClause[];
1599
1609
  protected get thisAsNode(): Node;
1600
- constructor(caseClauses: readonly SwitchStatementCaseClause[]);
1610
+ constructor(caseClauses: readonly CaseClause[]);
1601
1611
  toRed(rangeStart: number, parent: red.CaseClauseListParent): red.CaseClauseList;
1602
1612
  }
1603
1613
  export declare class SwitchStatement extends BaseNode {
@@ -1623,8 +1633,8 @@ export declare class MatchExpressionList extends BaseNode {
1623
1633
  constructor(elements: readonly MatchExpressionListElement[]);
1624
1634
  toRed(rangeStart: number, parent: red.MatchExpressionListParent): red.MatchExpressionList;
1625
1635
  }
1626
- export declare class SwitchStatementCaseClause extends BaseNode {
1627
- readonly kind = NodeKind.SwitchStatementCaseClause;
1636
+ export declare class CaseClause extends BaseNode {
1637
+ readonly kind = NodeKind.CaseClause;
1628
1638
  readonly children: readonly [
1629
1639
  Keyword<KeywordKind.Case>,
1630
1640
  MatchExpressionList,
@@ -1632,10 +1642,10 @@ export declare class SwitchStatementCaseClause extends BaseNode {
1632
1642
  ];
1633
1643
  get caseKeyword(): Keyword<KeywordKind.Case>;
1634
1644
  get matchExpressionList(): MatchExpressionList;
1635
- get body(): StatementBlock;
1645
+ get block(): StatementBlock;
1636
1646
  protected get thisAsNode(): Node;
1637
- constructor(caseKeyword: Keyword<KeywordKind.Case>, matchExpressionList: MatchExpressionList, body: StatementBlock);
1638
- toRed(rangeStart: number, parent: red.SwitchStatementCaseClauseParent): red.SwitchStatementCaseClause;
1647
+ constructor(caseKeyword: Keyword<KeywordKind.Case>, matchExpressionList: MatchExpressionList, block: StatementBlock);
1648
+ toRed(rangeStart: number, parent: red.CaseClauseParent): red.CaseClause;
1639
1649
  }
1640
1650
  export declare class WhileStatement extends BaseNode {
1641
1651
  readonly kind = NodeKind.WhileStatement;
@@ -1646,9 +1656,9 @@ export declare class WhileStatement extends BaseNode {
1646
1656
  ];
1647
1657
  get whileKeyword(): Keyword<KeywordKind.While>;
1648
1658
  get condition(): Expression;
1649
- get body(): StatementBlock;
1659
+ get block(): StatementBlock;
1650
1660
  protected get thisAsNode(): Node;
1651
- constructor(whileKeyword: Keyword<KeywordKind.While>, condition: Expression, body: StatementBlock);
1661
+ constructor(whileKeyword: Keyword<KeywordKind.While>, condition: Expression, block: StatementBlock);
1652
1662
  toRed(rangeStart: number, parent: red.StatementParent): red.WhileStatement;
1653
1663
  }
1654
1664
  export declare class YieldStatement extends BaseNode {
@@ -2147,4 +2157,4 @@ export declare class TypeAnnotation extends BaseNode {
2147
2157
  constructor(colonToken: Token<TokenKind.Colon>, typeSpecifier: TypeSpecifier);
2148
2158
  toRed(rangeStart: number, parent: red.TypeAnnotationParent): red.TypeAnnotation;
2149
2159
  }
2150
- export type Node = SourceFile | PackageMemberDeclarationList | Keyword | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackagePath | NamedTypeSpecifier | UnionTypeSpecifier | UnionTypeSpecifierTypeList | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | InvalidTypeSpecifier | AnonymousMethodTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | TopLevelTranslationList | TranslationsDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | MethodTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | InvalidPackageMemberDeclaration | TypeMemberGroupDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeIndexerParameterClause | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | InvalidTypeMemberDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | MethodBlockLiteral | ArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessExpression | InvalidExpression | IsExpression | MethodLiteral | ParenthesizedExpression | WhenTernaryExpression | PrefixUnaryExpression | PropertyAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatement | TryStatement | CatchClause | ErrorVariableDeclaration | FinallyClause | EmptyStatement | ErrorStatement | ExpressionStatement | EnumerationVariableList | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | InvalidStatement | NestedMethodDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | SwitchStatementCaseClause | WhileStatement | YieldStatement | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexerTranslationParameterClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | PackageImportTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeMemberTranslationList | TypeTranslation | TextLiteralTranslation | TextTemplateLiteralTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | Argument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation | Token;
2160
+ export type Node = SourceFile | PackageMemberDeclarationList | Keyword | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackagePath | NamedTypeSpecifier | UnionTypeSpecifier | UnionTypeSpecifierTypeList | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | InvalidTypeSpecifier | AnonymousMethodTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | TopLevelTranslationList | TranslationsDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | MethodTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | InvalidPackageMemberDeclaration | TypeMemberGroupDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeIndexerParameterClause | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | InvalidTypeMemberDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | MethodBlockLiteral | ArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessExpression | InvalidExpression | IsExpression | MethodLiteral | ParenthesizedExpression | WhenTernaryExpression | PrefixUnaryExpression | PropertyAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatement | TryStatement | CatchClause | ErrorVariableDeclaration | FinallyClause | EmptyStatement | ErrorStatement | ExpressionStatement | EnumerationVariableList | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | ElseClause | InvalidStatement | NestedMethodDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | CaseClause | WhileStatement | YieldStatement | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexerTranslationParameterClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | PackageImportTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeMemberTranslationList | TypeTranslation | TextLiteralTranslation | TextTemplateLiteralTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | Argument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation | Token;
@@ -20,7 +20,7 @@ export declare class Token<TKind extends TokenKind = TokenKind> extends BaseNode
20
20
  readonly value: string;
21
21
  readonly leadingTrivia: readonly Trivia[];
22
22
  readonly flags: TokenFlags;
23
- readonly ifOperatorNameThenKind: OperatorKind | undefined;
23
+ readonly operatorKind: OperatorKind | undefined;
24
24
  get isMissing(): boolean;
25
25
  protected get thisAsNode(): Node;
26
26
  get rangeLength(): number;
@@ -1,2 +1,2 @@
1
1
  import { Node } from './index.js';
2
- export declare function toSourceCode(node: Node, lengthLimit?: number): string;
2
+ export declare function toSourceCode(node: Node, lengthLimit?: number, excludeLeadingTrivia?: boolean): string;