@artel/artc 0.6.25285 → 0.6.25287
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 +2 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +3 -2
- package/build/{chunk-NYUW7OAM.js → chunk-QF4FBTV5.js} +1 -1
- package/build/{chunk-IQ4WP3GU.js → chunk-RUVUYCWN.js} +180 -12
- package/build/{chunk-YQATIDSS.js → chunk-UX6AXIDJ.js} +11 -4
- package/build/types/analysis/TypeMemberLookup.d.ts +2 -0
- package/build/types/emitter/Emitter.d.ts +2 -0
- package/build/types/emitter/GeneralLowering.d.ts +4 -1
- 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-UX6AXIDJ.js";
|
|
5
|
+
import "./chunk-QF4FBTV5.js";
|
|
6
6
|
import {
|
|
7
7
|
__async
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RUVUYCWN.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-QF4FBTV5.js";
|
|
4
4
|
import {
|
|
5
5
|
AccessKind,
|
|
6
6
|
AccessedFunctionParameter,
|
|
@@ -346,7 +346,7 @@ import {
|
|
|
346
346
|
withoutQuotes,
|
|
347
347
|
withoutTemplateQuotes,
|
|
348
348
|
yieldTask
|
|
349
|
-
} from "../chunk-
|
|
349
|
+
} from "../chunk-RUVUYCWN.js";
|
|
350
350
|
export {
|
|
351
351
|
AccessKind,
|
|
352
352
|
AccessedFunctionParameter,
|
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-UX6AXIDJ.js";
|
|
10
|
+
import "../chunk-QF4FBTV5.js";
|
|
11
|
+
import "../chunk-RUVUYCWN.js";
|
|
12
12
|
export {
|
|
13
13
|
CommandLineCompiler,
|
|
14
14
|
FileSystemUri,
|
package/build/api/ApiServices.js
CHANGED
|
@@ -183,7 +183,7 @@ import {
|
|
|
183
183
|
unwrapParenthesizedExpressions,
|
|
184
184
|
visitChildren,
|
|
185
185
|
yieldTask
|
|
186
|
-
} from "../chunk-
|
|
186
|
+
} from "../chunk-RUVUYCWN.js";
|
|
187
187
|
|
|
188
188
|
// source/services/CustomRequests.ts
|
|
189
189
|
import * as ls from "vscode-languageserver";
|
|
@@ -13981,7 +13981,8 @@ var _LanguageServer = class _LanguageServer {
|
|
|
13981
13981
|
}
|
|
13982
13982
|
const options7 = {
|
|
13983
13983
|
importEmitKind: 2 /* Custom */,
|
|
13984
|
-
isCustomImportSynchronous: true
|
|
13984
|
+
isCustomImportSynchronous: true,
|
|
13985
|
+
attachSyntaxNodeUri: true
|
|
13985
13986
|
};
|
|
13986
13987
|
let result;
|
|
13987
13988
|
try {
|
|
@@ -764,7 +764,7 @@ var UniqueWithComparatorQuery = class extends Query {
|
|
|
764
764
|
};
|
|
765
765
|
|
|
766
766
|
// source/common/Constants.ts
|
|
767
|
-
var ArtelVersion = true ? "0.6.
|
|
767
|
+
var ArtelVersion = true ? "0.6.25287" : "";
|
|
768
768
|
var ArtelSourceFileExtensions = [".\u0430\u0440\u0442", ".\u0430\u0440\u0442\u0435\u043B\u044C", ".art", ".artel", ".\u0430\u0440\u0442\u043C", ".\u0430\u0440\u0442\u0435\u043B\u044C\u043C", ".artm", ".artelm"];
|
|
769
769
|
var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
|
|
770
770
|
var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
|
|
@@ -6801,6 +6801,7 @@ var englishKeywords = new Lazy(() => [
|
|
|
6801
6801
|
{ keyword: "else", kind: 11 /* Else */, flags: 0 /* None */, dialects: [0 /* ArtelA */, 1 /* ArtelM */] },
|
|
6802
6802
|
{ keyword: "else if", kind: 12 /* ElseIf */, flags: 0 /* None */, dialects: [0 /* ArtelA */, 1 /* ArtelM */] },
|
|
6803
6803
|
{ keyword: "error", kind: 21 /* Error */, flags: 0 /* None */, dialects: [0 /* ArtelA */] },
|
|
6804
|
+
{ keyword: "evaluate", kind: 20 /* Important */, flags: 0 /* None */, dialects: [0 /* ArtelA */] },
|
|
6804
6805
|
{ keyword: "fault", kind: 21 /* Error */, flags: 0 /* None */, dialects: [1 /* ArtelM */] },
|
|
6805
6806
|
{ keyword: "finally", kind: 22 /* Finally */, flags: 0 /* None */, dialects: [0 /* ArtelA */, 1 /* ArtelM */] },
|
|
6806
6807
|
{ keyword: "for", kind: 36 /* For */, flags: 0 /* None */, dialects: [0 /* ArtelA */] },
|
|
@@ -6809,7 +6810,6 @@ var englishKeywords = new Lazy(() => [
|
|
|
6809
6810
|
{ keyword: "get", kind: 59 /* Get */, flags: 4098 /* NeuNoun */, dialects: [0 /* ArtelA */] },
|
|
6810
6811
|
{ keyword: "if", kind: 14 /* If */, flags: 0 /* None */, dialects: [0 /* ArtelA */, 1 /* ArtelM */] },
|
|
6811
6812
|
{ keyword: "import", kind: 19 /* Import */, flags: 0 /* None */, dialects: [0 /* ArtelA */, 1 /* ArtelM */] },
|
|
6812
|
-
{ keyword: "important", kind: 20 /* Important */, flags: 0 /* None */, dialects: [0 /* ArtelA */] },
|
|
6813
6813
|
{ keyword: "is", kind: 15 /* Is */, flags: 0 /* None */, dialects: [0 /* ArtelA */] },
|
|
6814
6814
|
{ keyword: "let", kind: 1 /* Let */, flags: 0 /* None */, dialects: [0 /* ArtelA */] },
|
|
6815
6815
|
{ keyword: "loop", kind: 27 /* Loop */, flags: 0 /* None */, dialects: [0 /* ArtelA */, 1 /* ArtelM */] },
|
|
@@ -6855,13 +6855,13 @@ var russianKeywords = new Lazy(() => [
|
|
|
6855
6855
|
{ keyword: "\u0430\u0432\u0442\u043E\u0442\u0438\u043F", kind: 2 /* Autotype */, flags: 9218 /* SingularMasNoun */, dialects: [0 /* ArtelA */] },
|
|
6856
6856
|
{ keyword: "\u0430\u0441\u043F\u0435\u043A\u0442", kind: 3 /* Aspect */, flags: 9218 /* SingularMasNoun */, dialects: [0 /* ArtelA */] },
|
|
6857
6857
|
{ keyword: "\u0431\u0430\u0437\u0430", kind: 57 /* Base */, flags: 0 /* None */, dialects: [1 /* ArtelM */] },
|
|
6858
|
-
{ keyword: "\u0432\u0430\u0436\u043D\u043E", kind: 20 /* Important */, flags: 0 /* None */, dialects: [0 /* ArtelA */] },
|
|
6859
6858
|
{ keyword: "\u0432\u0430\u0440\u0438\u0430\u043D\u0442", kind: 7 /* Variant */, flags: 9218 /* SingularMasNoun */, dialects: [0 /* ArtelA */] },
|
|
6860
6859
|
{ keyword: "\u0432\u0435\u0440\u043D\u0443\u0442\u044C", kind: 16 /* Return */, flags: 0 /* None */, dialects: [0 /* ArtelA */, 1 /* ArtelM */] },
|
|
6861
6860
|
{ keyword: "\u0432\u043E\u0437\u0432\u0440\u0430\u0442", kind: 16 /* Return */, flags: 0 /* None */, dialects: [0 /* ArtelA */, 1 /* ArtelM */] },
|
|
6862
6861
|
{ keyword: "\u0432\u044B\u0431\u043E\u0440", kind: 45 /* Switch */, flags: 0 /* None */, dialects: [0 /* ArtelA */, 1 /* ArtelM */] },
|
|
6863
6862
|
{ keyword: "\u0432\u044B\u0434\u0430\u0442\u044C", kind: 29 /* Yield */, flags: 0 /* None */, dialects: [0 /* ArtelA */] },
|
|
6864
6863
|
{ keyword: "\u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C", kind: 8 /* Run */, flags: 0 /* None */, dialects: [0 /* ArtelA */] },
|
|
6864
|
+
{ keyword: "\u0432\u044B\u0447\u0438\u0441\u043B\u0438\u0442\u044C", kind: 20 /* Important */, flags: 0 /* None */, dialects: [0 /* ArtelA */] },
|
|
6865
6865
|
{ keyword: "\u0434\u0430", kind: 53 /* Yes */, flags: 0 /* None */, dialects: [0 /* ArtelA */, 1 /* ArtelM */] },
|
|
6866
6866
|
{ keyword: "\u0434\u043B\u044F", kind: 36 /* For */, flags: 0 /* None */, dialects: [0 /* ArtelA */] },
|
|
6867
6867
|
{ keyword: "\u0435\u0441\u043B\u0438", kind: 14 /* If */, flags: 0 /* None */, dialects: [0 /* ArtelA */, 1 /* ArtelM */] },
|
|
@@ -9235,7 +9235,7 @@ var englishErrorMessages = {
|
|
|
9235
9235
|
[1105 /* ForStatementVariableDeclarationExpected */]: "Loop variable declaration expected.",
|
|
9236
9236
|
[1106 /* StatementExpected */]: "Statement expected.",
|
|
9237
9237
|
[1107 /* ExpressionExpected */]: "Expression expected.",
|
|
9238
|
-
[1108 /* ExpressionCannotBeUsedAsStatement */]: "Expression cannot be used as statement. Consider using '
|
|
9238
|
+
[1108 /* ExpressionCannotBeUsedAsStatement */]: "Expression cannot be used as statement. Consider using 'evaluate' statement to evaluate expression that has some effect.",
|
|
9239
9239
|
[1109 /* Expected0But1Found */]: "Expected '{0}', but '{1}' found.",
|
|
9240
9240
|
[1110 /* Delimiter0Expected */]: "Delimiter '{0}' expected.",
|
|
9241
9241
|
[1111 /* BaseTypeNameExpected */]: "Base type name expected.",
|
|
@@ -9498,7 +9498,7 @@ var russianErrorMessages = {
|
|
|
9498
9498
|
[1105 /* ForStatementVariableDeclarationExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439 \u0446\u0438\u043A\u043B\u0430.",
|
|
9499
9499
|
[1106 /* StatementExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u0430\u0441\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0430.",
|
|
9500
9500
|
[1107 /* ExpressionExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435.",
|
|
9501
|
-
[1108 /* ExpressionCannotBeUsedAsStatement */]: "\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043E \u043A\u0430\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u0430. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 '\u0432\
|
|
9501
|
+
[1108 /* ExpressionCannotBeUsedAsStatement */]: "\u0412\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043E \u043A\u0430\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u0430. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 '\u0432\u044B\u0447\u0438\u0441\u043B\u0438\u0442\u044C' \u0434\u043B\u044F \u0432\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u044F \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0439 \u0441 \u043F\u043E\u0431\u043E\u0447\u043D\u044B\u043C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u043C.",
|
|
9502
9502
|
[1109 /* Expected0But1Found */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u0430\u0441\u044C \u043B\u0435\u043A\u0441\u0435\u043C\u0430 '{0}', \u043D\u043E \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043B\u0430\u0441\u044C \u043B\u0435\u043A\u0441\u0435\u043C\u0430 '{1}'.",
|
|
9503
9503
|
[1110 /* Delimiter0Expected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u0441\u044F \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C '{0}'.",
|
|
9504
9504
|
[1111 /* BaseTypeNameExpected */]: "\u041E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u0438\u043C\u044F \u0431\u0430\u0437\u043E\u0432\u043E\u0433\u043E \u0442\u0438\u043F\u0430.",
|
|
@@ -22585,6 +22585,10 @@ var TypeMemberLookup = class _TypeMemberLookup {
|
|
|
22585
22585
|
const lookup = new ConstructorLookup(this.analyzer, this.typeOrExtension);
|
|
22586
22586
|
return lookup.getConstructors(this.typeOrExtension, context, options);
|
|
22587
22587
|
}
|
|
22588
|
+
getDestructors(context, options = 0 /* None */) {
|
|
22589
|
+
const lookup = new DestructorLookup(this.analyzer, this.typeOrExtension);
|
|
22590
|
+
return lookup.getDestructors(this.typeOrExtension, context, options);
|
|
22591
|
+
}
|
|
22588
22592
|
getIndexers(context, options = 0 /* None */) {
|
|
22589
22593
|
const lookup = new IndexerLookup(this.analyzer, this.typeOrExtension);
|
|
22590
22594
|
return lookup.getIndexers(this.typeOrExtension, context, options);
|
|
@@ -22627,6 +22631,9 @@ var BoundTypeMemberLookup = class _BoundTypeMemberLookup {
|
|
|
22627
22631
|
getConstructors() {
|
|
22628
22632
|
return this.lookup.getConstructors(this.context);
|
|
22629
22633
|
}
|
|
22634
|
+
getDestructors() {
|
|
22635
|
+
return this.lookup.getDestructors(this.context);
|
|
22636
|
+
}
|
|
22630
22637
|
getIndexers() {
|
|
22631
22638
|
return this.lookup.getIndexers(this.context, this.options);
|
|
22632
22639
|
}
|
|
@@ -23506,6 +23513,140 @@ var ConstructorLookup = class {
|
|
|
23506
23513
|
return shadowingParameters.length === shadowedParameters.length && Query.zip(shadowingParameters, shadowedParameters, (l, r) => l.getType().equals(r.getType())).all((v) => v);
|
|
23507
23514
|
}
|
|
23508
23515
|
};
|
|
23516
|
+
var DestructorLookup = class {
|
|
23517
|
+
constructor(analyzer, typeOrExtension) {
|
|
23518
|
+
this.analyzer = analyzer;
|
|
23519
|
+
this.typeOrExtension = typeOrExtension;
|
|
23520
|
+
}
|
|
23521
|
+
getDestructors(typeOrExtension, context, options) {
|
|
23522
|
+
switch (typeOrExtension.kind) {
|
|
23523
|
+
case "type":
|
|
23524
|
+
return this.getDestructorsOfType(typeOrExtension.value, context, options);
|
|
23525
|
+
case "extension": {
|
|
23526
|
+
const extendedTypeEntity = typeOrExtension.value.getExtendedTypeEntity();
|
|
23527
|
+
if (extendedTypeEntity === void 0) {
|
|
23528
|
+
return [];
|
|
23529
|
+
}
|
|
23530
|
+
const extendedType = this.analyzer.instantiateTypeByIdentitySubstitution(extendedTypeEntity);
|
|
23531
|
+
return this.getDestructorsOfTypeWithOwnMembersOrExtension(
|
|
23532
|
+
typeOrExtension.value,
|
|
23533
|
+
extendedType,
|
|
23534
|
+
context,
|
|
23535
|
+
options
|
|
23536
|
+
);
|
|
23537
|
+
}
|
|
23538
|
+
default:
|
|
23539
|
+
Debug.never(typeOrExtension);
|
|
23540
|
+
}
|
|
23541
|
+
}
|
|
23542
|
+
getDestructorsOfType(type, context, options) {
|
|
23543
|
+
switch (type.kind) {
|
|
23544
|
+
case "structured":
|
|
23545
|
+
return this.getDestructorsOfStructuredType(type, context, options);
|
|
23546
|
+
case "variant":
|
|
23547
|
+
return this.getDestructorsOfVariantType(type, context, options);
|
|
23548
|
+
case "function":
|
|
23549
|
+
return this.getDestructorsOfFunctionType(type, context, options);
|
|
23550
|
+
case "alias":
|
|
23551
|
+
return this.getDestructorsOfAliasType(type, context, options);
|
|
23552
|
+
case "reduced":
|
|
23553
|
+
return this.getDestructorsOfReducedType(type, context, options);
|
|
23554
|
+
case "parameter":
|
|
23555
|
+
case "union":
|
|
23556
|
+
case "intersection":
|
|
23557
|
+
case "unresolved":
|
|
23558
|
+
case "substitution-stub":
|
|
23559
|
+
return [];
|
|
23560
|
+
default:
|
|
23561
|
+
Debug.never(type);
|
|
23562
|
+
}
|
|
23563
|
+
}
|
|
23564
|
+
getDestructorsOfStructuredType(type, context, options) {
|
|
23565
|
+
return this.getDestructorsOfTypeWithOwnMembersOrExtension(type.getEntity(), type, context, options);
|
|
23566
|
+
}
|
|
23567
|
+
getDestructorsOfVariantType(type, context, options) {
|
|
23568
|
+
return this.getDestructorsOfTypeWithOwnMembersOrExtension(type.getEntity(), type, context, options);
|
|
23569
|
+
}
|
|
23570
|
+
getDestructorsOfFunctionType(type, context, options) {
|
|
23571
|
+
return this.getDestructorsOfTypeWithOwnMembersOrExtension(type.getEntity(), type, context, options);
|
|
23572
|
+
}
|
|
23573
|
+
getDestructorsOfAliasType(type, context, options) {
|
|
23574
|
+
let result = this.getOwnDestructors(type.getEntity(), type, context, options);
|
|
23575
|
+
if (context?.typeExtensionLookup !== void 0 && (options & 4 /* NoTypeExtensionMembers */) === 0) {
|
|
23576
|
+
const extensionDestructors = this.getExtensionDestructors(
|
|
23577
|
+
type.getEntity(),
|
|
23578
|
+
type,
|
|
23579
|
+
context,
|
|
23580
|
+
options,
|
|
23581
|
+
context.typeExtensionLookup
|
|
23582
|
+
);
|
|
23583
|
+
result = this.mergeDestructors(result, extensionDestructors);
|
|
23584
|
+
}
|
|
23585
|
+
const aliasedType = type.getAliasedType();
|
|
23586
|
+
const destructor = this.getDestructorsOfType(aliasedType, context, options);
|
|
23587
|
+
result = this.mergeDestructors(result, destructor);
|
|
23588
|
+
return result;
|
|
23589
|
+
}
|
|
23590
|
+
getDestructorsOfReducedType(type, context, options) {
|
|
23591
|
+
return this.getDestructorsOfTypeWithOwnMembersOrExtension(type.getEntity(), type, context, options);
|
|
23592
|
+
}
|
|
23593
|
+
getDestructorsOfTypeWithOwnMembersOrExtension(entity, type, context, options) {
|
|
23594
|
+
let result = this.getOwnDestructors(entity, type, context, options);
|
|
23595
|
+
if (context?.typeExtensionLookup !== void 0 && entity.kind === 2 /* Type */ && (options & 4 /* NoTypeExtensionMembers */) === 0) {
|
|
23596
|
+
const extensionDestructors = this.getExtensionDestructors(
|
|
23597
|
+
entity,
|
|
23598
|
+
type,
|
|
23599
|
+
context,
|
|
23600
|
+
options,
|
|
23601
|
+
context.typeExtensionLookup
|
|
23602
|
+
);
|
|
23603
|
+
result = this.mergeDestructors(result, extensionDestructors);
|
|
23604
|
+
}
|
|
23605
|
+
return result;
|
|
23606
|
+
}
|
|
23607
|
+
getOwnDestructors(entity, type, context, options) {
|
|
23608
|
+
let result = entity.getMembers().getDestructors().map((c) => new Destructor(c, type.getSubstitutions()));
|
|
23609
|
+
if (context !== void 0 && context.affectsAccessibility()) {
|
|
23610
|
+
const ignoreReceiverType = (options & 8 /* CheckAccessibilityIgnoringReceiverType */) !== 0;
|
|
23611
|
+
result = result.filter((m) => AccessibilityCheck.isTypeMemberAccessible(
|
|
23612
|
+
m.getEntity(),
|
|
23613
|
+
context,
|
|
23614
|
+
this.typeOrExtension.getType(),
|
|
23615
|
+
ignoreReceiverType
|
|
23616
|
+
));
|
|
23617
|
+
}
|
|
23618
|
+
return result;
|
|
23619
|
+
}
|
|
23620
|
+
getExtensionDestructors(entity, type, context, options, typeExtensionLookup) {
|
|
23621
|
+
let result = typeExtensionLookup.getTypeExtensionsByType(entity).flatMap((e) => e.getMembers().getDestructors().map((c) => new Destructor(c, type.getSubstitutions())));
|
|
23622
|
+
if (context !== void 0 && context.affectsAccessibility()) {
|
|
23623
|
+
const ignoreReceiverType = (options & 8 /* CheckAccessibilityIgnoringReceiverType */) !== 0;
|
|
23624
|
+
result = result.filter((m) => AccessibilityCheck.isTypeMemberAccessible(
|
|
23625
|
+
m.getEntity(),
|
|
23626
|
+
context,
|
|
23627
|
+
this.typeOrExtension.getType(),
|
|
23628
|
+
ignoreReceiverType
|
|
23629
|
+
));
|
|
23630
|
+
}
|
|
23631
|
+
return result;
|
|
23632
|
+
}
|
|
23633
|
+
mergeDestructors(shadowingDestructors, shadowedDestructors) {
|
|
23634
|
+
const shadowingDestructorsArray = shadowingDestructors;
|
|
23635
|
+
const result = Array.from(shadowingDestructorsArray);
|
|
23636
|
+
for (const shadowedMember of shadowedDestructors) {
|
|
23637
|
+
if (shadowingDestructorsArray.some((shadowingMember) => this.checkDestructorShadowing(shadowingMember, shadowedMember))) {
|
|
23638
|
+
continue;
|
|
23639
|
+
}
|
|
23640
|
+
result.push(shadowedMember);
|
|
23641
|
+
}
|
|
23642
|
+
return result;
|
|
23643
|
+
}
|
|
23644
|
+
checkDestructorShadowing(shadowing, shadowed) {
|
|
23645
|
+
const shadowingParameters = shadowing.getParameters();
|
|
23646
|
+
const shadowedParameters = shadowed.getParameters();
|
|
23647
|
+
return shadowingParameters.length === shadowedParameters.length && Query.zip(shadowingParameters, shadowedParameters, (l, r) => l.getType().equals(r.getType())).all((v) => v);
|
|
23648
|
+
}
|
|
23649
|
+
};
|
|
23509
23650
|
var TypeOrExtension_type = class {
|
|
23510
23651
|
constructor(value) {
|
|
23511
23652
|
this.value = value;
|
|
@@ -38037,7 +38178,23 @@ var ReductionSourceMemberFinder = class _ReductionSourceMemberFinder {
|
|
|
38037
38178
|
return result;
|
|
38038
38179
|
}
|
|
38039
38180
|
findDestructor(member, reductionSource, lookupContext, diagnostics, nodeForDiagnostic) {
|
|
38040
|
-
|
|
38181
|
+
const lookupOptions = this.getTypeMemberLookupOptions(member);
|
|
38182
|
+
const matchingMembers = TypeMemberLookup.ofType(this.analyzer, reductionSource).getDestructors(lookupContext, lookupOptions).filter((o) => this.analyzer.signatureComparer.areEqualTypeMemberSignaturesWithoutTypeParameters(
|
|
38183
|
+
o,
|
|
38184
|
+
member,
|
|
38185
|
+
_ReductionSourceMemberFinder.signatureComparisonOptions
|
|
38186
|
+
));
|
|
38187
|
+
let result;
|
|
38188
|
+
if (matchingMembers.length > 0) {
|
|
38189
|
+
result = matchingMembers[0];
|
|
38190
|
+
this.checkMembersHaveSameHiding(member, result, diagnostics, nodeForDiagnostic);
|
|
38191
|
+
} else {
|
|
38192
|
+
diagnostics.addDiagnostic(this.analyzer.createNodeDiagnostic(
|
|
38193
|
+
2211 /* CorrespondingReductionSourceTypeMemberNotFound */,
|
|
38194
|
+
nodeForDiagnostic
|
|
38195
|
+
));
|
|
38196
|
+
}
|
|
38197
|
+
return result;
|
|
38041
38198
|
}
|
|
38042
38199
|
findIndexer(member, reductionSource, lookupContext, diagnostics, nodeForDiagnostic) {
|
|
38043
38200
|
const lookupOptions = this.getTypeMemberLookupOptions(member);
|
|
@@ -65172,8 +65329,8 @@ function replaceNode(node) {
|
|
|
65172
65329
|
|
|
65173
65330
|
// source/emitter/GeneralLowering.ts
|
|
65174
65331
|
var GeneralLowering = class {
|
|
65175
|
-
constructor(ectx, packages) {
|
|
65176
|
-
this.ctx = new GeneralLoweringContext(ectx, packages);
|
|
65332
|
+
constructor(ectx, packages, options) {
|
|
65333
|
+
this.ctx = new GeneralLoweringContext(ectx, packages, options);
|
|
65177
65334
|
}
|
|
65178
65335
|
lower() {
|
|
65179
65336
|
const compoundDeclarationsLowering = new CompoundDeclarationsAndOperatorsLowering(this.ctx);
|
|
@@ -65209,7 +65366,7 @@ var GeneralLowering = class {
|
|
|
65209
65366
|
}
|
|
65210
65367
|
};
|
|
65211
65368
|
var GeneralLoweringContext = class {
|
|
65212
|
-
constructor(ectx, packages) {
|
|
65369
|
+
constructor(ectx, packages, options) {
|
|
65213
65370
|
this.proxyVariableByOriginal = /* @__PURE__ */ new Map();
|
|
65214
65371
|
this.overloadedConstructorGroupByOriginalConstructor = /* @__PURE__ */ new Map();
|
|
65215
65372
|
this.id = 0;
|
|
@@ -65234,6 +65391,7 @@ var GeneralLoweringContext = class {
|
|
|
65234
65391
|
this.translatorLanguageField_ = new Cached();
|
|
65235
65392
|
this.ectx = ectx;
|
|
65236
65393
|
this.packages = packages;
|
|
65394
|
+
this.options = options;
|
|
65237
65395
|
this.helperFunctions = new HelperFunctions(this);
|
|
65238
65396
|
}
|
|
65239
65397
|
static {
|
|
@@ -67724,7 +67882,10 @@ var UsagesLowering = class _UsagesLowering extends ExecutableCodeLowering {
|
|
|
67724
67882
|
return preserveStatement();
|
|
67725
67883
|
},
|
|
67726
67884
|
transformFunctionLiteral: (node) => {
|
|
67727
|
-
|
|
67885
|
+
let result;
|
|
67886
|
+
if (this.ctx.options.attachSyntaxNodeUri) {
|
|
67887
|
+
result = this.tryAttachSyntaxNodePathToFunctionLiteral(node);
|
|
67888
|
+
}
|
|
67728
67889
|
if (result !== void 0) {
|
|
67729
67890
|
return result;
|
|
67730
67891
|
}
|
|
@@ -72362,7 +72523,8 @@ var Emitter = class _Emitter {
|
|
|
72362
72523
|
taskController
|
|
72363
72524
|
);
|
|
72364
72525
|
const emitterPackages = Query.from(this.enumerateEmittingSourcePackages()).map((p) => this.createEmitterPackageFromSource(p, declarationsUsageInfo)).toArray();
|
|
72365
|
-
const
|
|
72526
|
+
const options = this.getGeneralLoweringOptions();
|
|
72527
|
+
const generalLowering = new GeneralLowering(this.ectx, emitterPackages, options);
|
|
72366
72528
|
generalLowering.lower();
|
|
72367
72529
|
const packageWithMainFunction = this.createPackageWithMainFunction(emitterPackages, emitterPackages[0].ir.entity);
|
|
72368
72530
|
emitterPackages.push(packageWithMainFunction);
|
|
@@ -72402,7 +72564,8 @@ var Emitter = class _Emitter {
|
|
|
72402
72564
|
taskController
|
|
72403
72565
|
);
|
|
72404
72566
|
const emitterPackages = Query.from(this.enumerateEmittingSourcePackages()).map((p) => this.createEmitterPackageFromSource(p, declarationsUsageInfo)).toArray();
|
|
72405
|
-
const
|
|
72567
|
+
const options = this.getGeneralLoweringOptions();
|
|
72568
|
+
const generalLowering = new GeneralLowering(this.ectx, emitterPackages, options);
|
|
72406
72569
|
generalLowering.lower();
|
|
72407
72570
|
const packageWithMainFunction = this.createPackageWithMainFunction(emitterPackages, emitterPackages[0].ir.entity);
|
|
72408
72571
|
emitterPackages.push(packageWithMainFunction);
|
|
@@ -72424,6 +72587,11 @@ var Emitter = class _Emitter {
|
|
|
72424
72587
|
return code;
|
|
72425
72588
|
});
|
|
72426
72589
|
}
|
|
72590
|
+
getGeneralLoweringOptions() {
|
|
72591
|
+
return {
|
|
72592
|
+
attachSyntaxNodeUri: this.options?.attachSyntaxNodeUri ?? false
|
|
72593
|
+
};
|
|
72594
|
+
}
|
|
72427
72595
|
createEmitterPackageFromSource(pkg2, declarationsUsageInfo) {
|
|
72428
72596
|
const irBuilder = new IrBuilder(this.ectx, this.entityMap, declarationsUsageInfo);
|
|
72429
72597
|
const irPackage = irBuilder.build(pkg2);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Compiler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QF4FBTV5.js";
|
|
4
4
|
import {
|
|
5
5
|
ArtelVersion,
|
|
6
6
|
Cached,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
__async,
|
|
16
16
|
performanceMeasurementStageNames,
|
|
17
17
|
performanceMeasurementStages
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RUVUYCWN.js";
|
|
19
19
|
|
|
20
20
|
// source/executor/FileSystemUri.ts
|
|
21
21
|
import { platform } from "os";
|
|
@@ -397,7 +397,8 @@ var CommandLineCompiler = class {
|
|
|
397
397
|
sourceMap: {
|
|
398
398
|
mode: "linked" /* Linked */,
|
|
399
399
|
includeSourcesContent: false
|
|
400
|
-
}
|
|
400
|
+
},
|
|
401
|
+
attachSyntaxNodeUri: parsedArguments.attachSyntaxNodeUrisInCompiledCode
|
|
401
402
|
},
|
|
402
403
|
controller: new TaskController(-1)
|
|
403
404
|
};
|
|
@@ -469,7 +470,8 @@ var ArgumentsParser = class {
|
|
|
469
470
|
defaultTsLibraryPath: void 0,
|
|
470
471
|
workspacePath: void 0,
|
|
471
472
|
standardPackagesPath: void 0,
|
|
472
|
-
builtInStandardPackagesPath: void 0
|
|
473
|
+
builtInStandardPackagesPath: void 0,
|
|
474
|
+
attachSyntaxNodeUrisInCompiledCode: false
|
|
473
475
|
};
|
|
474
476
|
const index = this.parseMainCommand(0, args, result);
|
|
475
477
|
this.parseNamedArguments(index, args, result);
|
|
@@ -591,6 +593,11 @@ var ArgumentsParser = class {
|
|
|
591
593
|
result.measurePerformance = true;
|
|
592
594
|
break;
|
|
593
595
|
}
|
|
596
|
+
case "--\u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C-uri-\u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0447\u0435\u0441\u043A\u0438\u0445-\u0443\u0437\u043B\u043E\u0432-\u0432-\u0441\u043A\u043E\u043C\u043F\u0438\u043B\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439-\u043A\u043E\u0434":
|
|
597
|
+
case "--attach-syntax-node-uris-in-compiled-code": {
|
|
598
|
+
result.attachSyntaxNodeUrisInCompiledCode = true;
|
|
599
|
+
break;
|
|
600
|
+
}
|
|
594
601
|
}
|
|
595
602
|
}
|
|
596
603
|
}
|
|
@@ -17,6 +17,7 @@ export declare class TypeMemberLookup {
|
|
|
17
17
|
getOperators(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Operator[];
|
|
18
18
|
getOperatorsByKind(kind: OperatorKind, context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Operator[];
|
|
19
19
|
getConstructors(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Constructor[];
|
|
20
|
+
getDestructors(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Destructor[];
|
|
20
21
|
getIndexers(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Indexer[];
|
|
21
22
|
getDereferenceOperators(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.DereferenceOperator[];
|
|
22
23
|
}
|
|
@@ -33,6 +34,7 @@ export declare class BoundTypeMemberLookup {
|
|
|
33
34
|
getOperators(): readonly types.Operator[];
|
|
34
35
|
getOperatorsByKind(kind: OperatorKind): readonly types.Operator[];
|
|
35
36
|
getConstructors(): readonly types.Constructor[];
|
|
37
|
+
getDestructors(): readonly types.Destructor[];
|
|
36
38
|
getIndexers(): readonly types.Indexer[];
|
|
37
39
|
getDereferenceOperators(): readonly types.DereferenceOperator[];
|
|
38
40
|
}
|
|
@@ -14,6 +14,7 @@ export declare class Emitter {
|
|
|
14
14
|
constructor(analyzer: Analyzer, options: EmitOptions | undefined);
|
|
15
15
|
emitToFileSystem(outputUri: Uri, outputAcceptor: OutputAcceptor, taskController: TaskController): Promise<void>;
|
|
16
16
|
emitToString(taskController: TaskController): Promise<string>;
|
|
17
|
+
private getGeneralLoweringOptions;
|
|
17
18
|
private createEmitterPackageFromSource;
|
|
18
19
|
private enumerateEmittingSourcePackages;
|
|
19
20
|
private createPackageWithMainFunction;
|
|
@@ -46,6 +47,7 @@ export interface EmitOptions {
|
|
|
46
47
|
* Является ли функция `_artelImport` синхронной?
|
|
47
48
|
*/
|
|
48
49
|
isCustomImportSynchronous?: boolean;
|
|
50
|
+
attachSyntaxNodeUri?: boolean;
|
|
49
51
|
}
|
|
50
52
|
export interface SourceMapOptions {
|
|
51
53
|
mode?: SourceMapMode;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { EmitterPackage } from './Emitter.js';
|
|
2
2
|
import { EmitterContext } from './EmitterContext.js';
|
|
3
|
+
export interface GeneralLoweringOptions {
|
|
4
|
+
readonly attachSyntaxNodeUri: boolean;
|
|
5
|
+
}
|
|
3
6
|
export declare class GeneralLowering {
|
|
4
7
|
private readonly ctx;
|
|
5
|
-
constructor(ectx: EmitterContext, packages: readonly EmitterPackage[]);
|
|
8
|
+
constructor(ectx: EmitterContext, packages: readonly EmitterPackage[], options: GeneralLoweringOptions);
|
|
6
9
|
lower(): void;
|
|
7
10
|
}
|