@artel/artc 0.6.25202 → 0.6.25204
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 +4 -4
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +37 -44
- package/build/{chunk-4PQDXVGE.js → chunk-F3JHA74W.js} +2 -2
- package/build/{chunk-4V2IJV5R.js → chunk-JZYAVBI6.js} +91 -110
- package/build/{chunk-Y7OXOFGV.js → chunk-QDTUQFV3.js} +1 -1
- package/build/types/common/Name.d.ts +8 -13
- package/build/types/common/NameFormatConversion.d.ts +2 -3
- package/build/types/emitter/EmitterContext.d.ts +1 -1
- package/build/types/services/LanguageServer.d.ts +1 -1
- package/build/types/tree/KeywordKind.d.ts +2 -2
- package/build/types/tree/green/Nodes.d.ts +12 -12
- package/build/types/tree/red/Nodes.d.ts +8 -8
- package/package.json +1 -1
package/build/Cli.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
import {
|
3
3
|
CommandLineCompiler
|
4
|
-
} from "./chunk-
|
5
|
-
import "./chunk-
|
4
|
+
} from "./chunk-F3JHA74W.js";
|
5
|
+
import "./chunk-QDTUQFV3.js";
|
6
6
|
import {
|
7
7
|
__async
|
8
|
-
} from "./chunk-
|
8
|
+
} from "./chunk-JZYAVBI6.js";
|
9
9
|
|
10
10
|
// source/Cli.ts
|
11
11
|
function main() {
|
package/build/api/Api.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
Compiler
|
3
|
-
} from "../chunk-
|
3
|
+
} from "../chunk-QDTUQFV3.js";
|
4
4
|
import {
|
5
5
|
AccessKind,
|
6
6
|
AccessedMethodValueParameter,
|
@@ -272,8 +272,8 @@ import {
|
|
272
272
|
WithDiagnostics_ok,
|
273
273
|
builtInSystemPackagesDirectory,
|
274
274
|
builtInSystemPackagesFileSystemTree,
|
275
|
+
camelCaseToKebabCasePreservingKeyEquality,
|
275
276
|
collectRequiredJsLibraryConfigs,
|
276
|
-
convertNameToKebabCasePreservingUniversalEquality,
|
277
277
|
createDefaultPackageConfiguration,
|
278
278
|
createNonEmptyArray,
|
279
279
|
createTsInteropInputsForCompilation,
|
@@ -330,7 +330,7 @@ import {
|
|
330
330
|
visitChildrenRecursively,
|
331
331
|
withoutQuotes,
|
332
332
|
yieldExecution
|
333
|
-
} from "../chunk-
|
333
|
+
} from "../chunk-JZYAVBI6.js";
|
334
334
|
export {
|
335
335
|
AccessKind,
|
336
336
|
AccessedMethodValueParameter,
|
@@ -598,10 +598,10 @@ export {
|
|
598
598
|
WithDiagnostics_ok,
|
599
599
|
builtInSystemPackagesDirectory,
|
600
600
|
builtInSystemPackagesFileSystemTree,
|
601
|
+
camelCaseToKebabCasePreservingKeyEquality,
|
601
602
|
collectRequiredJsLibraryConfigs,
|
602
603
|
PackageConfigurationEn_exports as config,
|
603
604
|
PackageConfigurationRu_exports as configRu,
|
604
|
-
convertNameToKebabCasePreservingUniversalEquality,
|
605
605
|
createDefaultPackageConfiguration,
|
606
606
|
createNonEmptyArray,
|
607
607
|
createTsInteropInputsForCompilation,
|
package/build/api/ApiNodeJS.js
CHANGED
@@ -6,9 +6,9 @@ import {
|
|
6
6
|
PhysicalFileSystem,
|
7
7
|
PhysicalTypeScriptLibrariesProvider,
|
8
8
|
PrintingDiagnosticAcceptor
|
9
|
-
} from "../chunk-
|
10
|
-
import "../chunk-
|
11
|
-
import "../chunk-
|
9
|
+
} from "../chunk-F3JHA74W.js";
|
10
|
+
import "../chunk-QDTUQFV3.js";
|
11
|
+
import "../chunk-JZYAVBI6.js";
|
12
12
|
export {
|
13
13
|
CommandLineCompiler,
|
14
14
|
FileSystemUri,
|
package/build/api/ApiServices.js
CHANGED
@@ -182,7 +182,7 @@ import {
|
|
182
182
|
unwrapParenthesizedExpressions,
|
183
183
|
visitChildren,
|
184
184
|
yieldExecution
|
185
|
-
} from "../chunk-
|
185
|
+
} from "../chunk-JZYAVBI6.js";
|
186
186
|
|
187
187
|
// source/services/CustomCommand.ts
|
188
188
|
import * as ls from "vscode-languageserver";
|
@@ -1263,7 +1263,7 @@ var CompletionService = class {
|
|
1263
1263
|
translationKind = 1 /* Method */;
|
1264
1264
|
hasPrecedingKeyword = true;
|
1265
1265
|
}
|
1266
|
-
if (tokenOrKeyword.isKeyword(27 /*
|
1266
|
+
if (tokenOrKeyword.isKeyword(27 /* Creation */) && tokenOrKeyword.parent.kind === 128 /* ConstructorTranslation */) {
|
1267
1267
|
typeTranslation = tokenOrKeyword.parent.parent.parent;
|
1268
1268
|
translationKind = 3 /* Constructor */;
|
1269
1269
|
hasPrecedingKeyword = true;
|
@@ -1437,13 +1437,13 @@ var CompletionService = class {
|
|
1437
1437
|
}
|
1438
1438
|
const kinds = /* @__PURE__ */ new Set();
|
1439
1439
|
if (syntaxContext.isPackageMemberDeclarationListContext) {
|
1440
|
-
kinds.add(16 /* Import */).add(7 /* Run */).add(27 /*
|
1440
|
+
kinds.add(16 /* Import */).add(7 /* Run */).add(27 /* Creation */).add(11 /* Operation */).add(15 /* Type */).add(60 /* Get */).add(61 /* Set */).add(57 /* Translations */);
|
1441
1441
|
}
|
1442
1442
|
if (syntaxContext.isPackageMemberDeclarationListContext || syntaxContext.isTypeMemberDeclarationListContext) {
|
1443
1443
|
kinds.add(32 /* Const */).add(33 /* Hidden */).add(36 /* Abstract */).add(42 /* Static */).add(37 /* Redefinable */).add(38 /* Redefined */).add(41 /* Async */).add(34 /* Observable */).add(35 /* Consistent */);
|
1444
1444
|
}
|
1445
1445
|
if (syntaxContext.isTypeMemberDeclarationListContext) {
|
1446
|
-
kinds.add(27 /*
|
1446
|
+
kinds.add(27 /* Creation */).add(11 /* Operation */).add(49 /* Destruction */).add(60 /* Get */).add(61 /* Set */);
|
1447
1447
|
}
|
1448
1448
|
if (syntaxContext.isStatementContext) {
|
1449
1449
|
kinds.add(7 /* Run */).add(31 /* For */).add(22 /* While */).add(23 /* Loop */).add(14 /* Return */).add(17 /* Error */).add(25 /* Yield */).add(47 /* Await */).add(29 /* BreakLoop */).add(30 /* ContinueLoop */).add(12 /* If */).add(45 /* Switch */).add(1 /* Let */).add(32 /* Const */).add(48 /* Dispose */).add(11 /* Operation */).add(41 /* Async */).add(39 /* Transactional */).add(40 /* Unobservable */);
|
@@ -2014,7 +2014,7 @@ var CompletionService = class {
|
|
2014
2014
|
if (!ctx.hasPrecedingKeyword) {
|
2015
2015
|
const keywords = [
|
2016
2016
|
11 /* Operation */,
|
2017
|
-
27 /*
|
2017
|
+
27 /* Creation */
|
2018
2018
|
];
|
2019
2019
|
result = result.chain(
|
2020
2020
|
Query.from(keywords).map(
|
@@ -2269,22 +2269,15 @@ var CompletionItemInfoContext = class {
|
|
2269
2269
|
this.locale = locale;
|
2270
2270
|
this._singleWordKeywordValues = _singleWordKeywordValues;
|
2271
2271
|
}
|
2272
|
-
getInsertTextForName(name,
|
2273
|
-
let
|
2274
|
-
if (
|
2275
|
-
|
2272
|
+
getInsertTextForName(name, withoutBackQuotes = false) {
|
2273
|
+
let flags = name.flags;
|
2274
|
+
if (this._singleWordKeywordValues.has(name.originalWithoutQuotes)) {
|
2275
|
+
flags |= 16 /* EscapedKeyword */;
|
2276
2276
|
}
|
2277
|
-
if (
|
2278
|
-
|
2277
|
+
if (withoutBackQuotes) {
|
2278
|
+
flags &= ~(64 /* BackingVariableName */ | 32 /* ConflictResolvingParameterName */);
|
2279
2279
|
}
|
2280
|
-
return
|
2281
|
-
}
|
2282
|
-
trimTrailingBackQuotes(name) {
|
2283
|
-
let index = name.length - 1;
|
2284
|
-
while (index >= 0 && name.charAt(index) === "`") {
|
2285
|
-
index--;
|
2286
|
-
}
|
2287
|
-
return name.substring(0, index + 1);
|
2280
|
+
return name.getPreferredOriginal(flags);
|
2288
2281
|
}
|
2289
2282
|
};
|
2290
2283
|
var PackageNameSegmentCompletionItemInfo = class {
|
@@ -2795,8 +2788,8 @@ var AliasesSourceTypeConstructorCompletionItemInfo = class {
|
|
2795
2788
|
Localization.Original.ofEntity(this.constructor_)
|
2796
2789
|
);
|
2797
2790
|
const displayParts = this.displayService.getConstructorDeclarationDisplayParts(constructorDeclaration);
|
2798
|
-
const
|
2799
|
-
return
|
2791
|
+
const creationKeyword = this.displayService.displayKeyword(27 /* Creation */);
|
2792
|
+
return creationKeyword + displayParts.valueParametersStart + displayParts.valueParameters.map((p) => p.toString()).join(displayParts.valueParameterSeparator) + displayParts.valueParametersEnd;
|
2800
2793
|
});
|
2801
2794
|
}
|
2802
2795
|
getLabel() {
|
@@ -2809,9 +2802,9 @@ var AliasesSourceTypeConstructorCompletionItemInfo = class {
|
|
2809
2802
|
return this.label;
|
2810
2803
|
}
|
2811
2804
|
getInsertText() {
|
2812
|
-
const
|
2805
|
+
const creationKeyword = this.includeOnCreateKeyword ? this.displayService.displayKeyword(27 /* Creation */) : "";
|
2813
2806
|
const parameters = this.constructor_.getValueParameters().map((p) => this.ctx.getInsertTextForName(p.getName(), true)).join(", ");
|
2814
|
-
return `${
|
2807
|
+
return `${creationKeyword}(${parameters})`;
|
2815
2808
|
}
|
2816
2809
|
getSortText() {
|
2817
2810
|
return void 0;
|
@@ -3421,7 +3414,7 @@ var NodeSemanticInfoService = class {
|
|
3421
3414
|
return this.ofDereferenceExpressionOperator(analyzer, tokenOrKeyword.parent, options6);
|
3422
3415
|
} else if (tokenOrKeyword.parent.kind === 94 /* AssignmentStatement */) {
|
3423
3416
|
return this.ofAssignmentStatementOperator(analyzer, tokenOrKeyword.parent, options6);
|
3424
|
-
} else if (tokenOrKeyword.isKeyword(27 /*
|
3417
|
+
} else if (tokenOrKeyword.isKeyword(27 /* Creation */) && tokenOrKeyword.parent.kind === 45 /* TypeConstructorDeclaration */) {
|
3425
3418
|
return this.ofTypeConstructorDeclaration(analyzer, tokenOrKeyword.parent);
|
3426
3419
|
} else if (tokenOrKeyword.isToken(13 /* Asterisk */) && tokenOrKeyword.parent.kind === 93 /* DefaultMatchExpression */) {
|
3427
3420
|
return this.ofDefaultMatchExpression(analyzer, tokenOrKeyword.parent);
|
@@ -4427,10 +4420,10 @@ function getEntitySourceLocations(analyzer, entity) {
|
|
4427
4420
|
range = node.name.rangeWithoutTrivia;
|
4428
4421
|
break;
|
4429
4422
|
case 45 /* TypeConstructorDeclaration */:
|
4430
|
-
range = node.
|
4423
|
+
range = node.creationKeyword.rangeWithoutTrivia;
|
4431
4424
|
break;
|
4432
4425
|
case 46 /* TypeDestructorDeclaration */:
|
4433
|
-
range = node.
|
4426
|
+
range = node.destructionKeyword.rangeWithoutTrivia;
|
4434
4427
|
break;
|
4435
4428
|
case 8 /* PackageImport */:
|
4436
4429
|
Debug.assertNotNull(node.alias);
|
@@ -4763,7 +4756,7 @@ var ReferencesService = class {
|
|
4763
4756
|
if (node.kind === 45 /* TypeConstructorDeclaration */ && restrictions.canBeConstructorDeclaration) {
|
4764
4757
|
const semanticInfo = NodeSemanticInfoService.ofTypeConstructorDeclaration(analyzer, node);
|
4765
4758
|
if (this.isReferenceToDefinition(definition, semanticInfo, onlyWithSameTranslation, allowAmbiguous)) {
|
4766
|
-
result.push(new Reference(sourceFile2, node.
|
4759
|
+
result.push(new Reference(sourceFile2, node.creationKeyword.rangeWithoutTrivia, 0 /* Read */));
|
4767
4760
|
}
|
4768
4761
|
}
|
4769
4762
|
if (node.kind === 88 /* ObjectExpression */ && restrictions.canBeObjectExpression) {
|
@@ -5687,9 +5680,9 @@ var SourceFileItemsService = class {
|
|
5687
5680
|
case 8 /* InvalidType */:
|
5688
5681
|
return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(15 /* Type */, this.locale, this.dialect)}>`;
|
5689
5682
|
case 10 /* TypeConstructor */:
|
5690
|
-
return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(27 /*
|
5683
|
+
return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(27 /* Creation */, this.locale, this.dialect);
|
5691
5684
|
case 11 /* TypeDestructor */:
|
5692
|
-
return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(49 /*
|
5685
|
+
return name ?? LocalizationHelper.localizeKeywordAndTakeFirst(49 /* Destruction */, this.locale, this.dialect);
|
5693
5686
|
case 9 /* Variant */:
|
5694
5687
|
return name ?? `<${LocalizationHelper.localizeKeywordAndTakeFirst(6 /* Variant */, this.locale, this.dialect)}>`;
|
5695
5688
|
case 18 /* TypeParameter */:
|
@@ -6077,10 +6070,10 @@ var SemanticTokensService = class {
|
|
6077
6070
|
firstChar = name.charAt(0);
|
6078
6071
|
} else {
|
6079
6072
|
let firstCharIndex = 0;
|
6080
|
-
while (name.
|
6073
|
+
while (name.original.charAt(firstCharIndex) === "~") {
|
6081
6074
|
firstCharIndex++;
|
6082
6075
|
}
|
6083
|
-
firstChar = name.
|
6076
|
+
firstChar = name.original.charAt(firstCharIndex);
|
6084
6077
|
}
|
6085
6078
|
return firstChar.toLowerCase() !== firstChar;
|
6086
6079
|
}
|
@@ -6893,7 +6886,7 @@ var SyntaxToCode = class _SyntaxToCode {
|
|
6893
6886
|
writePackageConstructorDeclaration(node) {
|
6894
6887
|
this.writeDeclarationTags(node.tagList);
|
6895
6888
|
this.writeDeclarationModifiers(node.modifierList);
|
6896
|
-
this.writeKeyword(node.
|
6889
|
+
this.writeKeyword(node.creationKeyword);
|
6897
6890
|
this.writeDeclarationBody(node.body);
|
6898
6891
|
}
|
6899
6892
|
writePackageEntryPointDeclaration(node) {
|
@@ -7002,7 +6995,7 @@ var SyntaxToCode = class _SyntaxToCode {
|
|
7002
6995
|
writeTypeConstructorDeclaration(node) {
|
7003
6996
|
this.writeDeclarationTags(node.tagList);
|
7004
6997
|
this.writeDeclarationModifiers(node.modifierList);
|
7005
|
-
this.writeKeyword(node.
|
6998
|
+
this.writeKeyword(node.creationKeyword);
|
7006
6999
|
this.writeParameterClause(node.parameterClause);
|
7007
7000
|
if (node.body !== void 0) {
|
7008
7001
|
this.writeDeclarationBody(node.body);
|
@@ -7011,7 +7004,7 @@ var SyntaxToCode = class _SyntaxToCode {
|
|
7011
7004
|
writeTypeDestructorDeclaration(node) {
|
7012
7005
|
this.writeDeclarationTags(node.tagList);
|
7013
7006
|
this.writeDeclarationModifiers(node.modifierList);
|
7014
|
-
this.writeKeyword(node.
|
7007
|
+
this.writeKeyword(node.destructionKeyword);
|
7015
7008
|
this.writeParameterClause(node.parameterClause);
|
7016
7009
|
if (node.body !== void 0) {
|
7017
7010
|
this.writeDeclarationBody(node.body);
|
@@ -7434,7 +7427,7 @@ var SyntaxToCode = class _SyntaxToCode {
|
|
7434
7427
|
this.writeIndexerTranslationParameterClause(node.translatedParameterClause);
|
7435
7428
|
}
|
7436
7429
|
writeConstructorTranslation(node) {
|
7437
|
-
this.writeKeyword(node.
|
7430
|
+
this.writeKeyword(node.creationKeyword);
|
7438
7431
|
this.writeTranslationParameterClause(node.sourceParameterClause);
|
7439
7432
|
this.writeWhitespace();
|
7440
7433
|
this.writeToken(node.minusGreaterThanToken);
|
@@ -10279,16 +10272,16 @@ var SyntaxFactory = class {
|
|
10279
10272
|
static typeConstructorDeclaration(tags, modifiers, parameters, body) {
|
10280
10273
|
const tagList = new TagList(tags);
|
10281
10274
|
const modifierList = new ModifierList(modifiers);
|
10282
|
-
const
|
10275
|
+
const creationKeyword = this.keyword(27 /* Creation */);
|
10283
10276
|
const parameterClause = this.parameterClause(parameters);
|
10284
|
-
return new TypeConstructorDeclaration(tagList, modifierList,
|
10277
|
+
return new TypeConstructorDeclaration(tagList, modifierList, creationKeyword, parameterClause, body);
|
10285
10278
|
}
|
10286
10279
|
static typeDestructorDeclaration(tags, modifiers, parameters, body) {
|
10287
10280
|
const tagList = new TagList(tags);
|
10288
10281
|
const modifierList = new ModifierList(modifiers);
|
10289
|
-
const
|
10282
|
+
const destructionKeyword = this.keyword(49 /* Destruction */);
|
10290
10283
|
const parameterClause = this.parameterClause(parameters);
|
10291
|
-
return new TypeDestructorDeclaration(tagList, modifierList,
|
10284
|
+
return new TypeDestructorDeclaration(tagList, modifierList, destructionKeyword, parameterClause, body);
|
10292
10285
|
}
|
10293
10286
|
static typeIndexedGetterDeclaration(tags, modifiers, parameters, typeSpecifier, body) {
|
10294
10287
|
const tagList = new TagList(tags);
|
@@ -10589,12 +10582,12 @@ var SyntaxFactory = class {
|
|
10589
10582
|
);
|
10590
10583
|
}
|
10591
10584
|
static constructorTranslation(sourceParameters, translatedParameters) {
|
10592
|
-
const
|
10585
|
+
const creationKeyword = this.keyword(27 /* Creation */);
|
10593
10586
|
const sourceParameterClause = this.translationParameterClause(sourceParameters);
|
10594
10587
|
const minusGreaterThanToken = this.token(42 /* MinusGreaterThan */);
|
10595
10588
|
const translatedParameterClause = this.translationParameterClause(translatedParameters);
|
10596
10589
|
return new ConstructorTranslation(
|
10597
|
-
|
10590
|
+
creationKeyword,
|
10598
10591
|
sourceParameterClause,
|
10599
10592
|
minusGreaterThanToken,
|
10600
10593
|
translatedParameterClause
|
@@ -11077,7 +11070,7 @@ var EntityToSyntax = class {
|
|
11077
11070
|
return [];
|
11078
11071
|
}
|
11079
11072
|
getEntityName(entity) {
|
11080
|
-
return this._localizationContext?.getEntityName(entity).
|
11073
|
+
return this._localizationContext?.getEntityName(entity).original ?? entity.getName().original;
|
11081
11074
|
}
|
11082
11075
|
convertType(type) {
|
11083
11076
|
switch (type.kind) {
|
@@ -12267,7 +12260,7 @@ var LanguageServer = class {
|
|
12267
12260
|
return this.onDeleteSourceFile(params.arguments[0]);
|
12268
12261
|
case customCommandName.getNodeRange:
|
12269
12262
|
Debug.assert(params.arguments?.length === 1 && isGetNodeRangeParams(params.arguments[0]));
|
12270
|
-
return this.
|
12263
|
+
return this.onGetNodeRange(params.arguments[0], token);
|
12271
12264
|
case customCommandName.addPropertyAssignment:
|
12272
12265
|
Debug.assert(params.arguments?.length === 1 && isAddPropertyAssignmentParams(params.arguments[0]));
|
12273
12266
|
return this.onAddPropertyAssignment(params.arguments[0], token);
|
@@ -12305,7 +12298,7 @@ var LanguageServer = class {
|
|
12305
12298
|
);
|
12306
12299
|
return ls2.TextDocumentEdit.create(textDocument, [ls2.TextEdit.replace(range, edit.text)]);
|
12307
12300
|
}
|
12308
|
-
|
12301
|
+
onGetNodeRange(params, token) {
|
12309
12302
|
return __async(this, null, function* () {
|
12310
12303
|
const uri = URI2.parse(params.uri);
|
12311
12304
|
const sourceFileContext = yield this.getSourceFileContext(uri, token);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
Compiler
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-QDTUQFV3.js";
|
4
4
|
import {
|
5
5
|
ArtelVersion,
|
6
6
|
Cached,
|
@@ -14,7 +14,7 @@ import {
|
|
14
14
|
__async,
|
15
15
|
performanceMeasurementStageNames,
|
16
16
|
performanceMeasurementStages
|
17
|
-
} from "./chunk-
|
17
|
+
} from "./chunk-JZYAVBI6.js";
|
18
18
|
|
19
19
|
// source/executor/FileSystemUri.ts
|
20
20
|
import { platform } from "os";
|
@@ -521,7 +521,7 @@ var UniqueQuery = class extends Query {
|
|
521
521
|
};
|
522
522
|
|
523
523
|
// source/common/Constants.ts
|
524
|
-
var ArtelVersion = true ? "0.6.
|
524
|
+
var ArtelVersion = true ? "0.6.25204" : "";
|
525
525
|
var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel"];
|
526
526
|
var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
|
527
527
|
var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
|
@@ -1109,7 +1109,7 @@ var KeywordKind = /* @__PURE__ */ ((KeywordKind5) => {
|
|
1109
1109
|
KeywordKind5[KeywordKind5["RepeatWhile"] = 24] = "RepeatWhile";
|
1110
1110
|
KeywordKind5[KeywordKind5["Yield"] = 25] = "Yield";
|
1111
1111
|
KeywordKind5[KeywordKind5["When"] = 26] = "When";
|
1112
|
-
KeywordKind5[KeywordKind5["
|
1112
|
+
KeywordKind5[KeywordKind5["Creation"] = 27] = "Creation";
|
1113
1113
|
KeywordKind5[KeywordKind5["OnError"] = 28] = "OnError";
|
1114
1114
|
KeywordKind5[KeywordKind5["BreakLoop"] = 29] = "BreakLoop";
|
1115
1115
|
KeywordKind5[KeywordKind5["ContinueLoop"] = 30] = "ContinueLoop";
|
@@ -1131,7 +1131,7 @@ var KeywordKind = /* @__PURE__ */ ((KeywordKind5) => {
|
|
1131
1131
|
KeywordKind5[KeywordKind5["Case"] = 46] = "Case";
|
1132
1132
|
KeywordKind5[KeywordKind5["Await"] = 47] = "Await";
|
1133
1133
|
KeywordKind5[KeywordKind5["Dispose"] = 48] = "Dispose";
|
1134
|
-
KeywordKind5[KeywordKind5["
|
1134
|
+
KeywordKind5[KeywordKind5["Destruction"] = 49] = "Destruction";
|
1135
1135
|
KeywordKind5[KeywordKind5["InHierarchy"] = 50] = "InHierarchy";
|
1136
1136
|
KeywordKind5[KeywordKind5["InFile"] = 51] = "InFile";
|
1137
1137
|
KeywordKind5[KeywordKind5["InPackage"] = 52] = "InPackage";
|
@@ -2143,10 +2143,10 @@ var PackageMemberGroupDeclaration2 = class extends BaseNode {
|
|
2143
2143
|
}
|
2144
2144
|
};
|
2145
2145
|
var PackageConstructorDeclaration2 = class extends BaseNode {
|
2146
|
-
constructor(tagList, modifierList,
|
2146
|
+
constructor(tagList, modifierList, creationKeyword, body) {
|
2147
2147
|
super();
|
2148
2148
|
this.kind = 25 /* PackageConstructorDeclaration */;
|
2149
|
-
this.children = [tagList, modifierList,
|
2149
|
+
this.children = [tagList, modifierList, creationKeyword, body];
|
2150
2150
|
}
|
2151
2151
|
get tagList() {
|
2152
2152
|
return this.children[0];
|
@@ -2154,7 +2154,7 @@ var PackageConstructorDeclaration2 = class extends BaseNode {
|
|
2154
2154
|
get modifierList() {
|
2155
2155
|
return this.children[1];
|
2156
2156
|
}
|
2157
|
-
get
|
2157
|
+
get creationKeyword() {
|
2158
2158
|
return this.children[2];
|
2159
2159
|
}
|
2160
2160
|
get body() {
|
@@ -2661,10 +2661,10 @@ var TypeMemberGroupDeclaration2 = class extends BaseNode {
|
|
2661
2661
|
}
|
2662
2662
|
};
|
2663
2663
|
var TypeConstructorDeclaration2 = class extends BaseNode {
|
2664
|
-
constructor(tagList, modifierList,
|
2664
|
+
constructor(tagList, modifierList, creationKeyword, parameterClause, body) {
|
2665
2665
|
super();
|
2666
2666
|
this.kind = 45 /* TypeConstructorDeclaration */;
|
2667
|
-
this.children = [tagList, modifierList,
|
2667
|
+
this.children = [tagList, modifierList, creationKeyword, parameterClause, body];
|
2668
2668
|
}
|
2669
2669
|
get tagList() {
|
2670
2670
|
return this.children[0];
|
@@ -2672,7 +2672,7 @@ var TypeConstructorDeclaration2 = class extends BaseNode {
|
|
2672
2672
|
get modifierList() {
|
2673
2673
|
return this.children[1];
|
2674
2674
|
}
|
2675
|
-
get
|
2675
|
+
get creationKeyword() {
|
2676
2676
|
return this.children[2];
|
2677
2677
|
}
|
2678
2678
|
get parameterClause() {
|
@@ -2689,10 +2689,10 @@ var TypeConstructorDeclaration2 = class extends BaseNode {
|
|
2689
2689
|
}
|
2690
2690
|
};
|
2691
2691
|
var TypeDestructorDeclaration2 = class extends BaseNode {
|
2692
|
-
constructor(tagList, modifierList,
|
2692
|
+
constructor(tagList, modifierList, destructionKeyword, parameterClause, body) {
|
2693
2693
|
super();
|
2694
2694
|
this.kind = 46 /* TypeDestructorDeclaration */;
|
2695
|
-
this.children = [tagList, modifierList,
|
2695
|
+
this.children = [tagList, modifierList, destructionKeyword, parameterClause, body];
|
2696
2696
|
}
|
2697
2697
|
get tagList() {
|
2698
2698
|
return this.children[0];
|
@@ -2700,7 +2700,7 @@ var TypeDestructorDeclaration2 = class extends BaseNode {
|
|
2700
2700
|
get modifierList() {
|
2701
2701
|
return this.children[1];
|
2702
2702
|
}
|
2703
|
-
get
|
2703
|
+
get destructionKeyword() {
|
2704
2704
|
return this.children[2];
|
2705
2705
|
}
|
2706
2706
|
get parameterClause() {
|
@@ -4430,12 +4430,12 @@ var TranslationParameterClause2 = class extends BaseNode {
|
|
4430
4430
|
}
|
4431
4431
|
};
|
4432
4432
|
var ConstructorTranslation2 = class extends BaseNode {
|
4433
|
-
constructor(
|
4433
|
+
constructor(creationKeyword, sourceParameterClause, minusGreaterThanToken, translatedParameterClause) {
|
4434
4434
|
super();
|
4435
4435
|
this.kind = 128 /* ConstructorTranslation */;
|
4436
|
-
this.children = [
|
4436
|
+
this.children = [creationKeyword, sourceParameterClause, minusGreaterThanToken, translatedParameterClause];
|
4437
4437
|
}
|
4438
|
-
get
|
4438
|
+
get creationKeyword() {
|
4439
4439
|
return this.children[0];
|
4440
4440
|
}
|
4441
4441
|
get sourceParameterClause() {
|
@@ -6009,7 +6009,7 @@ var PackageConstructorDeclaration = class extends BaseNode2 {
|
|
6009
6009
|
get modifierList() {
|
6010
6010
|
return this.children[1];
|
6011
6011
|
}
|
6012
|
-
get
|
6012
|
+
get creationKeyword() {
|
6013
6013
|
return this.children[2];
|
6014
6014
|
}
|
6015
6015
|
get body() {
|
@@ -6022,7 +6022,7 @@ var PackageConstructorDeclaration = class extends BaseNode2 {
|
|
6022
6022
|
return [
|
6023
6023
|
this.green.tagList.toRed(childRangeStart(this, 0), this),
|
6024
6024
|
this.green.modifierList.toRed(childRangeStart(this, 1), this),
|
6025
|
-
this.green.
|
6025
|
+
this.green.creationKeyword.toRed(childRangeStart(this, 2), this),
|
6026
6026
|
this.green.body.toRed(childRangeStart(this, 3), this)
|
6027
6027
|
];
|
6028
6028
|
}
|
@@ -6673,7 +6673,7 @@ var TypeConstructorDeclaration = class extends BaseNode2 {
|
|
6673
6673
|
get modifierList() {
|
6674
6674
|
return this.children[1];
|
6675
6675
|
}
|
6676
|
-
get
|
6676
|
+
get creationKeyword() {
|
6677
6677
|
return this.children[2];
|
6678
6678
|
}
|
6679
6679
|
get parameterClause() {
|
@@ -6689,7 +6689,7 @@ var TypeConstructorDeclaration = class extends BaseNode2 {
|
|
6689
6689
|
return [
|
6690
6690
|
this.green.tagList.toRed(childRangeStart(this, 0), this),
|
6691
6691
|
this.green.modifierList.toRed(childRangeStart(this, 1), this),
|
6692
|
-
this.green.
|
6692
|
+
this.green.creationKeyword.toRed(childRangeStart(this, 2), this),
|
6693
6693
|
this.green.parameterClause.toRed(childRangeStart(this, 3), this),
|
6694
6694
|
this.green.body?.toRed(childRangeStart(this, 4), this)
|
6695
6695
|
];
|
@@ -6709,7 +6709,7 @@ var TypeDestructorDeclaration = class extends BaseNode2 {
|
|
6709
6709
|
get modifierList() {
|
6710
6710
|
return this.children[1];
|
6711
6711
|
}
|
6712
|
-
get
|
6712
|
+
get destructionKeyword() {
|
6713
6713
|
return this.children[2];
|
6714
6714
|
}
|
6715
6715
|
get parameterClause() {
|
@@ -6725,7 +6725,7 @@ var TypeDestructorDeclaration = class extends BaseNode2 {
|
|
6725
6725
|
return [
|
6726
6726
|
this.green.tagList.toRed(childRangeStart(this, 0), this),
|
6727
6727
|
this.green.modifierList.toRed(childRangeStart(this, 1), this),
|
6728
|
-
this.green.
|
6728
|
+
this.green.destructionKeyword.toRed(childRangeStart(this, 2), this),
|
6729
6729
|
this.green.parameterClause.toRed(childRangeStart(this, 3), this),
|
6730
6730
|
this.green.body?.toRed(childRangeStart(this, 4), this)
|
6731
6731
|
];
|
@@ -8874,7 +8874,7 @@ var ConstructorTranslation = class extends BaseNode2 {
|
|
8874
8874
|
get children() {
|
8875
8875
|
return this._children ??= this.createChildren();
|
8876
8876
|
}
|
8877
|
-
get
|
8877
|
+
get creationKeyword() {
|
8878
8878
|
return this.children[0];
|
8879
8879
|
}
|
8880
8880
|
get sourceParameterClause() {
|
@@ -8891,7 +8891,7 @@ var ConstructorTranslation = class extends BaseNode2 {
|
|
8891
8891
|
}
|
8892
8892
|
createChildren() {
|
8893
8893
|
return [
|
8894
|
-
this.green.
|
8894
|
+
this.green.creationKeyword.toRed(childRangeStart(this, 0), this),
|
8895
8895
|
this.green.sourceParameterClause.toRed(childRangeStart(this, 1), this),
|
8896
8896
|
this.green.minusGreaterThanToken.toRed(childRangeStart(this, 2), this),
|
8897
8897
|
this.green.translatedParameterClause.toRed(childRangeStart(this, 3), this)
|
@@ -10993,7 +10993,7 @@ function kebabCaseToCamelCase(s) {
|
|
10993
10993
|
}
|
10994
10994
|
return result;
|
10995
10995
|
}
|
10996
|
-
function
|
10996
|
+
function camelCaseToKebabCasePreservingKeyEquality(name) {
|
10997
10997
|
let result = "";
|
10998
10998
|
let isInUppercaseSequence = false;
|
10999
10999
|
for (let i = 0; i < name.length; i++) {
|
@@ -11047,13 +11047,6 @@ var NameFlags = /* @__PURE__ */ ((NameFlags2) => {
|
|
11047
11047
|
return NameFlags2;
|
11048
11048
|
})(NameFlags || {});
|
11049
11049
|
var Name = class _Name {
|
11050
|
-
/**
|
11051
|
-
* Исходное имя, при необходимости взятое в одиночные кавычки и содержащее обратные кавычки согласно флагам.
|
11052
|
-
* Не содержит символ '~'.
|
11053
|
-
*/
|
11054
|
-
get original() {
|
11055
|
-
return _Name.toOriginal(this.originalWithoutQuotes, this.flags);
|
11056
|
-
}
|
11057
11050
|
/**
|
11058
11051
|
* Ключ, используемый для сравнения имён на эквивалентность с учётом флагов. Получается из
|
11059
11052
|
* `keyWithoutBackQuotes` путём добавления символов '`' `meaningfulBackQuoteCount` число раз.
|
@@ -11077,21 +11070,12 @@ var Name = class _Name {
|
|
11077
11070
|
* @param flags Дополнительные флаги имени. `NameFlags.None` по умолчанию.
|
11078
11071
|
* @param preferredOriginal Имя, предпочтительное для использования. Принимается `original` по умолчанию.
|
11079
11072
|
*/
|
11080
|
-
constructor(original, flags = 0 /* None
|
11073
|
+
constructor(original, flags = 0 /* None */) {
|
11081
11074
|
const parsedOriginal = _Name.parse(original, flags);
|
11082
11075
|
this.originalWithoutQuotes = parsedOriginal.originalWithoutQuotes;
|
11083
11076
|
this.flags = parsedOriginal.flags | flags;
|
11084
11077
|
this.keyWithoutBackQuotes = parsedOriginal.keyWithoutQuotes;
|
11085
|
-
|
11086
|
-
this.preferredOriginal = _Name.toOriginal(parsedOriginal.originalWithoutQuotes, this.flags);
|
11087
|
-
} else {
|
11088
|
-
const parsedPreferredOriginal = _Name.parse(preferredOriginal, this.flags);
|
11089
|
-
Debug.assert(
|
11090
|
-
parsedPreferredOriginal.keyWithoutQuotes === this.keyWithoutBackQuotes,
|
11091
|
-
"\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u043C\u043E\u0435 \u0438\u043C\u044F \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u0440\u0430\u0432\u043D\u043E \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u043C\u0443 \u043F\u0440\u0438 \u0443\u043D\u0438\u0432\u0435\u0440\u0441\u0430\u043B\u044C\u043D\u043E\u043C \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u0438."
|
11092
|
-
);
|
11093
|
-
this.preferredOriginal = _Name.toOriginal(parsedPreferredOriginal.originalWithoutQuotes, this.flags);
|
11094
|
-
}
|
11078
|
+
this.original = _Name.toOriginal(parsedOriginal.originalWithoutQuotes, this.flags);
|
11095
11079
|
}
|
11096
11080
|
considerEqual(other, considerBackQuotes = true) {
|
11097
11081
|
let result;
|
@@ -11103,7 +11087,10 @@ var Name = class _Name {
|
|
11103
11087
|
return result;
|
11104
11088
|
}
|
11105
11089
|
toString() {
|
11106
|
-
return this.
|
11090
|
+
return this.original;
|
11091
|
+
}
|
11092
|
+
getPreferredOriginal(flags) {
|
11093
|
+
return _Name.toOriginal(this.originalWithoutQuotes, flags);
|
11107
11094
|
}
|
11108
11095
|
static parse(original, flags) {
|
11109
11096
|
let firstCharIndex = 0;
|
@@ -11143,9 +11130,7 @@ var Name = class _Name {
|
|
11143
11130
|
}
|
11144
11131
|
static toOriginal(originalWithoutQuotes, flags) {
|
11145
11132
|
let result;
|
11146
|
-
if ((flags & 8 /* RequiresQuotes */) !== 0) {
|
11147
|
-
result = `'${originalWithoutQuotes}'`;
|
11148
|
-
} else if ((flags & 16 /* EscapedKeyword */) !== 0) {
|
11133
|
+
if ((flags & (8 /* RequiresQuotes */ | 16 /* EscapedKeyword */)) !== 0) {
|
11149
11134
|
result = `'${originalWithoutQuotes}'`;
|
11150
11135
|
} else {
|
11151
11136
|
result = originalWithoutQuotes;
|
@@ -12074,8 +12059,7 @@ var englishKeywords = new Lazy(() => [
|
|
12074
12059
|
{ keyword: "static", kind: 42 /* Static */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12075
12060
|
{ keyword: "global", kind: 42 /* Static */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12076
12061
|
{ keyword: "await", kind: 47 /* Await */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12077
|
-
{ keyword: "
|
12078
|
-
{ keyword: "creation", kind: 27 /* OnCreate */, dialects: [1 /* Usual */] },
|
12062
|
+
{ keyword: "creation", kind: 27 /* Creation */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12079
12063
|
{ keyword: "on error", kind: 28 /* OnError */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12080
12064
|
{ keyword: "break loop", kind: 29 /* BreakLoop */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12081
12065
|
{ keyword: "continue loop", kind: 30 /* ContinueLoop */, dialects: [1 /* Usual */, 2 /* Special */] },
|
@@ -12084,8 +12068,7 @@ var englishKeywords = new Lazy(() => [
|
|
12084
12068
|
{ keyword: "none", kind: 59 /* None */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12085
12069
|
{ keyword: "dispose", kind: 48 /* Dispose */, dialects: [2 /* Special */] },
|
12086
12070
|
{ keyword: "destroy", kind: 48 /* Dispose */, dialects: [1 /* Usual */] },
|
12087
|
-
{ keyword: "
|
12088
|
-
{ keyword: "destruction", kind: 49 /* OnDispose */, dialects: [1 /* Usual */] },
|
12071
|
+
{ keyword: "destruction", kind: 49 /* Destruction */, dialects: [1 /* Usual */] },
|
12089
12072
|
{ keyword: "in type", kind: 53 /* InType */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12090
12073
|
{ keyword: "in hierarchy", kind: 50 /* InHierarchy */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12091
12074
|
{ keyword: "in file", kind: 51 /* InFile */, dialects: [1 /* Usual */, 2 /* Special */] },
|
@@ -12173,8 +12156,7 @@ var russianKeywords = new Lazy(() => [
|
|
12173
12156
|
{ keyword: "\u0432\u0441\u0435\u043E\u0431\u0449\u0438\u0439", kind: 42 /* Static */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12174
12157
|
{ keyword: "\u0432\u0441\u0435\u043E\u0431\u0449\u0430\u044F", kind: 42 /* Static */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12175
12158
|
{ keyword: "\u0432\u0441\u0435\u043E\u0431\u0449\u0438\u0435", kind: 42 /* Static */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12176
|
-
{ keyword: "\
|
12177
|
-
{ keyword: "\u0441\u043E\u0437\u0434\u0430\u043D\u0438\u0435", kind: 27 /* OnCreate */, dialects: [1 /* Usual */] },
|
12159
|
+
{ keyword: "\u0441\u043E\u0437\u0434\u0430\u043D\u0438\u0435", kind: 27 /* Creation */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12178
12160
|
{ keyword: "\u043F\u0440\u0438 \u043E\u0448\u0438\u0431\u043A\u0435", kind: 28 /* OnError */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12179
12161
|
{ keyword: "\u0434\u043E\u0436\u0434\u0430\u0442\u044C\u0441\u044F", kind: 47 /* Await */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12180
12162
|
{ keyword: "\u043F\u0440\u0435\u0440\u0432\u0430\u0442\u044C \u0446\u0438\u043A\u043B", kind: 29 /* BreakLoop */, dialects: [1 /* Usual */, 2 /* Special */] },
|
@@ -12183,8 +12165,7 @@ var russianKeywords = new Lazy(() => [
|
|
12183
12165
|
{ keyword: "\u043D\u0435", kind: 44 /* Not */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12184
12166
|
{ keyword: "\u043F\u0443\u0441\u0442\u043E", kind: 59 /* None */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12185
12167
|
{ keyword: "\u0443\u043D\u0438\u0447\u0442\u043E\u0436\u0438\u0442\u044C", kind: 48 /* Dispose */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12186
|
-
{ keyword: "\
|
12187
|
-
{ keyword: "\u0443\u043D\u0438\u0447\u0442\u043E\u0436\u0435\u043D\u0438\u0435", kind: 49 /* OnDispose */, dialects: [1 /* Usual */] },
|
12168
|
+
{ keyword: "\u0443\u043D\u0438\u0447\u0442\u043E\u0436\u0435\u043D\u0438\u0435", kind: 49 /* Destruction */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12188
12169
|
{ keyword: "\u0432 \u0442\u0438\u043F\u0435", kind: 53 /* InType */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12189
12170
|
{ keyword: "\u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438", kind: 50 /* InHierarchy */, dialects: [1 /* Usual */, 2 /* Special */] },
|
12190
12171
|
{ keyword: "\u0432 \u0444\u0430\u0439\u043B\u0435", kind: 51 /* InFile */, dialects: [1 /* Usual */, 2 /* Special */] },
|
@@ -15454,9 +15435,9 @@ var builtInSystemPackagesFileSystemTree = atomicRun(() => {
|
|
15454
15435
|
|
15455
15436
|
type Date = object
|
15456
15437
|
{
|
15457
|
-
|
15458
|
-
|
15459
|
-
|
15438
|
+
creation()
|
15439
|
+
creation(value: A.Text | A.Number | Date)
|
15440
|
+
creation(year: A.Integer, month-index: A.Integer, date: A.Integer? = none,
|
15460
15441
|
hours: A.Integer? = none, minutes: A.Integer? = none, seconds: A.Integer? = none, ms: A.Integer? = none)
|
15461
15442
|
}
|
15462
15443
|
`);
|
@@ -15464,9 +15445,9 @@ type Date = object
|
|
15464
15445
|
|
15465
15446
|
type Map<K: A.Object, V> = object
|
15466
15447
|
{
|
15467
|
-
|
15468
|
-
|
15469
|
-
|
15448
|
+
creation()
|
15449
|
+
creation(entries: A.ArrayReader<A.MapEntry<K, V>>)
|
15450
|
+
creation(iterable: Iterable<A.MapEntry<K, V>>)
|
15470
15451
|
}`);
|
15471
15452
|
fileSystemTree.addFile(new Uri("artel-builtin", ["\u0421\u0438\u0441\u0442\u0435\u043C\u043D\u044B\u0435\u041F\u0430\u043A\u0435\u0442\u044B", "Platform.JavaScript", "Source", "String.art"]), `import A = Artel
|
15472
15453
|
|
@@ -17266,7 +17247,7 @@ var englishErrorMessages = {
|
|
17266
17247
|
[22 /* TranslationExpected */]: "Translation expected.",
|
17267
17248
|
[23 /* Expected0But1Found */]: "Expected '{0}', but '{1}' found.",
|
17268
17249
|
[24 /* InvalidTextTemplateLiteral */]: "Invalid text template literal.",
|
17269
|
-
[25 /* RunKeywordOnCreateKeywordOrModifierListExpected */]: "'Run' keyword, '
|
17250
|
+
[25 /* RunKeywordOnCreateKeywordOrModifierListExpected */]: "'Run' keyword, 'creation' keyword or modifier list expected.",
|
17270
17251
|
[26 /* ModifierListExpected */]: "Modifier list expected.",
|
17271
17252
|
[27 /* HidingLevelExpected */]: "Hiding level expected.",
|
17272
17253
|
[28 /* PropertyOrElementAccessExpected */]: "Property or element access expected.",
|
@@ -17412,7 +17393,7 @@ var russianErrorMessages = {
|
|
17412
17393
|
[22 /* TranslationExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u0441\u044F \u043F\u0435\u0440\u0435\u0432\u043E\u0434.",
|
17413
17394
|
[23 /* Expected0But1Found */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C '{0}', \u043D\u043E \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043B\u043E\u0441\u044C '{1}'.",
|
17414
17395
|
[24 /* InvalidTextTemplateLiteral */]: "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0439 \u0448\u0430\u0431\u043B\u043E\u043D.",
|
17415
|
-
[25 /* RunKeywordOnCreateKeywordOrModifierListExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u0438\u0441\u044C \
|
17396
|
+
[25 /* RunKeywordOnCreateKeywordOrModifierListExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u0438\u0441\u044C \u0441\u043B\u0443\u0436\u0435\u0431\u043D\u044B\u0435 \u0441\u043B\u043E\u0432\u0430 '\u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C', '\u0441\u043E\u0437\u0434\u0430\u043D\u0438\u0435' \u0438\u043B\u0438 \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u043E\u0432.",
|
17416
17397
|
[26 /* ModifierListExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u0441\u044F \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u043E\u0432.",
|
17417
17398
|
[28 /* PropertyOrElementAccessExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u0435 \u043A \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0443 \u0438\u043B\u0438 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0443.",
|
17418
17399
|
[29 /* VariantNotFound */]: "\u0412\u0430\u0440\u0438\u0430\u043D\u0442 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D.",
|
@@ -19154,9 +19135,9 @@ var PackageMemberDeclarationParser = class {
|
|
19154
19135
|
return this.parser.intern(result, declarationStart);
|
19155
19136
|
}
|
19156
19137
|
parseSourceFileConstructorDeclaration(declarationStart, tagList, modifierList) {
|
19157
|
-
const
|
19138
|
+
const creationKeyword = this.parser.parseExpectedKeyword(27 /* Creation */);
|
19158
19139
|
const body = this.parser.statementBlockParser.parseStatementBlock();
|
19159
|
-
const result = new PackageConstructorDeclaration2(tagList, modifierList,
|
19140
|
+
const result = new PackageConstructorDeclaration2(tagList, modifierList, creationKeyword, body);
|
19160
19141
|
return this.parser.intern(result, declarationStart);
|
19161
19142
|
}
|
19162
19143
|
parsePackageGroupDeclaration(declarationStart, tagList, modifierList) {
|
@@ -19315,7 +19296,7 @@ var PackageMemberDeclarationParser = class {
|
|
19315
19296
|
return (declarationStart, tagList, modifierList) => this.parsePackageMethodDeclaration(declarationStart, tagList, modifierList);
|
19316
19297
|
case 15 /* Type */:
|
19317
19298
|
return (declarationStart, tagList, modifierList) => this.parsePackageTypeOrTypeExtensionDeclaration(declarationStart, tagList, modifierList);
|
19318
|
-
case 27 /*
|
19299
|
+
case 27 /* Creation */:
|
19319
19300
|
return (declarationStart, tagList, modifierList) => this.parseSourceFileConstructorDeclaration(declarationStart, tagList, modifierList);
|
19320
19301
|
case 7 /* Run */:
|
19321
19302
|
return (declarationStart, tagList, modifierList) => this.parsePackageEntryPointDeclaration(declarationStart, tagList, modifierList);
|
@@ -19413,17 +19394,17 @@ var TypeMemberDeclarationParser = class {
|
|
19413
19394
|
return this.parser.intern(result, declarationStart);
|
19414
19395
|
}
|
19415
19396
|
parseTypeConstructorDeclaration(declarationStart, tagList, modifierList) {
|
19416
|
-
const
|
19397
|
+
const creationKeyword = this.parser.parseExpectedKeyword(27 /* Creation */);
|
19417
19398
|
const parameterClause = this.parser.parameterParser.parseParameterClause();
|
19418
19399
|
const body = this.parser.parseOptionalExecutableBody();
|
19419
|
-
const result = new TypeConstructorDeclaration2(tagList, modifierList,
|
19400
|
+
const result = new TypeConstructorDeclaration2(tagList, modifierList, creationKeyword, parameterClause, body);
|
19420
19401
|
return this.parser.intern(result, declarationStart);
|
19421
19402
|
}
|
19422
19403
|
parseTypeDestructorDeclaration(declarationStart, tagList, modifierList) {
|
19423
|
-
const
|
19404
|
+
const destructionKeyword = this.parser.parseExpectedKeyword(49 /* Destruction */);
|
19424
19405
|
const parameterClause = this.parser.parameterParser.parseParameterClause();
|
19425
19406
|
const body = this.parser.parseOptionalExecutableBody();
|
19426
|
-
const result = new TypeDestructorDeclaration2(tagList, modifierList,
|
19407
|
+
const result = new TypeDestructorDeclaration2(tagList, modifierList, destructionKeyword, parameterClause, body);
|
19427
19408
|
return this.parser.intern(result, declarationStart);
|
19428
19409
|
}
|
19429
19410
|
parseTypeVariableDeclaration(declarationStart, tagList, modifierList) {
|
@@ -19579,9 +19560,9 @@ var TypeMemberDeclarationParser = class {
|
|
19579
19560
|
return (declarationStart, tags, modifiers) => this.parseTypeMemberSetterDeclaration(declarationStart, tags, modifiers);
|
19580
19561
|
case 11 /* Operation */:
|
19581
19562
|
return (declarationStart, tags, modifiers) => this.parseTypeMethodDeclaration(declarationStart, tags, modifiers);
|
19582
|
-
case 27 /*
|
19563
|
+
case 27 /* Creation */:
|
19583
19564
|
return (declarationStart, tags, modifiers) => this.parseTypeConstructorDeclaration(declarationStart, tags, modifiers);
|
19584
|
-
case 49 /*
|
19565
|
+
case 49 /* Destruction */:
|
19585
19566
|
return (declarationStart, tags, modifiers) => this.parseTypeDestructorDeclaration(declarationStart, tags, modifiers);
|
19586
19567
|
}
|
19587
19568
|
}
|
@@ -20198,7 +20179,7 @@ var TranslationsDeclarationParser = class {
|
|
20198
20179
|
switch (this.parser.currentTokenOrKeyword.keywordKind) {
|
20199
20180
|
case 11 /* Operation */:
|
20200
20181
|
return () => this.parseTypeMethodTranslation();
|
20201
|
-
case 27 /*
|
20182
|
+
case 27 /* Creation */:
|
20202
20183
|
return () => this.parseConstructorTranslation();
|
20203
20184
|
}
|
20204
20185
|
}
|
@@ -20275,12 +20256,12 @@ var TranslationsDeclarationParser = class {
|
|
20275
20256
|
}
|
20276
20257
|
parseConstructorTranslation() {
|
20277
20258
|
const translationStart = this.parser.tokenOrKeywordStartPosition();
|
20278
|
-
const
|
20259
|
+
const creationKeyword = this.parser.parseExpectedKeyword(27 /* Creation */);
|
20279
20260
|
const sourceParameterClause = this.parseParameterClause();
|
20280
20261
|
const minusGreaterThanToken = this.parser.parseExpectedToken(42 /* MinusGreaterThan */);
|
20281
20262
|
const translatedParameterClause = this.parseParameterClause();
|
20282
20263
|
const result = new ConstructorTranslation2(
|
20283
|
-
|
20264
|
+
creationKeyword,
|
20284
20265
|
sourceParameterClause,
|
20285
20266
|
minusGreaterThanToken,
|
20286
20267
|
translatedParameterClause
|
@@ -21073,7 +21054,7 @@ var PackageName = class _PackageName {
|
|
21073
21054
|
return this.segments.length === name.segments.length && this.segments.every((s, i) => s.considerEqual(name.segments[i], false));
|
21074
21055
|
}
|
21075
21056
|
toString(original = true) {
|
21076
|
-
return this.segments.map((s) => original ? s.
|
21057
|
+
return this.segments.map((s) => original ? s.original : s.keyWithoutBackQuotes).join(".");
|
21077
21058
|
}
|
21078
21059
|
};
|
21079
21060
|
var RequiredPackageConfig;
|
@@ -24698,12 +24679,12 @@ var AnalyzedTranslationPackage = class {
|
|
24698
24679
|
result = GetMultipleTranslationTargetsResult.valid(suitableMembers);
|
24699
24680
|
} else {
|
24700
24681
|
result = GetMultipleTranslationTargetsResult.invalid([
|
24701
|
-
this._analyzer.createNodeDiagnostic(83 /* AmbiguousAccess */, node.
|
24682
|
+
this._analyzer.createNodeDiagnostic(83 /* AmbiguousAccess */, node.creationKeyword)
|
24702
24683
|
], members, true);
|
24703
24684
|
}
|
24704
24685
|
} else {
|
24705
24686
|
result = GetMultipleTranslationTargetsResult.invalid([
|
24706
|
-
this._analyzer.createNodeDiagnostic(55 /* TypeConstructorNotFound */, node.
|
24687
|
+
this._analyzer.createNodeDiagnostic(55 /* TypeConstructorNotFound */, node.creationKeyword)
|
24707
24688
|
]);
|
24708
24689
|
}
|
24709
24690
|
return result;
|
@@ -25741,10 +25722,10 @@ var DisplayService = class {
|
|
25741
25722
|
}
|
25742
25723
|
displayPackageAliasEntity(entity) {
|
25743
25724
|
const path = entity.getDefinition().node.packagePath.segments.map((i) => i.value).join(".");
|
25744
|
-
return `${this.displayKeyword(16 /* Import */)} ${entity.getName().
|
25725
|
+
return `${this.displayKeyword(16 /* Import */)} ${entity.getName().original} = ${path}`;
|
25745
25726
|
}
|
25746
25727
|
displayPackage(package_) {
|
25747
|
-
const nameSegments = package_.getName().segments.map((s) => s.
|
25728
|
+
const nameSegments = package_.getName().segments.map((s) => s.original);
|
25748
25729
|
return `${this.displayHelperPhrase(3 /* Package */)} ${nameSegments.join(".")}`;
|
25749
25730
|
}
|
25750
25731
|
displayValueParameterDeclaration(parameter, typeDisplayOptions) {
|
@@ -25823,9 +25804,9 @@ var DisplayService = class {
|
|
25823
25804
|
);
|
25824
25805
|
}
|
25825
25806
|
displayDestructorDeclaration(constructor) {
|
25826
|
-
const
|
25807
|
+
const destructionKeyword = this.displayKeyword(49 /* Destruction */);
|
25827
25808
|
const valueParametersText = constructor.getValueParameters().map((p) => this.getValueParameterDeclarationDisplayParts(p)).join(", ");
|
25828
|
-
return `${
|
25809
|
+
return `${destructionKeyword}(${valueParametersText})`;
|
25829
25810
|
}
|
25830
25811
|
displayIndexerDeclaration(indexer) {
|
25831
25812
|
return this.getIndexerDeclarationDisplayParts(indexer).toString();
|
@@ -26204,7 +26185,7 @@ var DisplayService = class {
|
|
26204
26185
|
return LocalizationHelper.localizeHelperPhrase(kind, locale);
|
26205
26186
|
}
|
26206
26187
|
displayEntityName(entity, localization) {
|
26207
|
-
return this.getEntityName(entity, localization).
|
26188
|
+
return this.getEntityName(entity, localization).original;
|
26208
26189
|
}
|
26209
26190
|
displayTypeEntityAsUsage(entity) {
|
26210
26191
|
const typeUsage = typeEntityToTypeUsage(entity);
|
@@ -26775,7 +26756,7 @@ var ValueParameterDeclaration_entity = class {
|
|
26775
26756
|
this.kind = "entity";
|
26776
26757
|
}
|
26777
26758
|
getName() {
|
26778
|
-
return this.value.getName().
|
26759
|
+
return this.value.getName().original;
|
26779
26760
|
}
|
26780
26761
|
getEntity() {
|
26781
26762
|
return this.value;
|
@@ -26797,7 +26778,7 @@ var ValueParameterDeclaration_typeMember = class {
|
|
26797
26778
|
this.kind = "type-member";
|
26798
26779
|
}
|
26799
26780
|
getName() {
|
26800
|
-
return this.value.getName().
|
26781
|
+
return this.value.getName().original;
|
26801
26782
|
}
|
26802
26783
|
getEntity() {
|
26803
26784
|
return this.value.getEntity();
|
@@ -26819,7 +26800,7 @@ var ValueParameterDeclaration_substitutedMethod = class {
|
|
26819
26800
|
this.localization = localization;
|
26820
26801
|
}
|
26821
26802
|
getName() {
|
26822
|
-
return this.entity.getName().
|
26803
|
+
return this.entity.getName().original;
|
26823
26804
|
}
|
26824
26805
|
getEntity() {
|
26825
26806
|
return this.entity;
|
@@ -26841,7 +26822,7 @@ var ValueParameterDeclaration_matchResultValueParameter = class {
|
|
26841
26822
|
this.kind = "type-member";
|
26842
26823
|
}
|
26843
26824
|
getName() {
|
26844
|
-
return this.parameter.entity.getName().
|
26825
|
+
return this.parameter.entity.getName().original;
|
26845
26826
|
}
|
26846
26827
|
getEntity() {
|
26847
26828
|
return this.parameter.entity;
|
@@ -26863,7 +26844,7 @@ var ValueParameterDeclaration_universal = class {
|
|
26863
26844
|
this.localization = localization;
|
26864
26845
|
}
|
26865
26846
|
getName() {
|
26866
|
-
return this.entity.getName().
|
26847
|
+
return this.entity.getName().original;
|
26867
26848
|
}
|
26868
26849
|
getEntity() {
|
26869
26850
|
return this.entity;
|
@@ -34244,15 +34225,15 @@ var DebugStack = class _DebugStack {
|
|
34244
34225
|
result += "Package entry point\n";
|
34245
34226
|
break;
|
34246
34227
|
case 23 /* PackageMethodDeclaration */:
|
34247
|
-
result += `Package method '${getEntityNameRequired(node.entity).
|
34228
|
+
result += `Package method '${getEntityNameRequired(node.entity).original}'
|
34248
34229
|
`;
|
34249
34230
|
break;
|
34250
34231
|
case 24 /* PackageTypeDeclaration */:
|
34251
|
-
result += `Package structured type '${getEntityNameRequired(node.entity).
|
34232
|
+
result += `Package structured type '${getEntityNameRequired(node.entity).original}'
|
34252
34233
|
`;
|
34253
34234
|
break;
|
34254
34235
|
case 25 /* PackageVariableDeclaration */:
|
34255
|
-
result += `Package variable '${getEntityNameRequired(node.entity).
|
34236
|
+
result += `Package variable '${getEntityNameRequired(node.entity).original}'
|
34256
34237
|
`;
|
34257
34238
|
break;
|
34258
34239
|
case 26 /* PackageVariableGetterDeclaration */:
|
@@ -34262,11 +34243,11 @@ var DebugStack = class _DebugStack {
|
|
34262
34243
|
result += "Setter\n";
|
34263
34244
|
break;
|
34264
34245
|
case 28 /* PackageVariantTypeDeclaration */:
|
34265
|
-
result += `Package variant type '${getEntityNameRequired(node.entity).
|
34246
|
+
result += `Package variant type '${getEntityNameRequired(node.entity).original}'
|
34266
34247
|
`;
|
34267
34248
|
break;
|
34268
34249
|
case 34 /* NestedMethodDeclaration */:
|
34269
|
-
result += `Nested method '${getEntityNameRequired(node.entity).
|
34250
|
+
result += `Nested method '${getEntityNameRequired(node.entity).original}'
|
34270
34251
|
`;
|
34271
34252
|
break;
|
34272
34253
|
case 40 /* OnErrorClause */:
|
@@ -34294,11 +34275,11 @@ var DebugStack = class _DebugStack {
|
|
34294
34275
|
result += "Setter\n";
|
34295
34276
|
break;
|
34296
34277
|
case 56 /* TypeMethodDeclaration */:
|
34297
|
-
result += `Type method '${getEntityNameRequired(node.entity).
|
34278
|
+
result += `Type method '${getEntityNameRequired(node.entity).original}'
|
34298
34279
|
`;
|
34299
34280
|
break;
|
34300
34281
|
case 57 /* TypeVariableDeclaration */:
|
34301
|
-
result += `Type variable '${getEntityNameRequired(node.entity).
|
34282
|
+
result += `Type variable '${getEntityNameRequired(node.entity).original}'
|
34302
34283
|
`;
|
34303
34284
|
break;
|
34304
34285
|
case 58 /* TypeVariableGetterDeclaration */:
|
@@ -38842,7 +38823,7 @@ var TextTemplateLowering = class {
|
|
38842
38823
|
const naming = this._ectx.analyzer.wellKnownDeclarations.textTemplate.getNaming();
|
38843
38824
|
Debug.assert(naming.kind === "named");
|
38844
38825
|
const textTemplate = this._ectx.utils.getPackageStructuredTypeRequired(
|
38845
|
-
naming.value.
|
38826
|
+
naming.value.original,
|
38846
38827
|
this._ectx.systemJsPackage
|
38847
38828
|
);
|
38848
38829
|
return textTemplate;
|
@@ -39601,7 +39582,7 @@ var EmitterContext3 = class _EmitterContext {
|
|
39601
39582
|
return Query.from(this.packageGraph.enumeratePackages(this.targetPlatform)).filter((p) => p.kind === "program" && !p.configuration.isInterfacePackage());
|
39602
39583
|
}
|
39603
39584
|
/**
|
39604
|
-
* Главным считается файл главного пакета, в котором находится блок "
|
39585
|
+
* Главным считается файл главного пакета, в котором находится блок "создание" или блок "выполнить".
|
39605
39586
|
*/
|
39606
39587
|
getMainFileUri() {
|
39607
39588
|
let result;
|
@@ -41449,7 +41430,7 @@ var JsStandardTypes = class {
|
|
41449
41430
|
}).first();
|
41450
41431
|
Debug.assertNotNull(
|
41451
41432
|
result,
|
41452
|
-
`\u041F\u0430\u043A\u0435\u0442 ${this._ectx.systemJsPackage.getName()} \u0434\u043E\u043B\u0436\u0435\u043D \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0435 \u0442\u0438\u043F\u0430 ${naming.value.
|
41433
|
+
`\u041F\u0430\u043A\u0435\u0442 ${this._ectx.systemJsPackage.getName()} \u0434\u043E\u043B\u0436\u0435\u043D \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0435 \u0442\u0438\u043F\u0430 ${naming.value.original}.`
|
41453
41434
|
);
|
41454
41435
|
return result;
|
41455
41436
|
}
|
@@ -46927,8 +46908,8 @@ var TsInteropContext3 = class {
|
|
46927
46908
|
break;
|
46928
46909
|
case "variable":
|
46929
46910
|
case "method": {
|
46930
|
-
const convertedName =
|
46931
|
-
result = new Name(
|
46911
|
+
const convertedName = camelCaseToKebabCasePreservingKeyEquality(original);
|
46912
|
+
result = new Name(convertedName, 0 /* None */);
|
46932
46913
|
break;
|
46933
46914
|
}
|
46934
46915
|
default:
|
@@ -55044,7 +55025,7 @@ var Analyzer2 = class _Analyzer {
|
|
55044
55025
|
if (!isComputedVariableEntity(declaredVariable)) {
|
55045
55026
|
continue;
|
55046
55027
|
}
|
55047
|
-
const backingVariableName = new Name(declaredVariable.getName().
|
55028
|
+
const backingVariableName = new Name(declaredVariable.getName().original, 64 /* BackingVariableName */);
|
55048
55029
|
if (declaredVariableByName.has(backingVariableName.key)) {
|
55049
55030
|
continue;
|
55050
55031
|
}
|
@@ -55069,7 +55050,7 @@ var Analyzer2 = class _Analyzer {
|
|
55069
55050
|
if (!isComputedVariableEntity(declaredVariable)) {
|
55070
55051
|
continue;
|
55071
55052
|
}
|
55072
|
-
const backingVariableName = new Name(declaredVariable.getName().
|
55053
|
+
const backingVariableName = new Name(declaredVariable.getName().original, 64 /* BackingVariableName */);
|
55073
55054
|
if (declaredVariableByName.has(backingVariableName.key)) {
|
55074
55055
|
continue;
|
55075
55056
|
}
|
@@ -55385,7 +55366,7 @@ var WellKnownDeclarationsLoader = class {
|
|
55385
55366
|
throw new WellKnownDeclarationsLoadError(new Diagnostic(
|
55386
55367
|
DiagnosticData.withCode(
|
55387
55368
|
143 /* Declaration0NotFoundInStandardPackage1 */,
|
55388
|
-
[name.
|
55369
|
+
[name.original, packageEntity.getName().toString()]
|
55389
55370
|
),
|
55390
55371
|
void 0
|
55391
55372
|
));
|
@@ -55398,7 +55379,7 @@ var WellKnownDeclarationsLoader = class {
|
|
55398
55379
|
throw new WellKnownDeclarationsLoadError(new Diagnostic(
|
55399
55380
|
DiagnosticData.withCode(
|
55400
55381
|
143 /* Declaration0NotFoundInStandardPackage1 */,
|
55401
|
-
[name.
|
55382
|
+
[name.original, packageEntity.getName().toString()]
|
55402
55383
|
),
|
55403
55384
|
void 0
|
55404
55385
|
));
|
@@ -55411,7 +55392,7 @@ var WellKnownDeclarationsLoader = class {
|
|
55411
55392
|
throw new WellKnownDeclarationsLoadError(new Diagnostic(
|
55412
55393
|
DiagnosticData.withCode(
|
55413
55394
|
143 /* Declaration0NotFoundInStandardPackage1 */,
|
55414
|
-
[name.
|
55395
|
+
[name.original, packageEntity.getName().toString()]
|
55415
55396
|
),
|
55416
55397
|
void 0
|
55417
55398
|
));
|
@@ -59345,11 +59326,11 @@ var DiagnosticCollector = class _DiagnosticCollector {
|
|
59345
59326
|
if (node.body !== void 0) {
|
59346
59327
|
this.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
59347
59328
|
105 /* InterfacePackageMustNotContainImplementation */,
|
59348
|
-
node.
|
59329
|
+
node.creationKeyword
|
59349
59330
|
));
|
59350
59331
|
}
|
59351
59332
|
} else {
|
59352
|
-
this.checkTypeMemberBodyPresence(node, node.body, node.
|
59333
|
+
this.checkTypeMemberBodyPresence(node, node.body, node.creationKeyword);
|
59353
59334
|
}
|
59354
59335
|
break;
|
59355
59336
|
}
|
@@ -59358,11 +59339,11 @@ var DiagnosticCollector = class _DiagnosticCollector {
|
|
59358
59339
|
if (node.body !== void 0) {
|
59359
59340
|
this.addDiagnostic(this._analyzer.createNodeDiagnostic(
|
59360
59341
|
105 /* InterfacePackageMustNotContainImplementation */,
|
59361
|
-
node.
|
59342
|
+
node.destructionKeyword
|
59362
59343
|
));
|
59363
59344
|
}
|
59364
59345
|
} else {
|
59365
|
-
this.checkTypeMemberBodyPresence(node, node.body, node.
|
59346
|
+
this.checkTypeMemberBodyPresence(node, node.body, node.destructionKeyword);
|
59366
59347
|
}
|
59367
59348
|
break;
|
59368
59349
|
}
|
@@ -60694,7 +60675,7 @@ var EntityNaming_named = class {
|
|
60694
60675
|
this.kind = "named";
|
60695
60676
|
}
|
60696
60677
|
toString() {
|
60697
|
-
return this.value.
|
60678
|
+
return this.value.original;
|
60698
60679
|
}
|
60699
60680
|
};
|
60700
60681
|
var EntityNaming_anonymous = class {
|
@@ -63660,7 +63641,7 @@ export {
|
|
63660
63641
|
withoutQuotes,
|
63661
63642
|
unescapeText,
|
63662
63643
|
kebabCaseToCamelCase,
|
63663
|
-
|
63644
|
+
camelCaseToKebabCasePreservingKeyEquality,
|
63664
63645
|
NameFlags,
|
63665
63646
|
Name,
|
63666
63647
|
createNonEmptyArray,
|
@@ -36,19 +36,18 @@ export declare const enum NameFlags {
|
|
36
36
|
}
|
37
37
|
export declare class Name {
|
38
38
|
/**
|
39
|
-
* Исходное имя без
|
39
|
+
* Исходное имя без одиночных кавычек и без символов '\`' в конце. Не содержит символ '~'.
|
40
40
|
*/
|
41
41
|
readonly originalWithoutQuotes: string;
|
42
42
|
/**
|
43
|
-
*
|
43
|
+
* Исходное имя, при необходимости взятое в одиночные кавычки и содержащее обратные кавычки согласно флагам.
|
44
|
+
* Не содержит символ '~'.
|
44
45
|
*/
|
45
|
-
readonly
|
46
|
+
readonly original: string;
|
46
47
|
/**
|
47
|
-
*
|
48
|
-
* (`original`). Может отличаться от исходного в случае, если получено путём эквивалентного преобразования
|
49
|
-
* из исходного, например, из формата camelCase в формат kebab-case при загрузке объявлений из d.ts-файла.
|
48
|
+
* Флаги, указывающие на наличии у имени символов '~', '\`', одиночных кавычек и их смысл.
|
50
49
|
*/
|
51
|
-
readonly
|
50
|
+
readonly flags: NameFlags;
|
52
51
|
/**
|
53
52
|
* Ключ, используемый для сравнения имён на эквивалентность без учёта флагов, а также для генерации кода.
|
54
53
|
* Получается из исходного имени путём:
|
@@ -56,11 +55,6 @@ export declare class Name {
|
|
56
55
|
* 2. удаления символов '-' и замены первых следующих за ними букв на заглавные.
|
57
56
|
*/
|
58
57
|
readonly keyWithoutBackQuotes: string;
|
59
|
-
/**
|
60
|
-
* Исходное имя, при необходимости взятое в одиночные кавычки и содержащее обратные кавычки согласно флагам.
|
61
|
-
* Не содержит символ '~'.
|
62
|
-
*/
|
63
|
-
get original(): string;
|
64
58
|
/**
|
65
59
|
* Ключ, используемый для сравнения имён на эквивалентность с учётом флагов. Получается из
|
66
60
|
* `keyWithoutBackQuotes` путём добавления символов '`' `meaningfulBackQuoteCount` число раз.
|
@@ -75,9 +69,10 @@ export declare class Name {
|
|
75
69
|
* @param flags Дополнительные флаги имени. `NameFlags.None` по умолчанию.
|
76
70
|
* @param preferredOriginal Имя, предпочтительное для использования. Принимается `original` по умолчанию.
|
77
71
|
*/
|
78
|
-
constructor(original: string, flags?: NameFlags
|
72
|
+
constructor(original: string, flags?: NameFlags);
|
79
73
|
considerEqual(other: Name, considerBackQuotes?: boolean): boolean;
|
80
74
|
toString(): string;
|
75
|
+
getPreferredOriginal(flags: NameFlags): string;
|
81
76
|
private static parse;
|
82
77
|
private static toOriginal;
|
83
78
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
export declare function kebabCaseToCamelCase(s: string): string;
|
2
2
|
/**
|
3
|
-
* Преобразует имя в формат kebab-case таким образом, чтобы
|
4
|
-
* с исходным метод `Name.universallyEquals` вернул `true`.
|
3
|
+
* Преобразует имя в формат kebab-case таким образом, чтобы ключ имени (`Name.key`) остался прежним.
|
5
4
|
*
|
6
5
|
* @example
|
7
6
|
* myIdentifier -> my-identifier
|
@@ -9,4 +8,4 @@ export declare function kebabCaseToCamelCase(s: string): string;
|
|
9
8
|
* MY_NAME -> MY_NAME
|
10
9
|
* decodeURIComponent -> decode-URI-component
|
11
10
|
*/
|
12
|
-
export declare function
|
11
|
+
export declare function camelCaseToKebabCasePreservingKeyEquality(name: string): string;
|
@@ -53,7 +53,7 @@ export declare class EmitterContext {
|
|
53
53
|
enumerateEmittingPackages(): Iterable<EmitterPackage>;
|
54
54
|
enumerateEmittingSourcePackages(): Iterable<ProgramPackage>;
|
55
55
|
/**
|
56
|
-
* Главным считается файл главного пакета, в котором находится блок "
|
56
|
+
* Главным считается файл главного пакета, в котором находится блок "создание" или блок "выполнить".
|
57
57
|
*/
|
58
58
|
getMainFileUri(): Uri | undefined;
|
59
59
|
getTypeIndexedElementGetter(indexer: IndexerEntity): TypeMethodEntity;
|
@@ -60,7 +60,7 @@ export declare class LanguageServer {
|
|
60
60
|
private onExecuteCommand;
|
61
61
|
private onAddPropertyAssignment;
|
62
62
|
private convertSourceFileEdit;
|
63
|
-
private
|
63
|
+
private onGetNodeRange;
|
64
64
|
private onCreateOrUpdateSourceFile;
|
65
65
|
private onDeleteSourceFile;
|
66
66
|
private onDisplayFileSystemTree;
|
@@ -26,7 +26,7 @@ export declare enum KeywordKind {
|
|
26
26
|
RepeatWhile = 24,
|
27
27
|
Yield = 25,
|
28
28
|
When = 26,
|
29
|
-
|
29
|
+
Creation = 27,
|
30
30
|
OnError = 28,
|
31
31
|
BreakLoop = 29,
|
32
32
|
ContinueLoop = 30,
|
@@ -48,7 +48,7 @@ export declare enum KeywordKind {
|
|
48
48
|
Case = 46,
|
49
49
|
Await = 47,
|
50
50
|
Dispose = 48,
|
51
|
-
|
51
|
+
Destruction = 49,
|
52
52
|
InHierarchy = 50,
|
53
53
|
InFile = 51,
|
54
54
|
InPackage = 52,
|
@@ -304,15 +304,15 @@ export declare class PackageConstructorDeclaration extends BaseNode {
|
|
304
304
|
readonly children: readonly [
|
305
305
|
TagList,
|
306
306
|
ModifierList,
|
307
|
-
Keyword<KeywordKind.
|
307
|
+
Keyword<KeywordKind.Creation>,
|
308
308
|
StatementBlock
|
309
309
|
];
|
310
310
|
get tagList(): TagList;
|
311
311
|
get modifierList(): ModifierList;
|
312
|
-
get
|
312
|
+
get creationKeyword(): Keyword<KeywordKind.Creation>;
|
313
313
|
get body(): StatementBlock;
|
314
314
|
protected get thisAsNode(): Node;
|
315
|
-
constructor(tagList: TagList, modifierList: ModifierList,
|
315
|
+
constructor(tagList: TagList, modifierList: ModifierList, creationKeyword: Keyword<KeywordKind.Creation>, body: StatementBlock);
|
316
316
|
toRed(rangeStart: number, parent: red.PackageMemberDeclarationParent): red.PackageConstructorDeclaration;
|
317
317
|
}
|
318
318
|
export declare class PackageEntryPointDeclaration extends BaseNode {
|
@@ -634,17 +634,17 @@ export declare class TypeConstructorDeclaration extends BaseNode {
|
|
634
634
|
readonly children: readonly [
|
635
635
|
TagList,
|
636
636
|
ModifierList,
|
637
|
-
Keyword<KeywordKind.
|
637
|
+
Keyword<KeywordKind.Creation>,
|
638
638
|
ParameterClause,
|
639
639
|
StatementBlock | undefined
|
640
640
|
];
|
641
641
|
get tagList(): TagList;
|
642
642
|
get modifierList(): ModifierList;
|
643
|
-
get
|
643
|
+
get creationKeyword(): Keyword<KeywordKind.Creation>;
|
644
644
|
get parameterClause(): ParameterClause;
|
645
645
|
get body(): StatementBlock | undefined;
|
646
646
|
protected get thisAsNode(): Node;
|
647
|
-
constructor(tagList: TagList, modifierList: ModifierList,
|
647
|
+
constructor(tagList: TagList, modifierList: ModifierList, creationKeyword: Keyword<KeywordKind.Creation>, parameterClause: ParameterClause, body: StatementBlock | undefined);
|
648
648
|
toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeConstructorDeclaration;
|
649
649
|
}
|
650
650
|
export declare class TypeDestructorDeclaration extends BaseNode {
|
@@ -652,17 +652,17 @@ export declare class TypeDestructorDeclaration extends BaseNode {
|
|
652
652
|
readonly children: readonly [
|
653
653
|
TagList,
|
654
654
|
ModifierList,
|
655
|
-
Keyword<KeywordKind.
|
655
|
+
Keyword<KeywordKind.Destruction>,
|
656
656
|
ParameterClause,
|
657
657
|
StatementBlock | undefined
|
658
658
|
];
|
659
659
|
get tagList(): TagList;
|
660
660
|
get modifierList(): ModifierList;
|
661
|
-
get
|
661
|
+
get destructionKeyword(): Keyword<KeywordKind.Destruction>;
|
662
662
|
get parameterClause(): ParameterClause;
|
663
663
|
get body(): StatementBlock | undefined;
|
664
664
|
protected get thisAsNode(): Node;
|
665
|
-
constructor(tagList: TagList, modifierList: ModifierList,
|
665
|
+
constructor(tagList: TagList, modifierList: ModifierList, destructionKeyword: Keyword<KeywordKind.Destruction>, parameterClause: ParameterClause, body: StatementBlock | undefined);
|
666
666
|
toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeDestructorDeclaration;
|
667
667
|
}
|
668
668
|
export declare class TypeIndexedGetterDeclaration extends BaseNode {
|
@@ -1751,17 +1751,17 @@ export declare class TranslationParameterClause extends BaseNode {
|
|
1751
1751
|
export declare class ConstructorTranslation extends BaseNode {
|
1752
1752
|
readonly kind = NodeKind.ConstructorTranslation;
|
1753
1753
|
readonly children: readonly [
|
1754
|
-
Keyword<KeywordKind.
|
1754
|
+
Keyword<KeywordKind.Creation>,
|
1755
1755
|
TranslationParameterClause,
|
1756
1756
|
Token<TokenKind.MinusGreaterThan>,
|
1757
1757
|
TranslationParameterClause
|
1758
1758
|
];
|
1759
|
-
get
|
1759
|
+
get creationKeyword(): Keyword<KeywordKind.Creation>;
|
1760
1760
|
get sourceParameterClause(): TranslationParameterClause;
|
1761
1761
|
get minusGreaterThanToken(): Token<TokenKind.MinusGreaterThan>;
|
1762
1762
|
get translatedParameterClause(): TranslationParameterClause;
|
1763
1763
|
protected get thisAsNode(): Node;
|
1764
|
-
constructor(
|
1764
|
+
constructor(creationKeyword: Keyword<KeywordKind.Creation>, sourceParameterClause: TranslationParameterClause, minusGreaterThanToken: Token<TokenKind.MinusGreaterThan>, translatedParameterClause: TranslationParameterClause);
|
1765
1765
|
toRed(rangeStart: number, parent: red.TypeMemberTranslationParent): red.ConstructorTranslation;
|
1766
1766
|
}
|
1767
1767
|
export declare class IndexerTranslationParameterClause extends BaseNode {
|
@@ -334,10 +334,10 @@ export declare class PackageConstructorDeclaration extends BaseNode {
|
|
334
334
|
readonly green: green.PackageConstructorDeclaration;
|
335
335
|
readonly parent: PackageMemberDeclarationParent;
|
336
336
|
private _children;
|
337
|
-
get children(): readonly [TagList, ModifierList, Keyword<green.KeywordKind.
|
337
|
+
get children(): readonly [TagList, ModifierList, Keyword<green.KeywordKind.Creation>, StatementBlock];
|
338
338
|
get tagList(): TagList;
|
339
339
|
get modifierList(): ModifierList;
|
340
|
-
get
|
340
|
+
get creationKeyword(): Keyword<KeywordKind.Creation>;
|
341
341
|
get body(): StatementBlock;
|
342
342
|
protected get thisAsNode(): Node;
|
343
343
|
constructor(green: green.PackageConstructorDeclaration, rangeStart: number, parent: PackageMemberDeclarationParent);
|
@@ -636,10 +636,10 @@ export declare class TypeConstructorDeclaration extends BaseNode {
|
|
636
636
|
readonly green: green.TypeConstructorDeclaration;
|
637
637
|
readonly parent: TypeMemberDeclarationParent;
|
638
638
|
private _children;
|
639
|
-
get children(): readonly [TagList, ModifierList, Keyword<green.KeywordKind.
|
639
|
+
get children(): readonly [TagList, ModifierList, Keyword<green.KeywordKind.Creation>, ParameterClause, StatementBlock | undefined];
|
640
640
|
get tagList(): TagList;
|
641
641
|
get modifierList(): ModifierList;
|
642
|
-
get
|
642
|
+
get creationKeyword(): Keyword<KeywordKind.Creation>;
|
643
643
|
get parameterClause(): ParameterClause;
|
644
644
|
get body(): StatementBlock | undefined;
|
645
645
|
protected get thisAsNode(): Node;
|
@@ -651,10 +651,10 @@ export declare class TypeDestructorDeclaration extends BaseNode {
|
|
651
651
|
readonly green: green.TypeDestructorDeclaration;
|
652
652
|
readonly parent: TypeMemberDeclarationParent;
|
653
653
|
private _children;
|
654
|
-
get children(): readonly [TagList, ModifierList, Keyword<green.KeywordKind.
|
654
|
+
get children(): readonly [TagList, ModifierList, Keyword<green.KeywordKind.Destruction>, ParameterClause, StatementBlock | undefined];
|
655
655
|
get tagList(): TagList;
|
656
656
|
get modifierList(): ModifierList;
|
657
|
-
get
|
657
|
+
get destructionKeyword(): Keyword<KeywordKind.Destruction>;
|
658
658
|
get parameterClause(): ParameterClause;
|
659
659
|
get body(): StatementBlock | undefined;
|
660
660
|
protected get thisAsNode(): Node;
|
@@ -1749,8 +1749,8 @@ export declare class ConstructorTranslation extends BaseNode {
|
|
1749
1749
|
readonly green: green.ConstructorTranslation;
|
1750
1750
|
readonly parent: TypeMemberTranslationParent;
|
1751
1751
|
private _children;
|
1752
|
-
get children(): readonly [Keyword<green.KeywordKind.
|
1753
|
-
get
|
1752
|
+
get children(): readonly [Keyword<green.KeywordKind.Creation>, TranslationParameterClause, Token<green.TokenKind.MinusGreaterThan>, TranslationParameterClause];
|
1753
|
+
get creationKeyword(): Keyword<KeywordKind.Creation>;
|
1754
1754
|
get sourceParameterClause(): TranslationParameterClause;
|
1755
1755
|
get minusGreaterThanToken(): Token<TokenKind.MinusGreaterThan>;
|
1756
1756
|
get translatedParameterClause(): TranslationParameterClause;
|