@artel/artc 0.6.25281 → 0.6.25282
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.
- package/build/Cli.js +3 -3
- package/build/api/Api.js +16 -10
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +286 -201
- package/build/{chunk-7OXU5662.js → chunk-3DN3M64Y.js} +3 -3
- package/build/{chunk-NVHCHE3R.js → chunk-DURHSZYF.js} +3 -3
- package/build/{chunk-TIWNEKIS.js → chunk-VVFLEWSA.js} +2957 -3104
- package/build/types/analysis/AccessedFunction.d.ts +4 -0
- package/build/types/analysis/Analyzer.d.ts +27 -35
- package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +5 -5
- package/build/types/analysis/BaseExpressionMeaning.d.ts +8 -18
- package/build/types/analysis/CallExpressionMeaning.d.ts +4 -9
- package/build/types/analysis/DereferenceExpressionMeaning.d.ts +3 -4
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +8 -16
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +4 -8
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +8 -16
- package/build/types/analysis/NamedTypeResolver.d.ts +4 -4
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -4
- package/build/types/analysis/NodeTypeUtils.d.ts +1 -1
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +4 -9
- package/build/types/analysis/PackageMemberConflictsValidator.d.ts +1 -1
- package/build/types/analysis/SourceFileAnalyzer.d.ts +1 -0
- package/build/types/analysis/SubstitutedFunction.d.ts +3 -0
- package/build/types/analysis/TagMeaning.d.ts +4 -4
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +4 -3
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +4 -3
- package/build/types/analysis/Utils.d.ts +1 -0
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +7 -3
- package/build/types/api/Api.d.ts +4 -5
- package/build/types/common/ArrayUtils.d.ts +3 -1
- package/build/types/common/Displayable.d.ts +4 -4
- package/build/types/common/FormatString.d.ts +1 -1
- package/build/types/common/index.d.ts +3 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +238 -238
- package/build/types/diagnostic/DiagnosticData.d.ts +2 -2
- package/build/types/emitter/IrBuilder.d.ts +3 -1
- package/build/types/emitter/IrFactory.d.ts +2 -2
- package/build/types/emitter/Transformer.d.ts +3 -3
- package/build/types/emitter/ir/Nodes.d.ts +6 -6
- package/build/types/emitter/ir/types.d.ts +2 -2
- package/build/types/entities/{PackageMembers.d.ts → PackageEntityMembers.d.ts} +1 -1
- package/build/types/entities/index.d.ts +1 -1
- package/build/types/entities/interfaces/PackageEntity.d.ts +1 -2
- package/build/types/entities/interfaces/VariableEntity.d.ts +1 -1
- package/build/types/entities/source/SourcePackageEntity.d.ts +1 -2
- package/build/types/entities/source/SourceVariableEntity.d.ts +2 -2
- package/build/types/entities/translated/TranslatedPackageEntity.d.ts +2 -3
- package/build/types/services/AddBlockToScriptService.d.ts +17 -0
- package/build/types/services/CustomRequests.d.ts +11 -2
- package/build/types/services/DisplayService.d.ts +1 -2
- package/build/types/services/LanguageServer.d.ts +3 -1
- package/build/types/services/SourceFileItemsService.d.ts +1 -1
- package/build/types/tree/NodeKind.d.ts +1 -1
- package/build/types/tree/Nodes.d.ts +6 -6
- package/build/types/tree/SyntaxFactory.d.ts +1 -1
- package/build/types/tree/SyntaxToCode.d.ts +1 -1
- package/build/types/tree/Token.d.ts +4 -3
- package/build/types/tree/TokenKind.d.ts +58 -60
- package/build/types/types/AliasType.d.ts +1 -1
- package/build/types/types/FunctionType.d.ts +2 -2
- package/build/types/types/IntersectionType.d.ts +1 -1
- package/build/types/types/ParameterType.d.ts +1 -1
- package/build/types/types/Substitutions.d.ts +1 -1
- package/build/types/types/Type.d.ts +1 -4
- package/build/types/types/TypeMembers.d.ts +8 -8
- package/build/types/types/UnionType.d.ts +1 -1
- package/build/types/types/VariantType.d.ts +1 -1
- package/package.json +1 -1
- package/build/types/analysis/SourceFileMembers.d.ts +0 -29
package/build/api/ApiServices.js
CHANGED
|
@@ -155,8 +155,8 @@ import {
|
|
|
155
155
|
Uri,
|
|
156
156
|
VariableDeclaration_entity,
|
|
157
157
|
VariableDeclaration_typeMember,
|
|
158
|
-
VariantDeclaration,
|
|
159
158
|
VariantTypeDeclarationBody,
|
|
159
|
+
VariantValueDeclaration,
|
|
160
160
|
WellKnownDeclarationsLoadError,
|
|
161
161
|
__async,
|
|
162
162
|
__decorateClass,
|
|
@@ -188,7 +188,7 @@ import {
|
|
|
188
188
|
unwrapParenthesizedExpressions,
|
|
189
189
|
visitChildren,
|
|
190
190
|
yieldTask
|
|
191
|
-
} from "../chunk-
|
|
191
|
+
} from "../chunk-VVFLEWSA.js";
|
|
192
192
|
|
|
193
193
|
// source/services/CustomRequests.ts
|
|
194
194
|
import * as ls from "vscode-languageserver";
|
|
@@ -205,7 +205,8 @@ var customRequests = {
|
|
|
205
205
|
deleteSourceFile: new CustomRequestType("artel/fs.deleteSourceFile"),
|
|
206
206
|
getNodeRange: new CustomRequestType("artel/getNodeRange"),
|
|
207
207
|
assignField: new CustomRequestType("artel/assignField"),
|
|
208
|
-
|
|
208
|
+
addBlockToScript: new CustomRequestType("artel/addBlockToScript"),
|
|
209
|
+
deleteBlocksFromScript: new CustomRequestType("artel/deleteBlocksFromScript")
|
|
209
210
|
};
|
|
210
211
|
|
|
211
212
|
// source/services/LanguageServer.ts
|
|
@@ -238,6 +239,55 @@ var SourceFileEdit = class {
|
|
|
238
239
|
}
|
|
239
240
|
};
|
|
240
241
|
|
|
242
|
+
// source/services/AddBlockToScriptService.ts
|
|
243
|
+
var AddBlockToScriptService = class _AddBlockToScriptService {
|
|
244
|
+
static {
|
|
245
|
+
this.indentationStep = " ";
|
|
246
|
+
}
|
|
247
|
+
static {
|
|
248
|
+
this.elementParameterName = "el";
|
|
249
|
+
}
|
|
250
|
+
createEditAddingBlock(sourceFile, subprogramDeclaration, addedBlockInfo) {
|
|
251
|
+
const subprogramBlock = subprogramDeclaration.block;
|
|
252
|
+
if (subprogramBlock === void 0) {
|
|
253
|
+
return void 0;
|
|
254
|
+
}
|
|
255
|
+
let scriptBlockIndentation;
|
|
256
|
+
let editStart;
|
|
257
|
+
if (subprogramBlock.expressionOrStatementList.kind === 93 /* StatementList */) {
|
|
258
|
+
const lastStatement = subprogramBlock.expressionOrStatementList.statements.last();
|
|
259
|
+
if (lastStatement !== void 0) {
|
|
260
|
+
const lastStatementStartCharacter = sourceFile.getPositionAt(lastStatement.rangeWithoutTrivia.start).character;
|
|
261
|
+
scriptBlockIndentation = " ".repeat(lastStatementStartCharacter);
|
|
262
|
+
editStart = lastStatement.rangeWithoutTrivia.end;
|
|
263
|
+
} else {
|
|
264
|
+
const openBraceStartCharacter = sourceFile.getPositionAt(subprogramBlock.openBraceToken.rangeWithoutTrivia.start).character;
|
|
265
|
+
scriptBlockIndentation = " ".repeat(openBraceStartCharacter) + _AddBlockToScriptService.indentationStep;
|
|
266
|
+
editStart = subprogramBlock.openBraceToken.rangeWithoutTrivia.end;
|
|
267
|
+
}
|
|
268
|
+
} else {
|
|
269
|
+
const expressionStartCharacter = sourceFile.getPositionAt(subprogramBlock.expressionOrStatementList.rangeWithoutTrivia.start).character;
|
|
270
|
+
scriptBlockIndentation = " ".repeat(expressionStartCharacter);
|
|
271
|
+
editStart = subprogramBlock.expressionOrStatementList.rangeWithoutTrivia.end;
|
|
272
|
+
}
|
|
273
|
+
const newLine = this.detectNewLine(sourceFile.getSourceText());
|
|
274
|
+
const scriptBlockText = this.createScriptBlockText(addedBlockInfo, scriptBlockIndentation, newLine);
|
|
275
|
+
const editText = `${newLine}${scriptBlockText}`;
|
|
276
|
+
const result = new SourceFileEdit(sourceFile, Range.empty(editStart), editText);
|
|
277
|
+
return result;
|
|
278
|
+
}
|
|
279
|
+
createScriptBlockText(blockInfo, indentation, newLine) {
|
|
280
|
+
const i = indentation;
|
|
281
|
+
const s = _AddBlockToScriptService.indentationStep;
|
|
282
|
+
const nl = newLine;
|
|
283
|
+
const el = _AddBlockToScriptService.elementParameterName;
|
|
284
|
+
return `${i}${blockInfo.name}(${nl}${i}${s}key = ${blockInfo.key},${nl}${i}${s}script =${nl}${i}${s}{${nl}` + Object.entries(blockInfo.elementProperties).map(([p, v]) => `${i}${s}${s}${el}.${p} = ${v}${nl}`).join("") + `${i}${s}})`;
|
|
285
|
+
}
|
|
286
|
+
detectNewLine(text) {
|
|
287
|
+
return text.includes("\r\n") ? "\r\n" : "\n";
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
|
|
241
291
|
// source/services/AssignFieldService.ts
|
|
242
292
|
var AssignFieldService = class _AssignFieldService {
|
|
243
293
|
static {
|
|
@@ -296,11 +346,11 @@ var AssignFieldService = class _AssignFieldService {
|
|
|
296
346
|
if (statement.kind === 92 /* AssignmentStatement */) {
|
|
297
347
|
const left = unwrapParenthesizedExpressions(statement.left);
|
|
298
348
|
if (left.kind === 76 /* MemberAccessExpression */) {
|
|
299
|
-
const memberAccessMeaning = analyzer.resolveMemberAccessExpression(left)
|
|
349
|
+
const memberAccessMeaning = analyzer.resolveMemberAccessExpression(left);
|
|
300
350
|
if (memberAccessMeaning.kind === "instance-field-access" && memberAccessMeaning.field.getName().considerEqual(fieldName)) {
|
|
301
351
|
const receiver = unwrapParenthesizedExpressions(left.expression);
|
|
302
352
|
if (receiver.kind === 89 /* IdentifierExpression */) {
|
|
303
|
-
const receiverMeaning = analyzer.resolveIdentifierExpression(receiver)
|
|
353
|
+
const receiverMeaning = analyzer.resolveIdentifierExpression(receiver);
|
|
304
354
|
if (receiverMeaning.kind === "variable-access" && receiverMeaning.variable.getName().considerEqual(_AssignFieldService.receiverVariableName)) {
|
|
305
355
|
return statement;
|
|
306
356
|
}
|
|
@@ -337,7 +387,7 @@ var SyntaxFactory = class {
|
|
|
337
387
|
let equalsToken;
|
|
338
388
|
if (alias !== void 0) {
|
|
339
389
|
aliasIdentifier = this.createIdentifier(alias);
|
|
340
|
-
equalsToken = this.token(
|
|
390
|
+
equalsToken = this.token(57 /* Equals */);
|
|
341
391
|
}
|
|
342
392
|
const packageName = this.packageName(pathSegments);
|
|
343
393
|
const packageImport = new PackageImport(aliasIdentifier, equalsToken, packageName, void 0);
|
|
@@ -346,7 +396,7 @@ var SyntaxFactory = class {
|
|
|
346
396
|
}
|
|
347
397
|
static packageName(segments) {
|
|
348
398
|
const segmentIdentifiers = segments.map((s) => this.createIdentifier(s));
|
|
349
|
-
const packageNameParts = this.createTokenSeparatedElements(segmentIdentifiers,
|
|
399
|
+
const packageNameParts = this.createTokenSeparatedElements(segmentIdentifiers, 26 /* Dot */);
|
|
350
400
|
return new PackageName(packageNameParts, void 0);
|
|
351
401
|
}
|
|
352
402
|
static packageAliasTypeDeclaration(tags, modifiers, name, typeParameters, body) {
|
|
@@ -355,7 +405,7 @@ var SyntaxFactory = class {
|
|
|
355
405
|
const typeKeyword = this.keyword(16 /* Type */);
|
|
356
406
|
const nameIdentifier = this.createIdentifier(name);
|
|
357
407
|
const typeParameterClause = this.createTypeParameterClause(typeParameters);
|
|
358
|
-
const equalsToken = this.token(
|
|
408
|
+
const equalsToken = this.token(57 /* Equals */);
|
|
359
409
|
return new PackageAliasTypeDeclaration(
|
|
360
410
|
tagList,
|
|
361
411
|
modifierList,
|
|
@@ -378,9 +428,9 @@ var SyntaxFactory = class {
|
|
|
378
428
|
return new PackageMemberGroupDeclaration(
|
|
379
429
|
tagList,
|
|
380
430
|
modifierList,
|
|
381
|
-
this.token(
|
|
431
|
+
this.token(43 /* OpenBrace */),
|
|
382
432
|
declarationList,
|
|
383
|
-
this.token(
|
|
433
|
+
this.token(20 /* CloseBrace */),
|
|
384
434
|
void 0
|
|
385
435
|
);
|
|
386
436
|
}
|
|
@@ -410,7 +460,7 @@ var SyntaxFactory = class {
|
|
|
410
460
|
const typeKeyword = this.keyword(16 /* Type */);
|
|
411
461
|
const nameIdentifier = this.createIdentifier(name);
|
|
412
462
|
const typeParameterClause = this.createTypeParameterClause(typeParameters);
|
|
413
|
-
const equalsToken = this.token(
|
|
463
|
+
const equalsToken = this.token(57 /* Equals */);
|
|
414
464
|
return new PackageFunctionTypeDeclaration(
|
|
415
465
|
tagList,
|
|
416
466
|
modifierList,
|
|
@@ -440,7 +490,7 @@ var SyntaxFactory = class {
|
|
|
440
490
|
const typeKeyword = this.keyword(16 /* Type */);
|
|
441
491
|
const nameIdentifier = this.createIdentifier(name);
|
|
442
492
|
const typeParameterClause = this.createTypeParameterClause(typeParameters);
|
|
443
|
-
const equalsToken = this.token(
|
|
493
|
+
const equalsToken = this.token(57 /* Equals */);
|
|
444
494
|
return new PackageStructuredTypeDeclaration(
|
|
445
495
|
tagList,
|
|
446
496
|
modifierList,
|
|
@@ -454,7 +504,7 @@ var SyntaxFactory = class {
|
|
|
454
504
|
}
|
|
455
505
|
static structuredTypeDeclarationBody(structuredTypeKind, baseTypes, members) {
|
|
456
506
|
const structuredTypeKindKeyword = this.keyword(structuredTypeKind);
|
|
457
|
-
const baseTypeList = baseTypes !== void 0 && baseTypes.length > 0 ? new BaseTypeList(this.createTokenSeparatedElements(baseTypes,
|
|
507
|
+
const baseTypeList = baseTypes !== void 0 && baseTypes.length > 0 ? new BaseTypeList(this.createTokenSeparatedElements(baseTypes, 24 /* Comma */), void 0) : void 0;
|
|
458
508
|
const memberBlock = this.typeMemberDeclarationBlock(members);
|
|
459
509
|
return new StructuredTypeDeclarationBody(
|
|
460
510
|
structuredTypeKindKeyword,
|
|
@@ -470,7 +520,7 @@ var SyntaxFactory = class {
|
|
|
470
520
|
const typeAnnotation = this.createTypeAnnotation(typeSpecifier);
|
|
471
521
|
let equalsToken;
|
|
472
522
|
if (initializer !== void 0) {
|
|
473
|
-
equalsToken = this.token(
|
|
523
|
+
equalsToken = this.token(57 /* Equals */);
|
|
474
524
|
}
|
|
475
525
|
return new PackageVariableDeclaration(
|
|
476
526
|
tagList,
|
|
@@ -511,7 +561,7 @@ var SyntaxFactory = class {
|
|
|
511
561
|
const typeKeyword = this.keyword(16 /* Type */);
|
|
512
562
|
const nameIdentifier = this.createIdentifier(name);
|
|
513
563
|
const typeParameterClause = this.createTypeParameterClause(typeParameters);
|
|
514
|
-
const equalsToken = this.token(
|
|
564
|
+
const equalsToken = this.token(57 /* Equals */);
|
|
515
565
|
return new PackageVariantTypeDeclaration(
|
|
516
566
|
tagList,
|
|
517
567
|
modifierList,
|
|
@@ -535,7 +585,7 @@ var SyntaxFactory = class {
|
|
|
535
585
|
const typeAnnotation = this.createTypeAnnotation(typeSpecifier);
|
|
536
586
|
let equalsToken;
|
|
537
587
|
if (initializer !== void 0) {
|
|
538
|
-
equalsToken = this.token(
|
|
588
|
+
equalsToken = this.token(57 /* Equals */);
|
|
539
589
|
}
|
|
540
590
|
return new FieldDeclaration(
|
|
541
591
|
tagList,
|
|
@@ -635,42 +685,42 @@ var SyntaxFactory = class {
|
|
|
635
685
|
}
|
|
636
686
|
static typeMemberDeclarationBlock(members) {
|
|
637
687
|
return new TypeMemberDeclarationBlock(
|
|
638
|
-
this.token(
|
|
688
|
+
this.token(43 /* OpenBrace */),
|
|
639
689
|
new TypeMemberDeclarationList(members, void 0),
|
|
640
|
-
this.token(
|
|
690
|
+
this.token(20 /* CloseBrace */),
|
|
641
691
|
void 0
|
|
642
692
|
);
|
|
643
693
|
}
|
|
644
|
-
static
|
|
694
|
+
static variantValueDeclaration(tags, modifiers, name, value) {
|
|
645
695
|
const tagList = new TagList(tags, void 0);
|
|
646
696
|
const modifierList = new ModifierList(modifiers, void 0);
|
|
647
697
|
const nameIdentifier = this.createIdentifier(name);
|
|
648
698
|
let equalsToken;
|
|
649
699
|
if (value !== void 0) {
|
|
650
|
-
equalsToken = this.token(
|
|
700
|
+
equalsToken = this.token(57 /* Equals */);
|
|
651
701
|
}
|
|
652
|
-
return new
|
|
702
|
+
return new VariantValueDeclaration(tagList, modifierList, nameIdentifier, equalsToken, value, void 0);
|
|
653
703
|
}
|
|
654
704
|
static parameterClause(parameters) {
|
|
655
705
|
return new ParameterClause(
|
|
656
|
-
this.token(
|
|
657
|
-
new ParameterList(this.createTokenSeparatedElements(parameters,
|
|
658
|
-
this.token(
|
|
706
|
+
this.token(44 /* OpenParenthesis */),
|
|
707
|
+
new ParameterList(this.createTokenSeparatedElements(parameters, 24 /* Comma */), void 0),
|
|
708
|
+
this.token(21 /* CloseParenthesis */),
|
|
659
709
|
void 0
|
|
660
710
|
);
|
|
661
711
|
}
|
|
662
712
|
static indexParameterClause(indexParameters) {
|
|
663
713
|
return new IndexParameterClause(
|
|
664
|
-
this.token(
|
|
665
|
-
new ParameterList(this.createTokenSeparatedElements(indexParameters,
|
|
666
|
-
this.token(
|
|
714
|
+
this.token(45 /* OpenSquareBracket */),
|
|
715
|
+
new ParameterList(this.createTokenSeparatedElements(indexParameters, 24 /* Comma */), void 0),
|
|
716
|
+
this.token(22 /* CloseSquareBracket */),
|
|
667
717
|
void 0
|
|
668
718
|
);
|
|
669
719
|
}
|
|
670
720
|
static namedTypeSpecifier(name, typeArguments) {
|
|
671
721
|
const qualifiedNameIdentifiers = typeof name === "string" ? [this.createIdentifier(name)] : name.map((s) => this.createIdentifier(s));
|
|
672
722
|
const qualifiedName = new QualifiedName(
|
|
673
|
-
this.createTokenSeparatedElements(qualifiedNameIdentifiers,
|
|
723
|
+
this.createTokenSeparatedElements(qualifiedNameIdentifiers, 26 /* Dot */),
|
|
674
724
|
void 0
|
|
675
725
|
);
|
|
676
726
|
let typeArgumentClause;
|
|
@@ -680,21 +730,21 @@ var SyntaxFactory = class {
|
|
|
680
730
|
return new NamedTypeSpecifier(qualifiedName, typeArgumentClause, void 0);
|
|
681
731
|
}
|
|
682
732
|
static unionTypeSpecifier(typeSpecifiers) {
|
|
683
|
-
return new UnionTypeSpecifier(this.createTokenSeparatedElements(typeSpecifiers,
|
|
733
|
+
return new UnionTypeSpecifier(this.createTokenSeparatedElements(typeSpecifiers, 17 /* Bar */), void 0);
|
|
684
734
|
}
|
|
685
735
|
static intersectionTypeSpecifier(typeSpecifiers) {
|
|
686
736
|
return new IntersectionTypeSpecifier(this.createTokenSeparatedElements(
|
|
687
737
|
typeSpecifiers,
|
|
688
|
-
|
|
738
|
+
10 /* Ampersand */
|
|
689
739
|
), void 0);
|
|
690
740
|
}
|
|
691
741
|
static nullableTypeSpecifier(typeSpecifier) {
|
|
692
|
-
const questionToken = this.token(
|
|
742
|
+
const questionToken = this.token(49 /* Question */);
|
|
693
743
|
return new NullableTypeSpecifier(typeSpecifier, questionToken, void 0);
|
|
694
744
|
}
|
|
695
745
|
static parenthesizedTypeSpecifier(typeSpecifier) {
|
|
696
|
-
const openParenthesisToken = this.token(
|
|
697
|
-
const closeParenthesisToken = this.token(
|
|
746
|
+
const openParenthesisToken = this.token(44 /* OpenParenthesis */);
|
|
747
|
+
const closeParenthesisToken = this.token(21 /* CloseParenthesis */);
|
|
698
748
|
return new ParenthesizedTypeSpecifier(openParenthesisToken, typeSpecifier, closeParenthesisToken, void 0);
|
|
699
749
|
}
|
|
700
750
|
static anonymousStructuredTypeSpecifier(body) {
|
|
@@ -710,11 +760,11 @@ var SyntaxFactory = class {
|
|
|
710
760
|
const nameIdentifier = this.createIdentifier(name);
|
|
711
761
|
let colonToken;
|
|
712
762
|
if (constraint !== void 0) {
|
|
713
|
-
colonToken = this.token(
|
|
763
|
+
colonToken = this.token(23 /* Colon */);
|
|
714
764
|
}
|
|
715
765
|
let equalsToken;
|
|
716
766
|
if (defaultType !== void 0) {
|
|
717
|
-
equalsToken = this.token(
|
|
767
|
+
equalsToken = this.token(57 /* Equals */);
|
|
718
768
|
}
|
|
719
769
|
return new TypeParameterDeclaration(
|
|
720
770
|
nameIdentifier,
|
|
@@ -731,15 +781,15 @@ var SyntaxFactory = class {
|
|
|
731
781
|
const typeAnnotation = this.createTypeAnnotation(typeSpecifier);
|
|
732
782
|
let equalsToken;
|
|
733
783
|
if (defaultValue !== void 0) {
|
|
734
|
-
equalsToken = this.token(
|
|
784
|
+
equalsToken = this.token(57 /* Equals */);
|
|
735
785
|
}
|
|
736
786
|
return new ParameterDeclaration(tagList, nameIdentifier, typeAnnotation, equalsToken, defaultValue, void 0);
|
|
737
787
|
}
|
|
738
788
|
static tag(name, typeArguments, args) {
|
|
739
|
-
const hashSignToken = this.token(
|
|
789
|
+
const hashSignToken = this.token(35 /* HashSign */);
|
|
740
790
|
const qualifiedNameIdentifiers = typeof name === "string" ? [this.createIdentifier(name)] : name.map((s) => this.createIdentifier(s));
|
|
741
791
|
const qualifiedName = new QualifiedName(
|
|
742
|
-
this.createTokenSeparatedElements(qualifiedNameIdentifiers,
|
|
792
|
+
this.createTokenSeparatedElements(qualifiedNameIdentifiers, 26 /* Dot */),
|
|
743
793
|
void 0
|
|
744
794
|
);
|
|
745
795
|
const typeArgumentClause = typeArguments !== void 0 ? this.typeArgumentClause(typeArguments) : void 0;
|
|
@@ -747,12 +797,12 @@ var SyntaxFactory = class {
|
|
|
747
797
|
let argumentList;
|
|
748
798
|
let closeParenthesisToken;
|
|
749
799
|
if (args !== void 0) {
|
|
750
|
-
openParenthesisToken = this.token(
|
|
800
|
+
openParenthesisToken = this.token(44 /* OpenParenthesis */);
|
|
751
801
|
argumentList = new ArgumentList(
|
|
752
|
-
this.createTokenSeparatedElements(args,
|
|
802
|
+
this.createTokenSeparatedElements(args, 24 /* Comma */),
|
|
753
803
|
void 0
|
|
754
804
|
);
|
|
755
|
-
closeParenthesisToken = this.token(
|
|
805
|
+
closeParenthesisToken = this.token(21 /* CloseParenthesis */);
|
|
756
806
|
}
|
|
757
807
|
return new Tag(
|
|
758
808
|
hashSignToken,
|
|
@@ -770,39 +820,39 @@ var SyntaxFactory = class {
|
|
|
770
820
|
let levelKeyword;
|
|
771
821
|
let closeParenthesisToken;
|
|
772
822
|
if (level !== void 0) {
|
|
773
|
-
openParenthesisToken = this.token(
|
|
823
|
+
openParenthesisToken = this.token(44 /* OpenParenthesis */);
|
|
774
824
|
levelKeyword = this.keyword(level);
|
|
775
|
-
closeParenthesisToken = this.token(
|
|
825
|
+
closeParenthesisToken = this.token(21 /* CloseParenthesis */);
|
|
776
826
|
}
|
|
777
827
|
return new Modifier(valueKeyword, openParenthesisToken, levelKeyword, closeParenthesisToken, void 0);
|
|
778
828
|
}
|
|
779
829
|
static typeArgumentClause(typeArguments) {
|
|
780
|
-
const lessThanToken = this.token(
|
|
830
|
+
const lessThanToken = this.token(36 /* LessThan */);
|
|
781
831
|
const typeArgumentList = new TypeArgumentList(
|
|
782
|
-
this.createTokenSeparatedElements(typeArguments,
|
|
832
|
+
this.createTokenSeparatedElements(typeArguments, 24 /* Comma */),
|
|
783
833
|
void 0
|
|
784
834
|
);
|
|
785
|
-
const greaterThanToken = this.token(
|
|
835
|
+
const greaterThanToken = this.token(33 /* GreaterThan */);
|
|
786
836
|
return new TypeArgumentClause(lessThanToken, typeArgumentList, greaterThanToken, void 0);
|
|
787
837
|
}
|
|
788
838
|
static typeAnnotation(typeSpecifier) {
|
|
789
|
-
return new TypeAnnotation(this.token(
|
|
839
|
+
return new TypeAnnotation(this.token(23 /* Colon */), typeSpecifier, void 0);
|
|
790
840
|
}
|
|
791
841
|
static statementBlock(statements) {
|
|
792
|
-
const openBraceToken = this.token(
|
|
842
|
+
const openBraceToken = this.token(43 /* OpenBrace */);
|
|
793
843
|
const statementList = new StatementList(statements, void 0);
|
|
794
|
-
const closeBraceToken = this.token(
|
|
844
|
+
const closeBraceToken = this.token(20 /* CloseBrace */);
|
|
795
845
|
return new StatementBlock(openBraceToken, statementList, closeBraceToken, void 0);
|
|
796
846
|
}
|
|
797
847
|
static functionExpressionBlock(expression) {
|
|
798
|
-
const openBraceToken = this.token(
|
|
799
|
-
const closeBraceToken = this.token(
|
|
848
|
+
const openBraceToken = this.token(43 /* OpenBrace */);
|
|
849
|
+
const closeBraceToken = this.token(20 /* CloseBrace */);
|
|
800
850
|
return new FunctionBlock(openBraceToken, expression, closeBraceToken, void 0);
|
|
801
851
|
}
|
|
802
852
|
static functionStatementBlock(statements) {
|
|
803
|
-
const openBraceToken = this.token(
|
|
853
|
+
const openBraceToken = this.token(43 /* OpenBrace */);
|
|
804
854
|
const statementList = new StatementList(statements, void 0);
|
|
805
|
-
const closeBraceToken = this.token(
|
|
855
|
+
const closeBraceToken = this.token(20 /* CloseBrace */);
|
|
806
856
|
return new FunctionBlock(openBraceToken, statementList, closeBraceToken, void 0);
|
|
807
857
|
}
|
|
808
858
|
static nullLiteral() {
|
|
@@ -815,9 +865,9 @@ var SyntaxFactory = class {
|
|
|
815
865
|
const tagList = new TagList([], void 0);
|
|
816
866
|
const modifierList = new ModifierList([], void 0);
|
|
817
867
|
const translationsKeyword = this.keyword(55 /* Translations */);
|
|
818
|
-
const openBraceToken = this.token(
|
|
868
|
+
const openBraceToken = this.token(43 /* OpenBrace */);
|
|
819
869
|
const translationList = new TopLevelTranslationList(translations, void 0);
|
|
820
|
-
const closeBraceToken = this.token(
|
|
870
|
+
const closeBraceToken = this.token(20 /* CloseBrace */);
|
|
821
871
|
return new TranslationsDeclaration(
|
|
822
872
|
tagList,
|
|
823
873
|
modifierList,
|
|
@@ -830,7 +880,7 @@ var SyntaxFactory = class {
|
|
|
830
880
|
}
|
|
831
881
|
static packageVariableTranslation(sourceName, translatedName) {
|
|
832
882
|
const sourceNameIdentifier = this.createIdentifier(sourceName);
|
|
833
|
-
const minusGreaterThanToken = this.token(
|
|
883
|
+
const minusGreaterThanToken = this.token(42 /* MinusGreaterThan */);
|
|
834
884
|
const translatedNameIdentifier = this.createIdentifier(translatedName);
|
|
835
885
|
return new PackageVariableTranslationDeclaration(
|
|
836
886
|
sourceNameIdentifier,
|
|
@@ -844,7 +894,7 @@ var SyntaxFactory = class {
|
|
|
844
894
|
const sourceNameIdentifier = this.createIdentifier(sourceName);
|
|
845
895
|
const sourceTypeParameterClause = this.createTranslationTypeParameterClause(sourceTypeParameters);
|
|
846
896
|
const sourceParameterClause = this.translationParameterClause(sourceParameters);
|
|
847
|
-
const minusGreaterThanToken = this.token(
|
|
897
|
+
const minusGreaterThanToken = this.token(42 /* MinusGreaterThan */);
|
|
848
898
|
const translatedNameIdentifier = this.createIdentifier(translatedName);
|
|
849
899
|
const translatedTypeParameterClause = this.createTranslationTypeParameterClause(translatedTypeParameters);
|
|
850
900
|
const translatedParameterClause = this.translationParameterClause(translatedParameters);
|
|
@@ -864,16 +914,16 @@ var SyntaxFactory = class {
|
|
|
864
914
|
const typeKeyword = this.keyword(16 /* Type */);
|
|
865
915
|
const sourceNameIdentifier = this.createIdentifier(sourceName);
|
|
866
916
|
const sourceTypeParameterClause = this.createTranslationTypeParameterClause(sourceTypeParameters);
|
|
867
|
-
const minusGreaterThanToken = this.token(
|
|
917
|
+
const minusGreaterThanToken = this.token(42 /* MinusGreaterThan */);
|
|
868
918
|
const translatedNameIdentifier = this.createIdentifier(translatedName);
|
|
869
919
|
const translatedTypeParameterClause = this.createTranslationTypeParameterClause(translatedTypeParameters);
|
|
870
920
|
let openBraceToken;
|
|
871
921
|
let memberList;
|
|
872
922
|
let closeBraceToken;
|
|
873
923
|
if (members !== void 0) {
|
|
874
|
-
openBraceToken = this.token(
|
|
924
|
+
openBraceToken = this.token(43 /* OpenBrace */);
|
|
875
925
|
memberList = new TypeMemberTranslationList(members, void 0);
|
|
876
|
-
closeBraceToken = this.token(
|
|
926
|
+
closeBraceToken = this.token(20 /* CloseBrace */);
|
|
877
927
|
}
|
|
878
928
|
return new TypeTranslationDeclaration(
|
|
879
929
|
typeKeyword,
|
|
@@ -893,7 +943,7 @@ var SyntaxFactory = class {
|
|
|
893
943
|
const sourceNameIdentifier = this.createIdentifier(sourceName);
|
|
894
944
|
const sourceTypeParameterClause = this.createTranslationTypeParameterClause(sourceTypeParameters);
|
|
895
945
|
const sourceParameterClause = this.translationParameterClause(sourceParameters);
|
|
896
|
-
const minusGreaterThanToken = this.token(
|
|
946
|
+
const minusGreaterThanToken = this.token(42 /* MinusGreaterThan */);
|
|
897
947
|
const translatedNameIdentifier = this.createIdentifier(translatedName);
|
|
898
948
|
const translatedTypeParameterClause = this.createTranslationTypeParameterClause(translatedTypeParameters);
|
|
899
949
|
const translatedParameterClause = this.translationParameterClause(translatedParameters);
|
|
@@ -911,7 +961,7 @@ var SyntaxFactory = class {
|
|
|
911
961
|
}
|
|
912
962
|
static fieldOrVariantTranslation(sourceName, translatedName) {
|
|
913
963
|
const sourceNameIdentifier = this.createIdentifier(sourceName);
|
|
914
|
-
const minusGreaterThanToken = this.token(
|
|
964
|
+
const minusGreaterThanToken = this.token(42 /* MinusGreaterThan */);
|
|
915
965
|
const translatedNameIdentifier = this.createIdentifier(translatedName);
|
|
916
966
|
return new FieldOrVariantTranslation(
|
|
917
967
|
sourceNameIdentifier,
|
|
@@ -925,7 +975,7 @@ var SyntaxFactory = class {
|
|
|
925
975
|
const sourceNameIdentifier = this.createIdentifier(sourceName);
|
|
926
976
|
const sourceTypeParameterClause = this.createTranslationTypeParameterClause(sourceTypeParameters);
|
|
927
977
|
const sourceParameterClause = this.translationParameterClause(sourceParameters);
|
|
928
|
-
const minusGreaterThanToken = this.token(
|
|
978
|
+
const minusGreaterThanToken = this.token(42 /* MinusGreaterThan */);
|
|
929
979
|
const translatedNameIdentifier = this.createIdentifier(translatedName);
|
|
930
980
|
const translatedTypeParameterClause = this.createTranslationTypeParameterClause(translatedTypeParameters);
|
|
931
981
|
const translatedParameterClause = this.translationParameterClause(translatedParameters);
|
|
@@ -944,7 +994,7 @@ var SyntaxFactory = class {
|
|
|
944
994
|
static constructorTranslation(sourceParameters, translatedParameters) {
|
|
945
995
|
const creationKeyword = this.keyword(31 /* Creation */);
|
|
946
996
|
const sourceParameterClause = this.translationParameterClause(sourceParameters);
|
|
947
|
-
const minusGreaterThanToken = this.token(
|
|
997
|
+
const minusGreaterThanToken = this.token(42 /* MinusGreaterThan */);
|
|
948
998
|
const translatedParameterClause = this.translationParameterClause(translatedParameters);
|
|
949
999
|
return new ConstructorTranslation(
|
|
950
1000
|
creationKeyword,
|
|
@@ -956,7 +1006,7 @@ var SyntaxFactory = class {
|
|
|
956
1006
|
}
|
|
957
1007
|
static indexerTranslation(sourceParameters, translatedParameters) {
|
|
958
1008
|
const sourceParameterClause = this.indexParameterTranslationClause(sourceParameters);
|
|
959
|
-
const minusGreaterThanToken = this.token(
|
|
1009
|
+
const minusGreaterThanToken = this.token(42 /* MinusGreaterThan */);
|
|
960
1010
|
const translatedParameterClause = this.indexParameterTranslationClause(translatedParameters);
|
|
961
1011
|
return new IndexerTranslation(
|
|
962
1012
|
sourceParameterClause,
|
|
@@ -966,21 +1016,21 @@ var SyntaxFactory = class {
|
|
|
966
1016
|
);
|
|
967
1017
|
}
|
|
968
1018
|
static translationParameterClause(parameters) {
|
|
969
|
-
const openParenthesisToken = this.token(
|
|
1019
|
+
const openParenthesisToken = this.token(44 /* OpenParenthesis */);
|
|
970
1020
|
const parameterList = new TranslationParameterList(
|
|
971
|
-
this.createTokenSeparatedElements(parameters.map((p) => this.createIdentifier(p)),
|
|
1021
|
+
this.createTokenSeparatedElements(parameters.map((p) => this.createIdentifier(p)), 24 /* Comma */),
|
|
972
1022
|
void 0
|
|
973
1023
|
);
|
|
974
|
-
const closeParenthesisToken = this.token(
|
|
1024
|
+
const closeParenthesisToken = this.token(21 /* CloseParenthesis */);
|
|
975
1025
|
return new TranslationParameterClause(openParenthesisToken, parameterList, closeParenthesisToken, void 0);
|
|
976
1026
|
}
|
|
977
1027
|
static indexParameterTranslationClause(parameters) {
|
|
978
|
-
const openSquareBracketToken = this.token(
|
|
1028
|
+
const openSquareBracketToken = this.token(45 /* OpenSquareBracket */);
|
|
979
1029
|
const parameterList = new TranslationParameterList(
|
|
980
|
-
this.createTokenSeparatedElements(parameters.map((p) => this.createIdentifier(p)),
|
|
1030
|
+
this.createTokenSeparatedElements(parameters.map((p) => this.createIdentifier(p)), 24 /* Comma */),
|
|
981
1031
|
void 0
|
|
982
1032
|
);
|
|
983
|
-
const closeSquareBracketToken = this.token(
|
|
1033
|
+
const closeSquareBracketToken = this.token(22 /* CloseSquareBracket */);
|
|
984
1034
|
return new IndexParameterTranslationClause(
|
|
985
1035
|
openSquareBracketToken,
|
|
986
1036
|
parameterList,
|
|
@@ -1000,9 +1050,9 @@ var SyntaxFactory = class {
|
|
|
1000
1050
|
return void 0;
|
|
1001
1051
|
}
|
|
1002
1052
|
return new TypeParameterClause(
|
|
1003
|
-
this.token(
|
|
1004
|
-
new TypeParameterList(this.createTokenSeparatedElements(typeParameters,
|
|
1005
|
-
this.token(
|
|
1053
|
+
this.token(36 /* LessThan */),
|
|
1054
|
+
new TypeParameterList(this.createTokenSeparatedElements(typeParameters, 24 /* Comma */), void 0),
|
|
1055
|
+
this.token(33 /* GreaterThan */),
|
|
1006
1056
|
void 0
|
|
1007
1057
|
);
|
|
1008
1058
|
}
|
|
@@ -1011,12 +1061,12 @@ var SyntaxFactory = class {
|
|
|
1011
1061
|
return void 0;
|
|
1012
1062
|
}
|
|
1013
1063
|
return new TranslationTypeParameterClause(
|
|
1014
|
-
this.token(
|
|
1064
|
+
this.token(36 /* LessThan */),
|
|
1015
1065
|
new TranslationTypeParameterList(
|
|
1016
|
-
this.createTokenSeparatedElements(typeParameters.map((p) => this.createIdentifier(p)),
|
|
1066
|
+
this.createTokenSeparatedElements(typeParameters.map((p) => this.createIdentifier(p)), 24 /* Comma */),
|
|
1017
1067
|
void 0
|
|
1018
1068
|
),
|
|
1019
|
-
this.token(
|
|
1069
|
+
this.token(33 /* GreaterThan */),
|
|
1020
1070
|
void 0
|
|
1021
1071
|
);
|
|
1022
1072
|
}
|
|
@@ -1024,11 +1074,11 @@ var SyntaxFactory = class {
|
|
|
1024
1074
|
if (typeSpecifier === void 0) {
|
|
1025
1075
|
return void 0;
|
|
1026
1076
|
}
|
|
1027
|
-
return new TypeAnnotation(this.token(
|
|
1077
|
+
return new TypeAnnotation(this.token(23 /* Colon */), typeSpecifier, void 0);
|
|
1028
1078
|
}
|
|
1029
1079
|
static createIdentifier(value) {
|
|
1030
1080
|
if (typeof value === "string") {
|
|
1031
|
-
return new Token(
|
|
1081
|
+
return new Token(9 /* Identifier */, value, [], [], 0 /* None */, void 0, void 0);
|
|
1032
1082
|
}
|
|
1033
1083
|
return value;
|
|
1034
1084
|
}
|
|
@@ -1414,7 +1464,7 @@ var SyntaxToCode = class _SyntaxToCode {
|
|
|
1414
1464
|
this.writeDeclarationBody(node.block);
|
|
1415
1465
|
}
|
|
1416
1466
|
}
|
|
1417
|
-
|
|
1467
|
+
writeVariantValueDeclaration(node) {
|
|
1418
1468
|
this.writeDeclarationTags(node.tagList);
|
|
1419
1469
|
this.writeDeclarationModifiers(node.modifierList);
|
|
1420
1470
|
this.writeToken(node.name);
|
|
@@ -1875,7 +1925,7 @@ var SyntaxToCode = class _SyntaxToCode {
|
|
|
1875
1925
|
let isPreviousElementSemicolon = false;
|
|
1876
1926
|
for (let i = 0; i < elements.length; i++) {
|
|
1877
1927
|
const element = elements[i];
|
|
1878
|
-
if (element.kind === 0 /* Token */ && element.tokenKind ===
|
|
1928
|
+
if (element.kind === 0 /* Token */ && element.tokenKind === 51 /* Semicolon */) {
|
|
1879
1929
|
this.writeToken(element);
|
|
1880
1930
|
isPreviousElementSemicolon = true;
|
|
1881
1931
|
} else {
|
|
@@ -1893,7 +1943,7 @@ var SyntaxToCode = class _SyntaxToCode {
|
|
|
1893
1943
|
writeCommaSeparatedList(elements, writeNonCommaElement) {
|
|
1894
1944
|
for (let i = 0; i < elements.length; i++) {
|
|
1895
1945
|
const element = elements[i];
|
|
1896
|
-
if (element.kind === 0 /* Token */ && element.tokenKind ===
|
|
1946
|
+
if (element.kind === 0 /* Token */ && element.tokenKind === 24 /* Comma */) {
|
|
1897
1947
|
this.writeToken(element);
|
|
1898
1948
|
} else {
|
|
1899
1949
|
if (i > 0) {
|
|
@@ -1924,7 +1974,7 @@ var SyntaxToCode = class _SyntaxToCode {
|
|
|
1924
1974
|
this.writeCode(tokenKindValues[token.tokenKind]);
|
|
1925
1975
|
} else {
|
|
1926
1976
|
let value = token.value;
|
|
1927
|
-
if (token.tokenKind ===
|
|
1977
|
+
if (token.tokenKind === 9 /* Identifier */) {
|
|
1928
1978
|
if (value.startsWith("'") && value.endsWith("'")) {
|
|
1929
1979
|
value = `'${this.escapeLiteralIdentifier(value.substring(1, value.length - 1))}'`;
|
|
1930
1980
|
} else if (this.singleWordKeywordValues.has(value)) {
|
|
@@ -2022,7 +2072,7 @@ var SyntaxToCode = class _SyntaxToCode {
|
|
|
2022
2072
|
[94 /* StatementBlock */]: this.prototype.writeStatementBlock,
|
|
2023
2073
|
[95 /* FunctionBlock */]: this.prototype.writeFunctionBlock,
|
|
2024
2074
|
[135 /* QualifiedName */]: this.prototype.writeQualifiedName,
|
|
2025
|
-
[147 /*
|
|
2075
|
+
[147 /* VariantValueDeclaration */]: this.prototype.writeVariantValueDeclaration,
|
|
2026
2076
|
[148 /* TypeParameterDeclaration */]: this.prototype.writeTypeParameterDeclaration,
|
|
2027
2077
|
[149 /* ParameterDeclaration */]: this.prototype.writeParameterDeclaration,
|
|
2028
2078
|
[150 /* Argument */]: this.prototype.writeArgument,
|
|
@@ -2287,7 +2337,7 @@ var TokenOrKeywordsTouchingOffset_two = class {
|
|
|
2287
2337
|
this.kind = "two";
|
|
2288
2338
|
}
|
|
2289
2339
|
getSinglePrioritizingNamed() {
|
|
2290
|
-
if (this.left.isToken(
|
|
2340
|
+
if (this.left.isToken(9 /* Identifier */) || this.left.isKeyword()) {
|
|
2291
2341
|
return this.left;
|
|
2292
2342
|
}
|
|
2293
2343
|
return this.right;
|
|
@@ -2317,7 +2367,7 @@ var TranslationsGenerationService = class {
|
|
|
2317
2367
|
return void 0;
|
|
2318
2368
|
}
|
|
2319
2369
|
let result;
|
|
2320
|
-
if (tokenOrKeyword.isToken(
|
|
2370
|
+
if (tokenOrKeyword.isToken(9 /* Identifier */) && tokenOrKeyword.parent.kind === 139 /* TypeTranslationDeclaration */ && tokenOrKeyword.value === tokenOrKeyword.parent.sourceName) {
|
|
2321
2371
|
const translationPackage = analyzer.getAnalyzedTranslationPackageIfTargetResolved(sourceFile.package);
|
|
2322
2372
|
if (translationPackage !== void 0) {
|
|
2323
2373
|
const generator = new TranslationsGenerator(
|
|
@@ -2687,7 +2737,7 @@ var CodeActionsService = class {
|
|
|
2687
2737
|
}
|
|
2688
2738
|
const result = new Array();
|
|
2689
2739
|
const diagnosticCodeSet = new Set(diagnosticCodes);
|
|
2690
|
-
if (diagnosticCodeSet.has(
|
|
2740
|
+
if (diagnosticCodeSet.has(2087 /* TheFollowingDeclarationsAreNotTranslated0 */) || diagnosticCodeSet.has(2088 /* TheFollowingDeclarationsAreNotTranslated0And1More */)) {
|
|
2691
2741
|
const data = { onlyTypeMembers: false };
|
|
2692
2742
|
result.push(CodeAction.unresolved(
|
|
2693
2743
|
"\u0421\u0433\u0435\u043D\u0435\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0430\u044E\u0449\u0438\u0435 \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u044B.",
|
|
@@ -2799,7 +2849,7 @@ var SignatureForNode = class _SignatureForNode {
|
|
|
2799
2849
|
}
|
|
2800
2850
|
}
|
|
2801
2851
|
static getSignaturesForCallExpression(analyzer, node) {
|
|
2802
|
-
const meaning = analyzer.resolveCallExpression(node)
|
|
2852
|
+
const meaning = analyzer.resolveCallExpression(node);
|
|
2803
2853
|
switch (meaning.kind) {
|
|
2804
2854
|
case "function-call": {
|
|
2805
2855
|
let suitableSignatureIndex;
|
|
@@ -2890,7 +2940,7 @@ var SignatureForNode = class _SignatureForNode {
|
|
|
2890
2940
|
return void 0;
|
|
2891
2941
|
}
|
|
2892
2942
|
static getSignaturesForIndexedAccessExpression(analyzer, node) {
|
|
2893
|
-
const meaning = analyzer.resolveIndexedAccessExpression(node)
|
|
2943
|
+
const meaning = analyzer.resolveIndexedAccessExpression(node);
|
|
2894
2944
|
switch (meaning.kind) {
|
|
2895
2945
|
case "resolved": {
|
|
2896
2946
|
let suitableSignatureIndex;
|
|
@@ -3179,7 +3229,7 @@ var CompletionService = class {
|
|
|
3179
3229
|
}
|
|
3180
3230
|
createPositionDescription(sourceFile, offset) {
|
|
3181
3231
|
let token = getPrecedingToken(sourceFile, offset);
|
|
3182
|
-
if (token?.tokenKind ===
|
|
3232
|
+
if (token?.tokenKind === 9 /* Identifier */ && offset === token.rangeWithoutTrivia.end) {
|
|
3183
3233
|
token = getPrecedingToken(sourceFile, offset - 1);
|
|
3184
3234
|
}
|
|
3185
3235
|
let result;
|
|
@@ -3203,7 +3253,7 @@ var CompletionService = class {
|
|
|
3203
3253
|
if (positionDescription.kind !== "after-token-or-keyword") {
|
|
3204
3254
|
return { kind: "none" };
|
|
3205
3255
|
}
|
|
3206
|
-
if (syntaxContext.isInComment || syntaxContext.
|
|
3256
|
+
if (syntaxContext.isInComment || syntaxContext.isInText) {
|
|
3207
3257
|
return { kind: "none" };
|
|
3208
3258
|
}
|
|
3209
3259
|
if (syntaxContext.isInQuotedIdentifier !== void 0 && (syntaxContext.isInQuotedIdentifier.parent.kind === 51 /* OperatorDeclaration */ || syntaxContext.isInQuotedIdentifier.parent.kind === 50 /* MethodDeclaration */)) {
|
|
@@ -3213,18 +3263,18 @@ var CompletionService = class {
|
|
|
3213
3263
|
if (tokenOrKeyword.isKeyword(18 /* Import */) && tokenOrKeyword.parent.kind === 5 /* SinglePackageImportDirective */) {
|
|
3214
3264
|
return new PackageImportCompletionContext([], void 0);
|
|
3215
3265
|
}
|
|
3216
|
-
if (tokenOrKeyword.isToken(
|
|
3266
|
+
if (tokenOrKeyword.isToken(57 /* Equals */) && tokenOrKeyword.parent.kind === 8 /* PackageImport */) {
|
|
3217
3267
|
return new PackageImportCompletionContext([], void 0);
|
|
3218
3268
|
}
|
|
3219
|
-
if (tokenOrKeyword.isToken(
|
|
3269
|
+
if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 9 /* PackageName */) {
|
|
3220
3270
|
const packageImport = tokenOrKeyword.parent.parent;
|
|
3221
3271
|
const precedingSegmentNames = packageImport.packageName.segments.takeWhile((s) => s.rangeWithTrivia.start < tokenOrKeyword.value.rangeWithTrivia.start).map((p) => this.analyzer.createNameFromIdentifier(p)).toArray();
|
|
3222
3272
|
return new PackageImportCompletionContext(precedingSegmentNames, void 0);
|
|
3223
3273
|
}
|
|
3224
|
-
if (tokenOrKeyword.isToken(
|
|
3274
|
+
if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || this.tokenOrKeywordIsPackageImportListChild(tokenOrKeyword)) {
|
|
3225
3275
|
return new PackageImportCompletionContext([], void 0);
|
|
3226
3276
|
}
|
|
3227
|
-
if (tokenOrKeyword.isToken(
|
|
3277
|
+
if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 76 /* MemberAccessExpression */) {
|
|
3228
3278
|
const memberAccess = tokenOrKeyword.parent;
|
|
3229
3279
|
{
|
|
3230
3280
|
const packageTreeNode = this.analyzer.getDenotedPackageNameTreeNode(memberAccess.expression);
|
|
@@ -3254,7 +3304,7 @@ var CompletionService = class {
|
|
|
3254
3304
|
const hidingMatcher = semanticContext.getHidingMatcher();
|
|
3255
3305
|
return new TypeMemberCompletionContext(type, isStaticAccess, hidingMatcher, semanticContext);
|
|
3256
3306
|
}
|
|
3257
|
-
if (tokenOrKeyword.isToken(
|
|
3307
|
+
if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 135 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 10 /* NamedTypeSpecifier */) {
|
|
3258
3308
|
const namedTypeSpecifier = tokenOrKeyword.parent.parent;
|
|
3259
3309
|
const resolutionResult = this.analyzer.resolveNamedTypeSpecifier(namedTypeSpecifier);
|
|
3260
3310
|
const segmentIndex = Math.floor(
|
|
@@ -3293,7 +3343,7 @@ var CompletionService = class {
|
|
|
3293
3343
|
}
|
|
3294
3344
|
return { kind: "none" };
|
|
3295
3345
|
}
|
|
3296
|
-
if (tokenOrKeyword.isToken(
|
|
3346
|
+
if (tokenOrKeyword.isToken(26 /* Dot */) && tokenOrKeyword.parent.kind === 135 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 152 /* Tag */) {
|
|
3297
3347
|
const tag = tokenOrKeyword.parent.parent;
|
|
3298
3348
|
const resolutionResult = this.analyzer.resolveTag(tag);
|
|
3299
3349
|
const segmentIndex = Math.floor(
|
|
@@ -3590,7 +3640,7 @@ var CompletionService = class {
|
|
|
3590
3640
|
return result;
|
|
3591
3641
|
}
|
|
3592
3642
|
getKeywordCompletionItemInfos(syntaxContext, semanticContext, positionDescription) {
|
|
3593
|
-
if (syntaxContext.isInComment || syntaxContext.
|
|
3643
|
+
if (syntaxContext.isInComment || syntaxContext.isInText) {
|
|
3594
3644
|
return [];
|
|
3595
3645
|
}
|
|
3596
3646
|
const kinds = /* @__PURE__ */ new Set();
|
|
@@ -3661,41 +3711,41 @@ var CompletionService = class {
|
|
|
3661
3711
|
return false;
|
|
3662
3712
|
}
|
|
3663
3713
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3664
|
-
return tokenOrKeyword.isToken(
|
|
3714
|
+
return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 115 /* LoopStatement */;
|
|
3665
3715
|
}
|
|
3666
3716
|
isModifierLevelContext(positionDescription) {
|
|
3667
3717
|
if (positionDescription.kind !== "after-token-or-keyword") {
|
|
3668
3718
|
return false;
|
|
3669
3719
|
}
|
|
3670
3720
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3671
|
-
return tokenOrKeyword.isToken(
|
|
3721
|
+
return tokenOrKeyword.isToken(44 /* OpenParenthesis */) && tokenOrKeyword.parent.kind === 154 /* Modifier */;
|
|
3672
3722
|
}
|
|
3673
3723
|
isElseOrElseIfKeywordContext(positionDescription) {
|
|
3674
3724
|
if (positionDescription.kind !== "after-token-or-keyword") {
|
|
3675
3725
|
return false;
|
|
3676
3726
|
}
|
|
3677
3727
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3678
|
-
return tokenOrKeyword.isToken(
|
|
3728
|
+
return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 108 /* IfStatement */ && tokenOrKeyword.parent === tokenOrKeyword.parent.parent.block || tokenOrKeyword.parent.parent.kind === 110 /* ElseIfClause */);
|
|
3679
3729
|
}
|
|
3680
3730
|
isCatchKeywordContext(positionDescription) {
|
|
3681
3731
|
if (positionDescription.kind !== "after-token-or-keyword") {
|
|
3682
3732
|
return false;
|
|
3683
3733
|
}
|
|
3684
3734
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3685
|
-
return tokenOrKeyword.isToken(
|
|
3735
|
+
return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 100 /* TryStatement */;
|
|
3686
3736
|
}
|
|
3687
3737
|
isFinallyKeywordContext(positionDescription) {
|
|
3688
3738
|
if (positionDescription.kind !== "after-token-or-keyword") {
|
|
3689
3739
|
return false;
|
|
3690
3740
|
}
|
|
3691
3741
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3692
|
-
return tokenOrKeyword.isToken(
|
|
3742
|
+
return tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 100 /* TryStatement */ || tokenOrKeyword.parent.parent.kind === 101 /* CatchClause */);
|
|
3693
3743
|
}
|
|
3694
3744
|
isTypeKindCompletionContext(positionDescription) {
|
|
3695
|
-
return positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(
|
|
3745
|
+
return positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(57 /* Equals */) && NodeTypeUtils.isPackageTypeDeclaration(positionDescription.tokenOrKeyword.parent);
|
|
3696
3746
|
}
|
|
3697
3747
|
isFromKeywordContext(positionDescription) {
|
|
3698
|
-
if (!(positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(
|
|
3748
|
+
if (!(positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(9 /* Identifier */))) {
|
|
3699
3749
|
return false;
|
|
3700
3750
|
}
|
|
3701
3751
|
const token = positionDescription.tokenOrKeyword.value;
|
|
@@ -3706,7 +3756,7 @@ var CompletionService = class {
|
|
|
3706
3756
|
return false;
|
|
3707
3757
|
}
|
|
3708
3758
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3709
|
-
if (tokenOrKeyword.isToken(
|
|
3759
|
+
if (tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 120 /* CaseClause */) {
|
|
3710
3760
|
return true;
|
|
3711
3761
|
}
|
|
3712
3762
|
if (syntaxContext.precedingExpression !== void 0 && syntaxContext.precedingExpression.parent.kind === 118 /* SwitchStatement */) {
|
|
@@ -4922,9 +4972,9 @@ var OperatorNameCompletionItemInfo = class {
|
|
|
4922
4972
|
}
|
|
4923
4973
|
};
|
|
4924
4974
|
var SyntaxContext = class {
|
|
4925
|
-
constructor(isInComment,
|
|
4975
|
+
constructor(isInComment, isInText, isInQuotedIdentifier, isPackageMemberDeclarationListContext, isTypeMemberDeclarationListContext, isStatementContext, isExpressionContext, precedingExpression, isUnqualifiedTypeContext, isUnqualifiedTagNameCompletionContext, isTopLevelTranslationListContext, isTypeMemberTranslationListContext) {
|
|
4926
4976
|
this.isInComment = isInComment;
|
|
4927
|
-
this.
|
|
4977
|
+
this.isInText = isInText;
|
|
4928
4978
|
this.isInQuotedIdentifier = isInQuotedIdentifier;
|
|
4929
4979
|
this.isPackageMemberDeclarationListContext = isPackageMemberDeclarationListContext;
|
|
4930
4980
|
this.isTypeMemberDeclarationListContext = isTypeMemberDeclarationListContext;
|
|
@@ -4983,7 +5033,7 @@ var ExpressionRole_other = class {
|
|
|
4983
5033
|
var SyntaxContextFactory = class {
|
|
4984
5034
|
static fromPositionDescription(sourceFile, positionDescription) {
|
|
4985
5035
|
const isInComment = this.isInComment(sourceFile, positionDescription.getOffset());
|
|
4986
|
-
const
|
|
5036
|
+
const isInText = this.isInText(sourceFile, positionDescription.getOffset());
|
|
4987
5037
|
const isInQuotedIdentifier = this.isInQuotedIdentifier(sourceFile, positionDescription.getOffset());
|
|
4988
5038
|
let isPackageMemberDeclarationListContext = false;
|
|
4989
5039
|
if (positionDescription.kind === "at-file-start") {
|
|
@@ -5010,7 +5060,7 @@ var SyntaxContextFactory = class {
|
|
|
5010
5060
|
if (positionDescription.kind === "after-token-or-keyword") {
|
|
5011
5061
|
isUnqualifiedTypeContext = this.isUnqualifiedTypeContext(positionDescription.tokenOrKeyword);
|
|
5012
5062
|
}
|
|
5013
|
-
const isUnqualifiedTagNameCompletionContext = positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(
|
|
5063
|
+
const isUnqualifiedTagNameCompletionContext = positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(35 /* HashSign */) && positionDescription.tokenOrKeyword.parent.kind === 152 /* Tag */;
|
|
5014
5064
|
let isTopLevelTranslationListContext;
|
|
5015
5065
|
if (positionDescription.kind === "after-token-or-keyword") {
|
|
5016
5066
|
isTopLevelTranslationListContext = this.isTopLevelTranslationListContext(positionDescription.tokenOrKeyword);
|
|
@@ -5021,7 +5071,7 @@ var SyntaxContextFactory = class {
|
|
|
5021
5071
|
}
|
|
5022
5072
|
return new SyntaxContext(
|
|
5023
5073
|
isInComment,
|
|
5024
|
-
|
|
5074
|
+
isInText,
|
|
5025
5075
|
isInQuotedIdentifier,
|
|
5026
5076
|
isPackageMemberDeclarationListContext,
|
|
5027
5077
|
isTypeMemberDeclarationListContext,
|
|
@@ -5035,7 +5085,7 @@ var SyntaxContextFactory = class {
|
|
|
5035
5085
|
);
|
|
5036
5086
|
}
|
|
5037
5087
|
static isExpressionOrStatementContext(tokenOrKeyword) {
|
|
5038
|
-
if (tokenOrKeyword.isToken(
|
|
5088
|
+
if (tokenOrKeyword.isToken(57 /* Equals */)) {
|
|
5039
5089
|
if (tokenOrKeyword.parent.kind === 92 /* AssignmentStatement */) {
|
|
5040
5090
|
const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.right);
|
|
5041
5091
|
return { isExpressionContext: { expressionRole }, isStatementContext: false };
|
|
@@ -5060,7 +5110,7 @@ var SyntaxContextFactory = class {
|
|
|
5060
5110
|
const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.value);
|
|
5061
5111
|
return { isExpressionContext: { expressionRole }, isStatementContext: false };
|
|
5062
5112
|
}
|
|
5063
|
-
if (tokenOrKeyword.parent.kind === 147 /*
|
|
5113
|
+
if (tokenOrKeyword.parent.kind === 147 /* VariantValueDeclaration */) {
|
|
5064
5114
|
const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.value);
|
|
5065
5115
|
return { isExpressionContext: { expressionRole }, isStatementContext: false };
|
|
5066
5116
|
}
|
|
@@ -5077,11 +5127,11 @@ var SyntaxContextFactory = class {
|
|
|
5077
5127
|
const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.right);
|
|
5078
5128
|
return { isExpressionContext: { expressionRole }, isStatementContext: false };
|
|
5079
5129
|
}
|
|
5080
|
-
if (tokenOrKeyword.isToken(
|
|
5130
|
+
if (tokenOrKeyword.isToken(6 /* TextTemplateHead */) && (tokenOrKeyword.parent.kind === 79 /* TextTemplateLiteral */ || tokenOrKeyword.parent.kind === 80 /* LocalizableTextTemplateLiteral */)) {
|
|
5081
5131
|
const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.spanList.spans.at(0)?.expression);
|
|
5082
5132
|
return { isExpressionContext: { expressionRole }, isStatementContext: false };
|
|
5083
5133
|
}
|
|
5084
|
-
if (tokenOrKeyword.isToken(
|
|
5134
|
+
if (tokenOrKeyword.isToken(7 /* TextTemplatePart */) && tokenOrKeyword.parent.kind === 82 /* TextTemplateSpan */) {
|
|
5085
5135
|
let expressionForTargetType;
|
|
5086
5136
|
const spanList = tokenOrKeyword.parent.parent;
|
|
5087
5137
|
const spanIndex = spanList.spans.indexOf(tokenOrKeyword.parent);
|
|
@@ -5093,10 +5143,10 @@ var SyntaxContextFactory = class {
|
|
|
5093
5143
|
isStatementContext: false
|
|
5094
5144
|
};
|
|
5095
5145
|
}
|
|
5096
|
-
if (tokenOrKeyword.isToken(
|
|
5146
|
+
if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 94 /* StatementBlock */) {
|
|
5097
5147
|
return { isExpressionContext: { expressionRole: new ExpressionRole_other(void 0) }, isStatementContext: true };
|
|
5098
5148
|
}
|
|
5099
|
-
if (tokenOrKeyword.isToken(
|
|
5149
|
+
if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 95 /* FunctionBlock */) {
|
|
5100
5150
|
const block = tokenOrKeyword.parent;
|
|
5101
5151
|
if (block.expressionOrStatementList.kind !== 93 /* StatementList */ || block.expressionOrStatementList.statements.count() === 0) {
|
|
5102
5152
|
return {
|
|
@@ -5110,10 +5160,10 @@ var SyntaxContextFactory = class {
|
|
|
5110
5160
|
};
|
|
5111
5161
|
}
|
|
5112
5162
|
}
|
|
5113
|
-
if (tokenOrKeyword.isToken(
|
|
5163
|
+
if (tokenOrKeyword.isToken(51 /* Semicolon */) && tokenOrKeyword.parent.kind === 93 /* StatementList */) {
|
|
5114
5164
|
return { isExpressionContext: { expressionRole: new ExpressionRole_other(void 0) }, isStatementContext: true };
|
|
5115
5165
|
}
|
|
5116
|
-
if (tokenOrKeyword.isToken(
|
|
5166
|
+
if (tokenOrKeyword.isToken(44 /* OpenParenthesis */)) {
|
|
5117
5167
|
if (tokenOrKeyword.parent.kind === 73 /* ParenthesizedExpression */) {
|
|
5118
5168
|
const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
|
|
5119
5169
|
return { isExpressionContext: { expressionRole }, isStatementContext: false };
|
|
@@ -5142,15 +5192,15 @@ var SyntaxContextFactory = class {
|
|
|
5142
5192
|
return { isExpressionContext: { expressionRole }, isStatementContext: false };
|
|
5143
5193
|
}
|
|
5144
5194
|
}
|
|
5145
|
-
if (tokenOrKeyword.isToken(
|
|
5195
|
+
if (tokenOrKeyword.isToken(45 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 70 /* IndexedAccessExpression */) {
|
|
5146
5196
|
const expressionRole = new ExpressionRole_argument(tokenOrKeyword.parent.argumentList, 0);
|
|
5147
5197
|
return { isExpressionContext: { expressionRole }, isStatementContext: false };
|
|
5148
5198
|
}
|
|
5149
|
-
if (tokenOrKeyword.isToken(
|
|
5199
|
+
if (tokenOrKeyword.isToken(45 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 59 /* ArrayLiteral */) {
|
|
5150
5200
|
const expressionRole = new ExpressionRole_arrayElement(tokenOrKeyword.parent);
|
|
5151
5201
|
return { isExpressionContext: { expressionRole }, isStatementContext: false };
|
|
5152
5202
|
}
|
|
5153
|
-
if (tokenOrKeyword.isToken(
|
|
5203
|
+
if (tokenOrKeyword.isToken(24 /* Comma */)) {
|
|
5154
5204
|
if (tokenOrKeyword.parent.kind === 67 /* ArgumentList */) {
|
|
5155
5205
|
const argumentList = tokenOrKeyword.parent;
|
|
5156
5206
|
let index = 0;
|
|
@@ -5245,16 +5295,16 @@ var SyntaxContextFactory = class {
|
|
|
5245
5295
|
return { isExpressionContext: void 0, isStatementContext: false };
|
|
5246
5296
|
}
|
|
5247
5297
|
static isPackageMemberDeclarationListContext(tokenOrKeyword) {
|
|
5248
|
-
if (tokenOrKeyword.isToken(
|
|
5298
|
+
if (tokenOrKeyword.isToken(51 /* Semicolon */) && (tokenOrKeyword.parent.kind === 2 /* PackageMemberDeclarationList */ || tokenOrKeyword.parent.kind === 4 /* PackageImportDirectiveList */)) {
|
|
5249
5299
|
return true;
|
|
5250
5300
|
}
|
|
5251
|
-
if (tokenOrKeyword.isToken(
|
|
5301
|
+
if (tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 30 /* TypeMemberDeclarationBlock */ && (tokenOrKeyword.parent.parent.kind === 38 /* TypeExtensionDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 31 /* PackageStructuredTypeDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 36 /* PackageVariantTypeDeclaration */ || tokenOrKeyword.parent.parent.parent.kind === 20 /* PackageAliasTypeDeclaration */)) {
|
|
5252
5302
|
return true;
|
|
5253
5303
|
}
|
|
5254
|
-
if (tokenOrKeyword.isToken(
|
|
5304
|
+
if (tokenOrKeyword.isToken(20 /* CloseBrace */) && (tokenOrKeyword.parent.kind === 123 /* TranslationsDeclaration */ || tokenOrKeyword.parent.kind === 22 /* PackageMemberGroupDeclaration */ || tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || tokenOrKeyword.parent.kind === 95 /* FunctionBlock */ && (tokenOrKeyword.parent.parent.kind === 23 /* PackageConstructorDeclaration */ || tokenOrKeyword.parent.parent.kind === 24 /* PackageEntryPointDeclaration */ || tokenOrKeyword.parent.parent.kind === 25 /* PackageFunctionDeclaration */))) {
|
|
5255
5305
|
return true;
|
|
5256
5306
|
}
|
|
5257
|
-
if (tokenOrKeyword.isToken(
|
|
5307
|
+
if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 22 /* PackageMemberGroupDeclaration */) {
|
|
5258
5308
|
return true;
|
|
5259
5309
|
}
|
|
5260
5310
|
if (SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 5 /* SinglePackageImportDirective */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 25 /* PackageFunctionDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 26 /* PackageFunctionTypeDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 20 /* PackageAliasTypeDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 33 /* PackageVariableDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
|
|
@@ -5266,7 +5316,7 @@ var SyntaxContextFactory = class {
|
|
|
5266
5316
|
if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 154 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
|
|
5267
5317
|
return true;
|
|
5268
5318
|
}
|
|
5269
|
-
if (tokenOrKeyword.isToken(
|
|
5319
|
+
if (tokenOrKeyword.isToken(21 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 154 /* Modifier */ && NodeTypeUtils.isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
|
|
5270
5320
|
return true;
|
|
5271
5321
|
}
|
|
5272
5322
|
const tag = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 152 /* Tag */);
|
|
@@ -5276,13 +5326,13 @@ var SyntaxContextFactory = class {
|
|
|
5276
5326
|
return false;
|
|
5277
5327
|
}
|
|
5278
5328
|
static isTypeMemberDeclarationListContext(tokenOrKeyword) {
|
|
5279
|
-
if (tokenOrKeyword.isToken(
|
|
5329
|
+
if (tokenOrKeyword.isToken(51 /* Semicolon */) && tokenOrKeyword.parent.kind === 29 /* TypeMemberDeclarationList */) {
|
|
5280
5330
|
return true;
|
|
5281
5331
|
}
|
|
5282
|
-
if (tokenOrKeyword.isToken(
|
|
5332
|
+
if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 30 /* TypeMemberDeclarationBlock */) {
|
|
5283
5333
|
return true;
|
|
5284
5334
|
}
|
|
5285
|
-
if (tokenOrKeyword.isToken(
|
|
5335
|
+
if (tokenOrKeyword.isToken(20 /* CloseBrace */) && tokenOrKeyword.parent.kind === 30 /* TypeMemberDeclarationBlock */ && tokenOrKeyword.parent.parent.kind === 42 /* TypeMemberGroupDeclaration */) {
|
|
5286
5336
|
return true;
|
|
5287
5337
|
}
|
|
5288
5338
|
if (SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 52 /* FieldDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 53 /* FieldGetterDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 54 /* FieldSetterDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
|
|
@@ -5297,13 +5347,13 @@ var SyntaxContextFactory = class {
|
|
|
5297
5347
|
) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(
|
|
5298
5348
|
tokenOrKeyword,
|
|
5299
5349
|
49 /* DereferencedVariableSetterDeclaration */
|
|
5300
|
-
) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 50 /* MethodDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 51 /* OperatorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 43 /* ConstructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 44 /* DestructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 147 /*
|
|
5350
|
+
) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 50 /* MethodDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 51 /* OperatorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 43 /* ConstructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 44 /* DestructorDeclaration */) || SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, 147 /* VariantValueDeclaration */)) {
|
|
5301
5351
|
return true;
|
|
5302
5352
|
}
|
|
5303
5353
|
if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 154 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
|
|
5304
5354
|
return true;
|
|
5305
5355
|
}
|
|
5306
|
-
if (tokenOrKeyword.isToken(
|
|
5356
|
+
if (tokenOrKeyword.isToken(21 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 154 /* Modifier */ && NodeTypeUtils.isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
|
|
5307
5357
|
return true;
|
|
5308
5358
|
}
|
|
5309
5359
|
const tag = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 152 /* Tag */);
|
|
@@ -5325,12 +5375,12 @@ var SyntaxContextFactory = class {
|
|
|
5325
5375
|
}
|
|
5326
5376
|
return trivia !== void 0 && offset > trivia.range.start && (trivia.kind === 2 /* SingleLineComment */ || trivia.kind === 3 /* MultiLineComment */);
|
|
5327
5377
|
}
|
|
5328
|
-
static
|
|
5378
|
+
static isInText(sourceFile, offset) {
|
|
5329
5379
|
let token = getTokenAtOffset(sourceFile.getSyntaxNode(), offset, false);
|
|
5330
5380
|
if (token?.tokenKind === 1 /* EndOfFile */ && token.rangeWithTrivia.isEmpty) {
|
|
5331
5381
|
token = getTokenAtOffset(sourceFile.getSyntaxNode(), offset - 1, false);
|
|
5332
5382
|
}
|
|
5333
|
-
return token !== void 0 && offset > token.rangeWithoutTrivia.start && (token.tokenKind ===
|
|
5383
|
+
return token !== void 0 && offset > token.rangeWithoutTrivia.start && (token.tokenKind === 5 /* TextLiteral */ || token.tokenKind === 6 /* TextTemplateHead */ || token.tokenKind === 7 /* TextTemplatePart */ || token.tokenKind === 8 /* TextTemplateTail */);
|
|
5334
5384
|
}
|
|
5335
5385
|
static isInQuotedIdentifier(sourceFile, offset) {
|
|
5336
5386
|
let result;
|
|
@@ -5344,7 +5394,7 @@ var SyntaxContextFactory = class {
|
|
|
5344
5394
|
return result;
|
|
5345
5395
|
}
|
|
5346
5396
|
static isUnqualifiedTypeContext(tokenOrKeyword) {
|
|
5347
|
-
if (tokenOrKeyword.isToken(
|
|
5397
|
+
if (tokenOrKeyword.isToken(23 /* Colon */) && tokenOrKeyword.parent.kind === 161 /* TypeAnnotation */) {
|
|
5348
5398
|
return { allowsAnonymousTypes: true };
|
|
5349
5399
|
}
|
|
5350
5400
|
if ((tokenOrKeyword.isKeyword(4 /* Object */) || tokenOrKeyword.isKeyword(5 /* PlainObject */) || tokenOrKeyword.isKeyword(3 /* Aspect */)) && tokenOrKeyword.parent.kind === 32 /* StructuredTypeDeclarationBody */) {
|
|
@@ -5353,19 +5403,19 @@ var SyntaxContextFactory = class {
|
|
|
5353
5403
|
if (tokenOrKeyword.isKeyword(16 /* Type */) && (NodeTypeUtils.isPackageTypeDeclaration(tokenOrKeyword.parent) || tokenOrKeyword.parent.kind === 38 /* TypeExtensionDeclaration */)) {
|
|
5354
5404
|
return { allowsAnonymousTypes: false };
|
|
5355
5405
|
}
|
|
5356
|
-
if (tokenOrKeyword.isToken(
|
|
5406
|
+
if (tokenOrKeyword.isToken(36 /* LessThan */) && tokenOrKeyword.parent.kind === 157 /* TypeArgumentClause */) {
|
|
5357
5407
|
return { allowsAnonymousTypes: true };
|
|
5358
5408
|
}
|
|
5359
|
-
if (tokenOrKeyword.isToken(
|
|
5409
|
+
if (tokenOrKeyword.isToken(24 /* Comma */) && (tokenOrKeyword.parent.kind === 28 /* BaseTypeList */ || tokenOrKeyword.parent.kind === 158 /* TypeArgumentList */)) {
|
|
5360
5410
|
return { allowsAnonymousTypes: tokenOrKeyword.parent.kind === 158 /* TypeArgumentList */ };
|
|
5361
5411
|
}
|
|
5362
|
-
if (tokenOrKeyword.isToken(
|
|
5412
|
+
if (tokenOrKeyword.isToken(35 /* HashSign */) && tokenOrKeyword.parent.kind === 152 /* Tag */) {
|
|
5363
5413
|
return { allowsAnonymousTypes: false };
|
|
5364
5414
|
}
|
|
5365
|
-
if ((tokenOrKeyword.isToken(
|
|
5415
|
+
if ((tokenOrKeyword.isToken(23 /* Colon */) || tokenOrKeyword.isToken(57 /* Equals */)) && tokenOrKeyword.parent.kind === 148 /* TypeParameterDeclaration */) {
|
|
5366
5416
|
return { allowsAnonymousTypes: false };
|
|
5367
5417
|
}
|
|
5368
|
-
if (tokenOrKeyword.isToken(
|
|
5418
|
+
if (tokenOrKeyword.isToken(57 /* Equals */) && tokenOrKeyword.parent.kind === 20 /* PackageAliasTypeDeclaration */) {
|
|
5369
5419
|
return { allowsAnonymousTypes: false };
|
|
5370
5420
|
}
|
|
5371
5421
|
if (tokenOrKeyword.isKeyword(14 /* Is */) && tokenOrKeyword.parent.kind === 72 /* IsExpression */) {
|
|
@@ -5374,22 +5424,22 @@ var SyntaxContextFactory = class {
|
|
|
5374
5424
|
if (tokenOrKeyword.isKeyword(42 /* As */) && tokenOrKeyword.parent.kind === 63 /* AsExpression */) {
|
|
5375
5425
|
return { allowsAnonymousTypes: true };
|
|
5376
5426
|
}
|
|
5377
|
-
if (tokenOrKeyword.isToken(
|
|
5427
|
+
if (tokenOrKeyword.isToken(17 /* Bar */) && tokenOrKeyword.parent.kind === 11 /* UnionTypeSpecifier */) {
|
|
5378
5428
|
return { allowsAnonymousTypes: false };
|
|
5379
5429
|
}
|
|
5380
|
-
if (tokenOrKeyword.isToken(
|
|
5430
|
+
if (tokenOrKeyword.isToken(10 /* Ampersand */) && tokenOrKeyword.parent.kind === 12 /* IntersectionTypeSpecifier */) {
|
|
5381
5431
|
return { allowsAnonymousTypes: false };
|
|
5382
5432
|
}
|
|
5383
|
-
if (tokenOrKeyword.isToken(
|
|
5433
|
+
if (tokenOrKeyword.isToken(44 /* OpenParenthesis */) && tokenOrKeyword.parent.kind === 13 /* ParenthesizedTypeSpecifier */) {
|
|
5384
5434
|
return { allowsAnonymousTypes: true };
|
|
5385
5435
|
}
|
|
5386
5436
|
return void 0;
|
|
5387
5437
|
}
|
|
5388
5438
|
static isTopLevelTranslationListContext(tokenOrKeyword) {
|
|
5389
|
-
if (tokenOrKeyword.isToken(
|
|
5439
|
+
if (tokenOrKeyword.isToken(51 /* Semicolon */) && tokenOrKeyword.parent.kind === 124 /* TopLevelTranslationList */) {
|
|
5390
5440
|
return { translationsDeclaration: tokenOrKeyword.parent.parent };
|
|
5391
5441
|
}
|
|
5392
|
-
if (tokenOrKeyword.isToken(
|
|
5442
|
+
if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 123 /* TranslationsDeclaration */) {
|
|
5393
5443
|
return { translationsDeclaration: tokenOrKeyword.parent };
|
|
5394
5444
|
}
|
|
5395
5445
|
const type = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
|
|
@@ -5423,10 +5473,10 @@ var SyntaxContextFactory = class {
|
|
|
5423
5473
|
return void 0;
|
|
5424
5474
|
}
|
|
5425
5475
|
static isTypeMemberTranslationListContext(tokenOrKeyword) {
|
|
5426
|
-
if (tokenOrKeyword.isToken(
|
|
5476
|
+
if (tokenOrKeyword.isToken(51 /* Semicolon */) && tokenOrKeyword.parent.kind === 138 /* TypeMemberTranslationList */) {
|
|
5427
5477
|
return { typeTranslation: tokenOrKeyword.parent.parent };
|
|
5428
5478
|
}
|
|
5429
|
-
if (tokenOrKeyword.isToken(
|
|
5479
|
+
if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 139 /* TypeTranslationDeclaration */) {
|
|
5430
5480
|
return { typeTranslation: tokenOrKeyword.parent };
|
|
5431
5481
|
}
|
|
5432
5482
|
const indexer = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 129 /* IndexerTranslation */);
|
|
@@ -5568,35 +5618,35 @@ var NodeSemanticInfoService = class {
|
|
|
5568
5618
|
return this.ofPrefixUnaryExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
|
|
5569
5619
|
} else if (tokenOrKeyword.parent.kind === 64 /* BinaryExpression */) {
|
|
5570
5620
|
return this.ofBinaryExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
|
|
5571
|
-
} else if (tokenOrKeyword.isToken(
|
|
5621
|
+
} else if (tokenOrKeyword.isToken(19 /* Caret */) && (tokenOrKeyword.parent.kind === 48 /* DereferencedVariableGetterDeclaration */ || tokenOrKeyword.parent.kind === 49 /* DereferencedVariableSetterDeclaration */)) {
|
|
5572
5622
|
return this.ofDereferenceOperatorDeclaration(analyzer, tokenOrKeyword.parent);
|
|
5573
|
-
} else if (tokenOrKeyword.isToken(
|
|
5623
|
+
} else if (tokenOrKeyword.isToken(19 /* Caret */) && tokenOrKeyword.parent.kind === 78 /* DereferenceExpression */) {
|
|
5574
5624
|
return this.ofDereferenceExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
|
|
5575
5625
|
} else if (tokenOrKeyword.parent.kind === 92 /* AssignmentStatement */) {
|
|
5576
5626
|
return this.ofAssignmentStatementOperator(analyzer, tokenOrKeyword.parent, options7);
|
|
5577
5627
|
} else if (tokenOrKeyword.isKeyword(31 /* Creation */) && tokenOrKeyword.parent.kind === 43 /* ConstructorDeclaration */) {
|
|
5578
5628
|
return this.ofConstructorDeclaration(analyzer, tokenOrKeyword.parent);
|
|
5579
|
-
} else if (tokenOrKeyword.isToken(
|
|
5629
|
+
} else if (tokenOrKeyword.isToken(13 /* Asterisk */) && tokenOrKeyword.parent.kind === 91 /* DefaultMatchExpression */) {
|
|
5580
5630
|
return this.ofDefaultMatchExpression(analyzer, tokenOrKeyword.parent);
|
|
5581
5631
|
} else if (tokenOrKeyword.isKeyword(12 /* Function */) && tokenOrKeyword.parent.kind === 65 /* FunctionLiteral */) {
|
|
5582
5632
|
return this.ofRegularOrBlockFunctionLiteral(analyzer, tokenOrKeyword.parent);
|
|
5583
|
-
} else if (tokenOrKeyword.isToken(
|
|
5633
|
+
} else if (tokenOrKeyword.isToken(43 /* OpenBrace */) && tokenOrKeyword.parent.kind === 95 /* FunctionBlock */ && tokenOrKeyword.parent.parent.kind === 66 /* FunctionBlockLiteral */) {
|
|
5584
5634
|
return this.ofRegularOrBlockFunctionLiteral(analyzer, tokenOrKeyword.parent.parent);
|
|
5585
5635
|
} else if (tokenOrKeyword.isKeyword(4 /* Object */) && tokenOrKeyword.parent.kind === 87 /* ObjectExpression */) {
|
|
5586
5636
|
return this.ofObjectExpression(analyzer, tokenOrKeyword.parent, options7);
|
|
5587
5637
|
} else if (tokenOrKeyword.isKeyword(56 /* Base */) && tokenOrKeyword.parent.kind === 88 /* BaseExpression */) {
|
|
5588
5638
|
return this.ofBaseExpression(analyzer, tokenOrKeyword.parent, options7);
|
|
5589
|
-
} else if ((tokenOrKeyword.isToken(
|
|
5639
|
+
} else if ((tokenOrKeyword.isToken(45 /* OpenSquareBracket */) || tokenOrKeyword.isToken(22 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 47 /* IndexParameterClause */) {
|
|
5590
5640
|
return this.ofIndexedElementAccessorDeclaration(analyzer, tokenOrKeyword.parent.parent);
|
|
5591
|
-
} else if ((tokenOrKeyword.isToken(
|
|
5641
|
+
} else if ((tokenOrKeyword.isToken(45 /* OpenSquareBracket */) || tokenOrKeyword.isToken(22 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 70 /* IndexedAccessExpression */) {
|
|
5592
5642
|
return this.ofIndexedAccessExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
|
|
5593
5643
|
} else if (tokenOrKeyword.isKeyword(31 /* Creation */) && tokenOrKeyword.parent.kind === 127 /* ConstructorTranslation */) {
|
|
5594
5644
|
return this.ofConstructorTranslationSourceConstructor(analyzer, tokenOrKeyword.parent, options7);
|
|
5595
|
-
} else if ((tokenOrKeyword.isToken(
|
|
5645
|
+
} else if ((tokenOrKeyword.isToken(44 /* OpenParenthesis */) || tokenOrKeyword.isToken(21 /* CloseParenthesis */)) && tokenOrKeyword.parent.kind === 126 /* TranslationParameterClause */ && tokenOrKeyword.parent.parent.kind === 127 /* ConstructorTranslation */ && tokenOrKeyword.parent.parent.translatedParameterClause === tokenOrKeyword.parent) {
|
|
5596
5646
|
return this.ofConstructorTranslationTranslatedConstructor(analyzer, tokenOrKeyword.parent.parent, options7);
|
|
5597
|
-
} else if ((tokenOrKeyword.isToken(
|
|
5647
|
+
} else if ((tokenOrKeyword.isToken(45 /* OpenSquareBracket */) || tokenOrKeyword.isToken(22 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 128 /* IndexParameterTranslationClause */ && tokenOrKeyword.parent.parent.kind === 129 /* IndexerTranslation */ && tokenOrKeyword.parent.parent.sourceParameterClause === tokenOrKeyword.parent) {
|
|
5598
5648
|
return this.ofIndexerTranslationSourceIndexer(analyzer, tokenOrKeyword.parent.parent, options7);
|
|
5599
|
-
} else if ((tokenOrKeyword.isToken(
|
|
5649
|
+
} else if ((tokenOrKeyword.isToken(45 /* OpenSquareBracket */) || tokenOrKeyword.isToken(22 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 128 /* IndexParameterTranslationClause */ && tokenOrKeyword.parent.parent.kind === 129 /* IndexerTranslation */ && tokenOrKeyword.parent.parent.translatedParameterClause === tokenOrKeyword.parent) {
|
|
5600
5650
|
return this.ofIndexerTranslationTranslatedIndexer(analyzer, tokenOrKeyword.parent.parent, options7);
|
|
5601
5651
|
}
|
|
5602
5652
|
return void 0;
|
|
@@ -5738,8 +5788,8 @@ var NodeSemanticInfoService = class {
|
|
|
5738
5788
|
case 148 /* TypeParameterDeclaration */:
|
|
5739
5789
|
result = new DefinitionNodeSemanticInfo(analyzer.entity.ofTypeParameterDeclaration(parent));
|
|
5740
5790
|
break;
|
|
5741
|
-
case 147 /*
|
|
5742
|
-
result = new DefinitionNodeSemanticInfo(analyzer.entity.
|
|
5791
|
+
case 147 /* VariantValueDeclaration */:
|
|
5792
|
+
result = new DefinitionNodeSemanticInfo(analyzer.entity.ofVariantValueDeclaration(parent));
|
|
5743
5793
|
break;
|
|
5744
5794
|
case 34 /* PackageVariableGetterDeclaration */:
|
|
5745
5795
|
case 35 /* PackageVariableSetterDeclaration */:
|
|
@@ -5762,7 +5812,7 @@ var NodeSemanticInfoService = class {
|
|
|
5762
5812
|
}
|
|
5763
5813
|
static ofMember(analyzer, node, options7) {
|
|
5764
5814
|
let result;
|
|
5765
|
-
const meaning = analyzer.resolveMemberAccessExpression(node)
|
|
5815
|
+
const meaning = analyzer.resolveMemberAccessExpression(node);
|
|
5766
5816
|
switch (meaning.kind) {
|
|
5767
5817
|
case "instance-field-access": {
|
|
5768
5818
|
let narrowedType;
|
|
@@ -6044,7 +6094,7 @@ var NodeSemanticInfoService = class {
|
|
|
6044
6094
|
}
|
|
6045
6095
|
static ofIdentifierExpression(analyzer, node, options7) {
|
|
6046
6096
|
let result;
|
|
6047
|
-
const meaning = analyzer.resolveIdentifierExpression(node)
|
|
6097
|
+
const meaning = analyzer.resolveIdentifierExpression(node);
|
|
6048
6098
|
switch (meaning.kind) {
|
|
6049
6099
|
case "type-access":
|
|
6050
6100
|
if (meaning.suitableTypes.length > 0) {
|
|
@@ -6168,7 +6218,7 @@ var NodeSemanticInfoService = class {
|
|
|
6168
6218
|
return new DefinitionNodeSemanticInfo(entity);
|
|
6169
6219
|
}
|
|
6170
6220
|
static ofIndexedAccessExpressionOperator(analyzer, node, options7) {
|
|
6171
|
-
const meaning = analyzer.resolveIndexedAccessExpression(node)
|
|
6221
|
+
const meaning = analyzer.resolveIndexedAccessExpression(node);
|
|
6172
6222
|
if (meaning.kind === "resolved") {
|
|
6173
6223
|
let result;
|
|
6174
6224
|
if (isNonEmptyArray(meaning.suitableIndexers)) {
|
|
@@ -6195,8 +6245,8 @@ var NodeSemanticInfoService = class {
|
|
|
6195
6245
|
const operatorKind = analyzer.getBinaryOperatorKindIfCompoundAssignmentOperator(node.operator);
|
|
6196
6246
|
if (operatorKind !== void 0) {
|
|
6197
6247
|
const operator = analyzer.resolveCompoundAssignmentStatementOperator(node, operatorKind);
|
|
6198
|
-
if (operator
|
|
6199
|
-
const target = new OperatorReferenceTarget(operator
|
|
6248
|
+
if (operator !== void 0) {
|
|
6249
|
+
const target = new OperatorReferenceTarget(operator);
|
|
6200
6250
|
let result = new ReferenceNodeSemanticInfo([target], false);
|
|
6201
6251
|
if (options7.includeBetterReferenceTargets) {
|
|
6202
6252
|
result = this.getBetterReferenceTargetsOrPreserve(result);
|
|
@@ -6210,8 +6260,8 @@ var NodeSemanticInfoService = class {
|
|
|
6210
6260
|
const classificationResult = analyzer.classifyBinaryExpressionOperator(node.operator);
|
|
6211
6261
|
if (classificationResult.kind === "user-definable") {
|
|
6212
6262
|
const operator = analyzer.resolveBinaryExpressionUserDefinableOperator(node, classificationResult.operatorKind);
|
|
6213
|
-
if (operator
|
|
6214
|
-
const target = new OperatorReferenceTarget(operator
|
|
6263
|
+
if (operator !== void 0) {
|
|
6264
|
+
const target = new OperatorReferenceTarget(operator);
|
|
6215
6265
|
let result = new ReferenceNodeSemanticInfo([target], false);
|
|
6216
6266
|
if (options7.includeBetterReferenceTargets) {
|
|
6217
6267
|
result = this.getBetterReferenceTargetsOrPreserve(result);
|
|
@@ -6223,8 +6273,8 @@ var NodeSemanticInfoService = class {
|
|
|
6223
6273
|
}
|
|
6224
6274
|
static ofPrefixUnaryExpressionOperator(analyzer, node, options7) {
|
|
6225
6275
|
const operator = analyzer.resolvePrefixUnaryExpressionUserDefinableOperator(node);
|
|
6226
|
-
if (operator
|
|
6227
|
-
const target = new OperatorReferenceTarget(operator
|
|
6276
|
+
if (operator !== void 0) {
|
|
6277
|
+
const target = new OperatorReferenceTarget(operator);
|
|
6228
6278
|
let result = new ReferenceNodeSemanticInfo([target], false);
|
|
6229
6279
|
if (options7.includeBetterReferenceTargets) {
|
|
6230
6280
|
result = this.getBetterReferenceTargetsOrPreserve(result);
|
|
@@ -6269,7 +6319,7 @@ var NodeSemanticInfoService = class {
|
|
|
6269
6319
|
return result;
|
|
6270
6320
|
}
|
|
6271
6321
|
static ofObjectExpression(analyzer, node, options7) {
|
|
6272
|
-
const meaning = analyzer.resolveObjectExpression(node)
|
|
6322
|
+
const meaning = analyzer.resolveObjectExpression(node);
|
|
6273
6323
|
let result;
|
|
6274
6324
|
switch (meaning.kind) {
|
|
6275
6325
|
case "own-constructor-access": {
|
|
@@ -6301,7 +6351,7 @@ var NodeSemanticInfoService = class {
|
|
|
6301
6351
|
return result;
|
|
6302
6352
|
}
|
|
6303
6353
|
static ofBaseExpression(analyzer, node, options7) {
|
|
6304
|
-
const meaning = analyzer.resolveBaseExpression(node)
|
|
6354
|
+
const meaning = analyzer.resolveBaseExpression(node);
|
|
6305
6355
|
let result;
|
|
6306
6356
|
switch (meaning.kind) {
|
|
6307
6357
|
case "base-constructor-access": {
|
|
@@ -6400,7 +6450,7 @@ var NodeSemanticInfoService = class {
|
|
|
6400
6450
|
static ofPackageNameSegmentAccess(analyzer, packageTreeNode, node) {
|
|
6401
6451
|
let parent = getParentSkippingParenthesizedExpressions(node);
|
|
6402
6452
|
while (parent.kind === 76 /* MemberAccessExpression */) {
|
|
6403
|
-
const meaning = analyzer.resolveMemberAccessExpression(parent)
|
|
6453
|
+
const meaning = analyzer.resolveMemberAccessExpression(parent);
|
|
6404
6454
|
if (meaning.kind === "package-name-segment-access") {
|
|
6405
6455
|
packageTreeNode = meaning.packageTreeNode;
|
|
6406
6456
|
parent = getParentSkippingParenthesizedExpressions(parent);
|
|
@@ -6854,9 +6904,9 @@ var DefinitionService = class {
|
|
|
6854
6904
|
getDefinition(analyzer, sourceFile, offset, taskController) {
|
|
6855
6905
|
return __async(this, null, function* () {
|
|
6856
6906
|
const tokenOrKeyword = getTokenOrKeywordsTouchingOffset(sourceFile.getSyntaxNode(), offset).getSingleWithHighestPriority((t) => {
|
|
6857
|
-
if (t.isToken(
|
|
6907
|
+
if (t.isToken(9 /* Identifier */) || t.isKeyword()) {
|
|
6858
6908
|
return 2;
|
|
6859
|
-
} else if (t.isToken(
|
|
6909
|
+
} else if (t.isToken(19 /* Caret */) || t.isToken(45 /* OpenSquareBracket */) || t.isToken(22 /* CloseSquareBracket */)) {
|
|
6860
6910
|
return 1;
|
|
6861
6911
|
} else {
|
|
6862
6912
|
return 0;
|
|
@@ -7411,9 +7461,9 @@ var ReferencesService = class {
|
|
|
7411
7461
|
}
|
|
7412
7462
|
getReferencedDefinitionInfosAtOffset(analyzer, sourceFile, offset, options7) {
|
|
7413
7463
|
const tokenOrKeyword = getTokenOrKeywordsTouchingOffset(sourceFile.getSyntaxNode(), offset).getSingleWithHighestPriority((t) => {
|
|
7414
|
-
if (t.isToken(
|
|
7464
|
+
if (t.isToken(9 /* Identifier */) || t.isKeyword()) {
|
|
7415
7465
|
return 2;
|
|
7416
|
-
} else if (t.isToken(
|
|
7466
|
+
} else if (t.isToken(19 /* Caret */) || t.isToken(45 /* OpenSquareBracket */) || t.isToken(22 /* CloseSquareBracket */)) {
|
|
7417
7467
|
return 1;
|
|
7418
7468
|
} else {
|
|
7419
7469
|
return 0;
|
|
@@ -7755,7 +7805,7 @@ var EvaluatableExpressionService = class {
|
|
|
7755
7805
|
if (isIdentifier(node)) {
|
|
7756
7806
|
let originalName;
|
|
7757
7807
|
if (node.parent.kind === 76 /* MemberAccessExpression */) {
|
|
7758
|
-
const meaning = analyzer.resolveMemberAccessExpression(node.parent)
|
|
7808
|
+
const meaning = analyzer.resolveMemberAccessExpression(node.parent);
|
|
7759
7809
|
let entity;
|
|
7760
7810
|
switch (meaning.kind) {
|
|
7761
7811
|
case "static-field-access":
|
|
@@ -7773,7 +7823,7 @@ var EvaluatableExpressionService = class {
|
|
|
7773
7823
|
}
|
|
7774
7824
|
originalName = entity?.getOriginalEntity().getName().keyWithoutBackQuotes;
|
|
7775
7825
|
} else if (node.parent.kind === 89 /* IdentifierExpression */) {
|
|
7776
|
-
const meaning = analyzer.resolveIdentifierExpression(node.parent)
|
|
7826
|
+
const meaning = analyzer.resolveIdentifierExpression(node.parent);
|
|
7777
7827
|
let entity;
|
|
7778
7828
|
switch (meaning.kind) {
|
|
7779
7829
|
case "variable-access":
|
|
@@ -7846,7 +7896,7 @@ var EvaluatableExpressionService = class {
|
|
|
7846
7896
|
case 50 /* MethodDeclaration */:
|
|
7847
7897
|
case 52 /* FieldDeclaration */:
|
|
7848
7898
|
case 148 /* TypeParameterDeclaration */:
|
|
7849
|
-
case 147 /*
|
|
7899
|
+
case 147 /* VariantValueDeclaration */:
|
|
7850
7900
|
case 102 /* ErrorVariableDeclaration */:
|
|
7851
7901
|
case 34 /* PackageVariableGetterDeclaration */:
|
|
7852
7902
|
case 35 /* PackageVariableSetterDeclaration */:
|
|
@@ -7924,11 +7974,11 @@ var FileSystemTreeDisplayService = class _FileSystemTreeDisplayService {
|
|
|
7924
7974
|
var HoverService = class {
|
|
7925
7975
|
getHover(analyzer, sourceFile, offset) {
|
|
7926
7976
|
const tokenOrKeyword = getTokenOrKeywordsTouchingOffset(sourceFile.getSyntaxNode(), offset).getSingleWithHighestPriority((t) => {
|
|
7927
|
-
if (t.isToken(
|
|
7977
|
+
if (t.isToken(9 /* Identifier */) || t.isKeyword()) {
|
|
7928
7978
|
return 2;
|
|
7929
|
-
} else if (t.isToken(
|
|
7979
|
+
} else if (t.isToken(13 /* Asterisk */)) {
|
|
7930
7980
|
return 1;
|
|
7931
|
-
} else if (t.isToken(
|
|
7981
|
+
} else if (t.isToken(19 /* Caret */) || t.isToken(45 /* OpenSquareBracket */) || t.isToken(22 /* CloseSquareBracket */) || t.isToken(43 /* OpenBrace */)) {
|
|
7932
7982
|
return 1;
|
|
7933
7983
|
} else {
|
|
7934
7984
|
return 0;
|
|
@@ -8243,9 +8293,9 @@ var SourceFileItemsService = class {
|
|
|
8243
8293
|
));
|
|
8244
8294
|
break;
|
|
8245
8295
|
}
|
|
8246
|
-
case 147 /*
|
|
8296
|
+
case 147 /* VariantValueDeclaration */: {
|
|
8247
8297
|
result.push(this.createItem(
|
|
8248
|
-
9 /*
|
|
8298
|
+
9 /* VariantValue */,
|
|
8249
8299
|
node2.name.value,
|
|
8250
8300
|
node2.rangeWithoutTrivia,
|
|
8251
8301
|
node2.name.rangeWithoutTrivia,
|
|
@@ -8308,7 +8358,7 @@ var SourceFileItemsService = class {
|
|
|
8308
8358
|
return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(31 /* Creation */, this.locale, this.dialect);
|
|
8309
8359
|
case 11 /* Destructor */:
|
|
8310
8360
|
return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(47 /* Destruction */, this.locale, this.dialect);
|
|
8311
|
-
case 9 /*
|
|
8361
|
+
case 9 /* VariantValue */:
|
|
8312
8362
|
return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(6 /* Variant */, this.locale, this.dialect)}>`;
|
|
8313
8363
|
case 18 /* TypeParameter */:
|
|
8314
8364
|
return name ?? `<${LocalizationHelper.localizeHelperPhrase(2 /* TypeParameter */, this.locale)}>`;
|
|
@@ -8489,13 +8539,13 @@ var SelectionRangeService = class {
|
|
|
8489
8539
|
if (!this.nodeShouldBeSkipped(child) && !child.rangeWithoutTrivia.equals(result.range)) {
|
|
8490
8540
|
result = new SelectionRange(child.rangeWithoutTrivia, result);
|
|
8491
8541
|
}
|
|
8492
|
-
if (child.kind === 0 /* Token */ && (child.tokenKind ===
|
|
8542
|
+
if (child.kind === 0 /* Token */ && (child.tokenKind === 5 /* TextLiteral */ || child.tokenKind === 6 /* TextTemplateHead */ || child.tokenKind === 7 /* TextTemplatePart */ || child.tokenKind === 8 /* TextTemplateTail */)) {
|
|
8493
8543
|
let textContentStart = child.rangeWithoutTrivia.start + 1;
|
|
8494
8544
|
let textContentEnd = child.rangeWithoutTrivia.end - 1;
|
|
8495
|
-
if ((child.flags &
|
|
8545
|
+
if ((child.flags & 256 /* StartsWithTilde */) !== 0) {
|
|
8496
8546
|
textContentStart += 1;
|
|
8497
8547
|
}
|
|
8498
|
-
if ((child.flags &
|
|
8548
|
+
if ((child.flags & 512 /* EndsWithTilde */) !== 0) {
|
|
8499
8549
|
textContentEnd -= 1;
|
|
8500
8550
|
}
|
|
8501
8551
|
if (offset >= textContentStart && offset < textContentEnd) {
|
|
@@ -8508,7 +8558,7 @@ var SelectionRangeService = class {
|
|
|
8508
8558
|
}
|
|
8509
8559
|
nodeContainsOffset(node, offset, searchInTrivia) {
|
|
8510
8560
|
const range = searchInTrivia ? node.rangeWithTrivia : node.rangeWithoutTrivia;
|
|
8511
|
-
if (node.kind === 0 /* Token */ && node.tokenKind ===
|
|
8561
|
+
if (node.kind === 0 /* Token */ && node.tokenKind === 9 /* Identifier */ || node.kind === 3 /* Keyword */) {
|
|
8512
8562
|
return offset >= range.start && offset <= range.end;
|
|
8513
8563
|
} else {
|
|
8514
8564
|
return offset >= range.start && offset < range.end;
|
|
@@ -8517,9 +8567,9 @@ var SelectionRangeService = class {
|
|
|
8517
8567
|
nodeShouldBeSkipped(node) {
|
|
8518
8568
|
if (node.kind === 0 /* Token */) {
|
|
8519
8569
|
switch (node.tokenKind) {
|
|
8520
|
-
case
|
|
8521
|
-
case
|
|
8522
|
-
case
|
|
8570
|
+
case 6 /* TextTemplateHead */:
|
|
8571
|
+
case 7 /* TextTemplatePart */:
|
|
8572
|
+
case 8 /* TextTemplateTail */:
|
|
8523
8573
|
return true;
|
|
8524
8574
|
default:
|
|
8525
8575
|
return false;
|
|
@@ -8571,7 +8621,7 @@ var SemanticTokensService = class {
|
|
|
8571
8621
|
return;
|
|
8572
8622
|
}
|
|
8573
8623
|
if (node.kind === 89 /* IdentifierExpression */) {
|
|
8574
|
-
const meaning = analyzer.resolveIdentifierExpression(node)
|
|
8624
|
+
const meaning = analyzer.resolveIdentifierExpression(node);
|
|
8575
8625
|
if (meaning.kind === "variable-access") {
|
|
8576
8626
|
const variable = meaning.variable.getEntity();
|
|
8577
8627
|
if (variable.subkind === "field" && variable.isVariant()) {
|
|
@@ -8625,7 +8675,7 @@ var SemanticTokensService = class {
|
|
|
8625
8675
|
}
|
|
8626
8676
|
}
|
|
8627
8677
|
if (node.kind === 76 /* MemberAccessExpression */) {
|
|
8628
|
-
const meaning = analyzer.resolveMemberAccessExpression(node)
|
|
8678
|
+
const meaning = analyzer.resolveMemberAccessExpression(node);
|
|
8629
8679
|
if (meaning.kind === "static-field-access") {
|
|
8630
8680
|
const entity = meaning.field.getEntity();
|
|
8631
8681
|
if (entity.subkind === "field" && entity.isVariant()) {
|
|
@@ -8668,7 +8718,7 @@ var SemanticTokensService = class {
|
|
|
8668
8718
|
));
|
|
8669
8719
|
}
|
|
8670
8720
|
}
|
|
8671
|
-
if (node.kind === 147 /*
|
|
8721
|
+
if (node.kind === 147 /* VariantValueDeclaration */) {
|
|
8672
8722
|
result.push(
|
|
8673
8723
|
new SemanticToken(
|
|
8674
8724
|
node.name.rangeWithoutTrivia,
|
|
@@ -8932,7 +8982,7 @@ var TypeParameterSignatureHelpProvider = class {
|
|
|
8932
8982
|
getSignaturesForGenericSpecializationExpression(node) {
|
|
8933
8983
|
const expression = unwrapParenthesizedExpressions(node.expression);
|
|
8934
8984
|
if (expression.kind === 89 /* IdentifierExpression */) {
|
|
8935
|
-
const meaning = this.analyzer.resolveIdentifierExpression(expression)
|
|
8985
|
+
const meaning = this.analyzer.resolveIdentifierExpression(expression);
|
|
8936
8986
|
if (meaning.kind === "function-access") {
|
|
8937
8987
|
return Query.from(meaning.candidates).mapAndFilter((f) => this.getSignatureForAccessedFunction(f)).toArray();
|
|
8938
8988
|
}
|
|
@@ -8945,7 +8995,7 @@ var TypeParameterSignatureHelpProvider = class {
|
|
|
8945
8995
|
return void 0;
|
|
8946
8996
|
}
|
|
8947
8997
|
if (expression.kind === 76 /* MemberAccessExpression */) {
|
|
8948
|
-
const meaning = this.analyzer.resolveMemberAccessExpression(expression)
|
|
8998
|
+
const meaning = this.analyzer.resolveMemberAccessExpression(expression);
|
|
8949
8999
|
let accessedFunctions;
|
|
8950
9000
|
if (meaning.kind === "instance-method-access") {
|
|
8951
9001
|
accessedFunctions = meaning.candidates;
|
|
@@ -12053,7 +12103,7 @@ var EntityToSyntax = class {
|
|
|
12053
12103
|
convertVariant(entity) {
|
|
12054
12104
|
const tags = this.convertTags(entity.getTags());
|
|
12055
12105
|
const name = this.getEntityName(entity);
|
|
12056
|
-
return SyntaxFactory.
|
|
12106
|
+
return SyntaxFactory.variantValueDeclaration(tags, [], name);
|
|
12057
12107
|
}
|
|
12058
12108
|
createStructuredTypeDeclarationBody(entity) {
|
|
12059
12109
|
let structuredTypeKindKeyword;
|
|
@@ -12856,6 +12906,7 @@ var _LanguageServer = class _LanguageServer {
|
|
|
12856
12906
|
this.fileSystemTreeDisplayService = new FileSystemTreeDisplayService();
|
|
12857
12907
|
this.selectionRangeService = new SelectionRangeService();
|
|
12858
12908
|
this.assignFieldService = new AssignFieldService();
|
|
12909
|
+
this.addBlockToScriptService = new AddBlockToScriptService();
|
|
12859
12910
|
this.deleteBlockFromScriptService = new DeleteBlockFromScriptService();
|
|
12860
12911
|
this.codeActionsService = new CodeActionsService();
|
|
12861
12912
|
this.connection = config.connection;
|
|
@@ -12953,7 +13004,9 @@ var _LanguageServer = class _LanguageServer {
|
|
|
12953
13004
|
this.disposables.push(disposable);
|
|
12954
13005
|
disposable = this.connection.onRequest(customRequests.assignField, (params, token) => this.withTaskController(token, (taskController) => this.onAssignField(params, taskController)));
|
|
12955
13006
|
this.disposables.push(disposable);
|
|
12956
|
-
disposable = this.connection.onRequest(customRequests.
|
|
13007
|
+
disposable = this.connection.onRequest(customRequests.addBlockToScript, (params, token) => this.withTaskController(token, (taskController) => this.onAddBlockToScript(params, taskController)));
|
|
13008
|
+
this.disposables.push(disposable);
|
|
13009
|
+
disposable = this.connection.onRequest(customRequests.deleteBlocksFromScript, (params, token) => this.withTaskController(token, (taskController) => this.onDeleteBlocksFromScript(params, taskController)));
|
|
12957
13010
|
this.disposables.push(disposable);
|
|
12958
13011
|
this.connection.listen();
|
|
12959
13012
|
}
|
|
@@ -13458,7 +13511,7 @@ var _LanguageServer = class _LanguageServer {
|
|
|
13458
13511
|
return ls3.SymbolKind.Function;
|
|
13459
13512
|
case 7 /* VariantType */:
|
|
13460
13513
|
return ls3.SymbolKind.Enum;
|
|
13461
|
-
case 9 /*
|
|
13514
|
+
case 9 /* VariantValue */:
|
|
13462
13515
|
return ls3.SymbolKind.EnumMember;
|
|
13463
13516
|
case 8 /* InvalidType */:
|
|
13464
13517
|
return ls3.SymbolKind.Class;
|
|
@@ -13525,16 +13578,22 @@ var _LanguageServer = class _LanguageServer {
|
|
|
13525
13578
|
}
|
|
13526
13579
|
});
|
|
13527
13580
|
}
|
|
13528
|
-
|
|
13581
|
+
onAddBlockToScript(params, taskController) {
|
|
13529
13582
|
return __async(this, null, function* () {
|
|
13530
13583
|
const functionNodeUri = URI.parse(params.functionNodeUri);
|
|
13531
13584
|
const sourceFileContext = yield this.getSourceFileContext(functionNodeUri, taskController);
|
|
13532
13585
|
if (sourceFileContext !== void 0) {
|
|
13533
13586
|
const functionDeclaration = NodePath.parse(functionNodeUri.fragment).getNode(sourceFileContext.sourceFile.getSyntaxNode());
|
|
13534
13587
|
if (functionDeclaration !== void 0 && NodeTypeUtils.isSubprogramDeclarationOrLiteral(functionDeclaration)) {
|
|
13535
|
-
const
|
|
13588
|
+
const addedBlockInfo = {
|
|
13589
|
+
name: params.name,
|
|
13590
|
+
key: params.key,
|
|
13591
|
+
elementProperties: params.elementProperties
|
|
13592
|
+
};
|
|
13593
|
+
const sourceFileEdit = this.addBlockToScriptService.createEditAddingBlock(
|
|
13536
13594
|
sourceFileContext.sourceFile,
|
|
13537
|
-
functionDeclaration
|
|
13595
|
+
functionDeclaration,
|
|
13596
|
+
addedBlockInfo
|
|
13538
13597
|
);
|
|
13539
13598
|
if (sourceFileEdit !== void 0) {
|
|
13540
13599
|
const textDocumentEdit = this.convertSourceFileEdit(sourceFileEdit);
|
|
@@ -13545,6 +13604,32 @@ var _LanguageServer = class _LanguageServer {
|
|
|
13545
13604
|
}
|
|
13546
13605
|
});
|
|
13547
13606
|
}
|
|
13607
|
+
onDeleteBlocksFromScript(params, taskController) {
|
|
13608
|
+
return __async(this, null, function* () {
|
|
13609
|
+
const documentEdits = new Array();
|
|
13610
|
+
for (const functionNodeUri of params.functionNodeUris) {
|
|
13611
|
+
const parsedFunctionNodeUri = URI.parse(functionNodeUri);
|
|
13612
|
+
const sourceFileContext = yield this.getSourceFileContext(parsedFunctionNodeUri, taskController);
|
|
13613
|
+
if (sourceFileContext !== void 0) {
|
|
13614
|
+
const functionDeclaration = NodePath.parse(parsedFunctionNodeUri.fragment).getNode(sourceFileContext.sourceFile.getSyntaxNode());
|
|
13615
|
+
if (functionDeclaration !== void 0 && NodeTypeUtils.isSubprogramDeclarationOrLiteral(functionDeclaration)) {
|
|
13616
|
+
const sourceFileEdit = this.deleteBlockFromScriptService.createEditDeletingBlock(
|
|
13617
|
+
sourceFileContext.sourceFile,
|
|
13618
|
+
functionDeclaration
|
|
13619
|
+
);
|
|
13620
|
+
if (sourceFileEdit !== void 0) {
|
|
13621
|
+
const textDocumentEdit = this.convertSourceFileEdit(sourceFileEdit);
|
|
13622
|
+
documentEdits.push(textDocumentEdit);
|
|
13623
|
+
}
|
|
13624
|
+
}
|
|
13625
|
+
}
|
|
13626
|
+
}
|
|
13627
|
+
if (documentEdits.length > 0) {
|
|
13628
|
+
const workspaceEdit = { documentChanges: documentEdits };
|
|
13629
|
+
yield this.connection.workspace.applyEdit(workspaceEdit);
|
|
13630
|
+
}
|
|
13631
|
+
});
|
|
13632
|
+
}
|
|
13548
13633
|
convertSourceFileEdit(edit) {
|
|
13549
13634
|
const range = this.convertSourceFileRange(edit.sourceFile, edit.range);
|
|
13550
13635
|
const textDocument = ls3.OptionalVersionedTextDocumentIdentifier.create(
|