@artel/artc 0.9.26036-pre-release → 0.9.26037-pre-release
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 +184 -4
- package/build/{chunk-JTOL3VLA.js → chunk-HOYH73XP.js} +87 -12
- package/build/{chunk-AUCAONLF.js → chunk-QH5QQEEL.js} +1 -1
- package/build/{chunk-D247ZQ57.js → chunk-U6LB6G47.js} +2 -2
- package/build/types/analysis/m/Analyzer.d.ts +1 -1
- package/build/types/entities/Tag.d.ts +3 -3
- package/build/types/services/a/source-generation/EntityToSyntax.d.ts +1 -0
- package/build/types/services/m/source-generation/EntityToSyntax.d.ts +2 -1
- package/build/types/tree/a/SyntaxFactory.d.ts +7 -0
- package/build/types/tree/m/SyntaxFactory.d.ts +7 -0
- 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-U6LB6G47.js";
|
|
5
|
+
import "./chunk-QH5QQEEL.js";
|
|
6
6
|
import {
|
|
7
7
|
__async
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HOYH73XP.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-QH5QQEEL.js";
|
|
4
4
|
import {
|
|
5
5
|
AccessKind,
|
|
6
6
|
AccessedFunction_entity,
|
|
@@ -197,7 +197,7 @@ import {
|
|
|
197
197
|
TagArgument_boolean,
|
|
198
198
|
TagArgument_invalid,
|
|
199
199
|
TagArgument_numeric,
|
|
200
|
-
|
|
200
|
+
TagArgument_text,
|
|
201
201
|
TagArgument_variableExpression,
|
|
202
202
|
TagFunction,
|
|
203
203
|
TagType,
|
|
@@ -311,7 +311,7 @@ import {
|
|
|
311
311
|
withoutQuotes,
|
|
312
312
|
withoutTemplateQuotes,
|
|
313
313
|
yieldTask
|
|
314
|
-
} from "../chunk-
|
|
314
|
+
} from "../chunk-HOYH73XP.js";
|
|
315
315
|
export {
|
|
316
316
|
AccessKind,
|
|
317
317
|
AccessedFunction_entity,
|
|
@@ -506,7 +506,7 @@ export {
|
|
|
506
506
|
TagArgument_boolean,
|
|
507
507
|
TagArgument_invalid,
|
|
508
508
|
TagArgument_numeric,
|
|
509
|
-
|
|
509
|
+
TagArgument_text,
|
|
510
510
|
TagArgument_variableExpression,
|
|
511
511
|
TagFunction,
|
|
512
512
|
TagType,
|
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-U6LB6G47.js";
|
|
10
|
+
import "../chunk-QH5QQEEL.js";
|
|
11
|
+
import "../chunk-HOYH73XP.js";
|
|
12
12
|
export {
|
|
13
13
|
CommandLineCompiler,
|
|
14
14
|
FileSystemUri,
|
package/build/api/ApiServices.js
CHANGED
|
@@ -102,6 +102,7 @@ import {
|
|
|
102
102
|
isIdentifier2,
|
|
103
103
|
isKeyword,
|
|
104
104
|
isKeyword2,
|
|
105
|
+
isNamedFunctionEntity,
|
|
105
106
|
isNamedTypeEntity,
|
|
106
107
|
isNarrowableReferenceExpression,
|
|
107
108
|
isNarrowableReferenceExpression2,
|
|
@@ -140,7 +141,7 @@ import {
|
|
|
140
141
|
traverseTreeAsync,
|
|
141
142
|
traverseTreeAsync2,
|
|
142
143
|
yieldTask
|
|
143
|
-
} from "../chunk-
|
|
144
|
+
} from "../chunk-HOYH73XP.js";
|
|
144
145
|
|
|
145
146
|
// source/services/common/Types.ts
|
|
146
147
|
import * as ls from "vscode-languageserver";
|
|
@@ -9870,7 +9871,89 @@ var EntityToSyntax = class {
|
|
|
9870
9871
|
return SyntaxFactory.modifier(41 /* Hidden */, levelKeyword);
|
|
9871
9872
|
}
|
|
9872
9873
|
convertTags(entityTags) {
|
|
9873
|
-
return
|
|
9874
|
+
return entityTags.map((t) => this.convertTag(t)).filter((t) => t !== void 0);
|
|
9875
|
+
}
|
|
9876
|
+
convertTag(tag) {
|
|
9877
|
+
let name;
|
|
9878
|
+
let typeArguments;
|
|
9879
|
+
let parameterEntities;
|
|
9880
|
+
switch (tag.kind) {
|
|
9881
|
+
case "function": {
|
|
9882
|
+
const func = tag.func;
|
|
9883
|
+
if (!isNamedFunctionEntity(func.entity)) {
|
|
9884
|
+
return void 0;
|
|
9885
|
+
}
|
|
9886
|
+
name = this.getEntityName(func.entity);
|
|
9887
|
+
typeArguments = func.kind === "substituted-function" ? Query.from(func.value.getSubstitutions().getTypes()).map((t) => this.convertType(t)).toArray() : void 0;
|
|
9888
|
+
parameterEntities = func.entity.getParameters();
|
|
9889
|
+
break;
|
|
9890
|
+
}
|
|
9891
|
+
case "type": {
|
|
9892
|
+
const typeEntity = tag.typeEntity;
|
|
9893
|
+
if (!isNamedTypeEntity(typeEntity)) {
|
|
9894
|
+
return void 0;
|
|
9895
|
+
}
|
|
9896
|
+
name = this.getEntityName(typeEntity);
|
|
9897
|
+
const substitutions = tag.constructor_.substitutions;
|
|
9898
|
+
typeArguments = substitutions.size > 0 ? Query.from(substitutions.getTypes()).map((t) => this.convertType(t)).toArray() : void 0;
|
|
9899
|
+
parameterEntities = tag.constructor_.entity.getParameters();
|
|
9900
|
+
break;
|
|
9901
|
+
}
|
|
9902
|
+
default:
|
|
9903
|
+
Debug.never(tag);
|
|
9904
|
+
}
|
|
9905
|
+
let args;
|
|
9906
|
+
if (tag.argumentByOriginalParameter.size > 0) {
|
|
9907
|
+
args = [];
|
|
9908
|
+
for (const parameterEntity of parameterEntities) {
|
|
9909
|
+
const argument = tag.argumentByOriginalParameter.get(parameterEntity.originalEntity);
|
|
9910
|
+
if (argument !== void 0) {
|
|
9911
|
+
let argumentExpression;
|
|
9912
|
+
switch (argument.kind) {
|
|
9913
|
+
case "text":
|
|
9914
|
+
argumentExpression = SyntaxFactory.textLiteral(argument.value);
|
|
9915
|
+
break;
|
|
9916
|
+
case "boolean":
|
|
9917
|
+
argumentExpression = SyntaxFactory.booleanLiteral(argument.value);
|
|
9918
|
+
break;
|
|
9919
|
+
case "numeric":
|
|
9920
|
+
argumentExpression = SyntaxFactory.numericLiteral(argument.value);
|
|
9921
|
+
break;
|
|
9922
|
+
case "variable-expression": {
|
|
9923
|
+
const firstSegmentEntity = argument.segments[0];
|
|
9924
|
+
if (firstSegmentEntity.subkind === "field") {
|
|
9925
|
+
const containingType = firstSegmentEntity.getContainingType();
|
|
9926
|
+
if (!isNamedTypeEntity(containingType)) {
|
|
9927
|
+
return void 0;
|
|
9928
|
+
}
|
|
9929
|
+
argumentExpression = SyntaxFactory.memberAccessExpression(
|
|
9930
|
+
SyntaxFactory.identifierExpression(this.getEntityName(containingType)),
|
|
9931
|
+
this.getEntityName(firstSegmentEntity)
|
|
9932
|
+
);
|
|
9933
|
+
} else {
|
|
9934
|
+
argumentExpression = SyntaxFactory.identifierExpression(this.getEntityName(firstSegmentEntity));
|
|
9935
|
+
}
|
|
9936
|
+
for (let i = 1; i < argument.segments.length; i++) {
|
|
9937
|
+
argumentExpression = SyntaxFactory.memberAccessExpression(
|
|
9938
|
+
argumentExpression,
|
|
9939
|
+
this.getEntityName(argument.segments[i])
|
|
9940
|
+
);
|
|
9941
|
+
}
|
|
9942
|
+
break;
|
|
9943
|
+
}
|
|
9944
|
+
case "invalid":
|
|
9945
|
+
argumentExpression = SyntaxFactory.missingExpression();
|
|
9946
|
+
break;
|
|
9947
|
+
default:
|
|
9948
|
+
Debug.never(argument);
|
|
9949
|
+
}
|
|
9950
|
+
args.push(SyntaxFactory.argument(argumentExpression));
|
|
9951
|
+
} else {
|
|
9952
|
+
args.push(SyntaxFactory.argument(SyntaxFactory.missingExpression()));
|
|
9953
|
+
}
|
|
9954
|
+
}
|
|
9955
|
+
}
|
|
9956
|
+
return SyntaxFactory.tag(name, typeArguments, args);
|
|
9874
9957
|
}
|
|
9875
9958
|
getEntityName(entity) {
|
|
9876
9959
|
return entity.getName().unescapedOriginal;
|
|
@@ -10436,11 +10519,96 @@ var EntityToSyntax2 = class {
|
|
|
10436
10519
|
break;
|
|
10437
10520
|
}
|
|
10438
10521
|
}
|
|
10439
|
-
|
|
10522
|
+
const result = Array.from(wkTagFlags).map((it) => {
|
|
10440
10523
|
const name = getWellKnownTagFlagName(it, entity.locale);
|
|
10441
10524
|
Debug.assert(name !== void 0);
|
|
10442
10525
|
return SyntaxFactory2.tag(name.unescapedOriginal);
|
|
10443
10526
|
});
|
|
10527
|
+
const entityTags = entity.getTags();
|
|
10528
|
+
result.push(...entityTags.filter((t) => !(t.kind === "type" && isPackageTypeEntity(t.typeEntity) && this.analyzer.tags.getWellKnownTagFlagByTagEntity(t.typeEntity) !== void 0)).map((t) => this.convertUserTag(t)).filter((t) => t !== void 0));
|
|
10529
|
+
return result;
|
|
10530
|
+
}
|
|
10531
|
+
convertUserTag(tag) {
|
|
10532
|
+
let name;
|
|
10533
|
+
let typeArguments;
|
|
10534
|
+
let parameterEntities;
|
|
10535
|
+
switch (tag.kind) {
|
|
10536
|
+
case "function": {
|
|
10537
|
+
const func = tag.func;
|
|
10538
|
+
if (!isNamedFunctionEntity(func.entity)) {
|
|
10539
|
+
return void 0;
|
|
10540
|
+
}
|
|
10541
|
+
name = this.getEntityName(func.entity);
|
|
10542
|
+
typeArguments = func.kind === "substituted-function" ? Query.from(func.value.getSubstitutions().getTypes()).map((t) => this.convertType(t)).toArray() : void 0;
|
|
10543
|
+
parameterEntities = func.entity.getParameters();
|
|
10544
|
+
break;
|
|
10545
|
+
}
|
|
10546
|
+
case "type": {
|
|
10547
|
+
const typeEntity = tag.typeEntity;
|
|
10548
|
+
if (!isNamedTypeEntity(typeEntity)) {
|
|
10549
|
+
return void 0;
|
|
10550
|
+
}
|
|
10551
|
+
name = this.getEntityName(typeEntity);
|
|
10552
|
+
const substitutions = tag.constructor_.substitutions;
|
|
10553
|
+
typeArguments = substitutions.size > 0 ? Query.from(substitutions.getTypes()).map((t) => this.convertType(t)).toArray() : void 0;
|
|
10554
|
+
parameterEntities = tag.constructor_.entity.getParameters();
|
|
10555
|
+
break;
|
|
10556
|
+
}
|
|
10557
|
+
default:
|
|
10558
|
+
Debug.never(tag);
|
|
10559
|
+
}
|
|
10560
|
+
let args;
|
|
10561
|
+
if (tag.argumentByOriginalParameter.size > 0) {
|
|
10562
|
+
args = [];
|
|
10563
|
+
for (const parameterEntity of parameterEntities) {
|
|
10564
|
+
const argument = tag.argumentByOriginalParameter.get(parameterEntity.originalEntity);
|
|
10565
|
+
if (argument !== void 0) {
|
|
10566
|
+
let argumentExpression;
|
|
10567
|
+
switch (argument.kind) {
|
|
10568
|
+
case "text":
|
|
10569
|
+
argumentExpression = SyntaxFactory2.textLiteral(argument.value);
|
|
10570
|
+
break;
|
|
10571
|
+
case "boolean":
|
|
10572
|
+
argumentExpression = SyntaxFactory2.booleanLiteral(argument.value);
|
|
10573
|
+
break;
|
|
10574
|
+
case "numeric":
|
|
10575
|
+
argumentExpression = SyntaxFactory2.numericLiteral(argument.value);
|
|
10576
|
+
break;
|
|
10577
|
+
case "variable-expression": {
|
|
10578
|
+
const firstSegmentEntity = argument.segments[0];
|
|
10579
|
+
if (firstSegmentEntity.subkind === "field") {
|
|
10580
|
+
const containingType = firstSegmentEntity.getContainingType();
|
|
10581
|
+
if (!isNamedTypeEntity(containingType)) {
|
|
10582
|
+
return void 0;
|
|
10583
|
+
}
|
|
10584
|
+
argumentExpression = SyntaxFactory2.memberAccessExpression(
|
|
10585
|
+
SyntaxFactory2.identifierExpression(this.getEntityName(containingType)),
|
|
10586
|
+
this.getEntityName(firstSegmentEntity)
|
|
10587
|
+
);
|
|
10588
|
+
} else {
|
|
10589
|
+
argumentExpression = SyntaxFactory2.identifierExpression(this.getEntityName(firstSegmentEntity));
|
|
10590
|
+
}
|
|
10591
|
+
for (let i = 1; i < argument.segments.length; i++) {
|
|
10592
|
+
argumentExpression = SyntaxFactory2.memberAccessExpression(
|
|
10593
|
+
argumentExpression,
|
|
10594
|
+
this.getEntityName(argument.segments[i])
|
|
10595
|
+
);
|
|
10596
|
+
}
|
|
10597
|
+
break;
|
|
10598
|
+
}
|
|
10599
|
+
case "invalid":
|
|
10600
|
+
argumentExpression = SyntaxFactory2.missingExpression();
|
|
10601
|
+
break;
|
|
10602
|
+
default:
|
|
10603
|
+
Debug.never(argument);
|
|
10604
|
+
}
|
|
10605
|
+
args.push(SyntaxFactory2.argument(argumentExpression));
|
|
10606
|
+
} else {
|
|
10607
|
+
args.push(SyntaxFactory2.argument(SyntaxFactory2.missingExpression()));
|
|
10608
|
+
}
|
|
10609
|
+
}
|
|
10610
|
+
}
|
|
10611
|
+
return SyntaxFactory2.tag(name, typeArguments, args);
|
|
10444
10612
|
}
|
|
10445
10613
|
getEntityName(entity) {
|
|
10446
10614
|
return entity.getName().unescapedOriginal;
|
|
@@ -10787,6 +10955,18 @@ var CompilationController = class extends RxObject2 {
|
|
|
10787
10955
|
reloadMainCompilation() {
|
|
10788
10956
|
return __async(this, null, function* () {
|
|
10789
10957
|
subscribeToFileSystemRecursively(this.rootDirectory);
|
|
10958
|
+
if (this.config.standardPackagesUri !== void 0 && this.config.standardPackagesUri.checkIfRelativeTo(this.rootDirectory.uri) === 2 /* NotRelativeOrEqual */) {
|
|
10959
|
+
const standardPackagesDirectory = this.fileSystemTree.getDirectory(this.config.standardPackagesUri);
|
|
10960
|
+
if (standardPackagesDirectory !== void 0) {
|
|
10961
|
+
subscribeToFileSystemRecursively(standardPackagesDirectory);
|
|
10962
|
+
}
|
|
10963
|
+
}
|
|
10964
|
+
if (this.config.builtInStandardPackagesUri !== void 0 && this.config.builtInStandardPackagesUri.checkIfRelativeTo(this.rootDirectory.uri) === 2 /* NotRelativeOrEqual */) {
|
|
10965
|
+
const standardPackagesDirectory = this.fileSystemTree.getDirectory(this.config.builtInStandardPackagesUri);
|
|
10966
|
+
if (standardPackagesDirectory !== void 0) {
|
|
10967
|
+
subscribeToFileSystemRecursively(standardPackagesDirectory);
|
|
10968
|
+
}
|
|
10969
|
+
}
|
|
10790
10970
|
const configurationByPackageOrGroupUri = /* @__PURE__ */ new Map();
|
|
10791
10971
|
for (const [packageUri, controller] of this.configurationControllerByPackageUri_) {
|
|
10792
10972
|
if (!controller.hasConvertedConfiguration) {
|
|
@@ -12865,7 +13045,7 @@ var SourceGenerationService = class extends RxObject7 {
|
|
|
12865
13045
|
break;
|
|
12866
13046
|
}
|
|
12867
13047
|
case 1 /* ArtelM */: {
|
|
12868
|
-
const node = new EntityToSyntax2(analyzer, packageEntity).convert();
|
|
13048
|
+
const node = new EntityToSyntax2(analyzer.dialectM, packageEntity).convert();
|
|
12869
13049
|
code = new SyntaxToCode2(node, { keywordsLocale: packageLocale }).convert();
|
|
12870
13050
|
break;
|
|
12871
13051
|
}
|
|
@@ -780,7 +780,7 @@ var UniqueWithComparatorQuery = class extends Query {
|
|
|
780
780
|
};
|
|
781
781
|
|
|
782
782
|
// source/common/Constants.ts
|
|
783
|
-
var ArtelVersion = true ? "0.9.
|
|
783
|
+
var ArtelVersion = true ? "0.9.26037-pre-release" : "";
|
|
784
784
|
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"];
|
|
785
785
|
var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
|
|
786
786
|
var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
|
|
@@ -11211,6 +11211,44 @@ var SyntaxFactory = class {
|
|
|
11211
11211
|
Debug.never(node);
|
|
11212
11212
|
}
|
|
11213
11213
|
}
|
|
11214
|
+
static argument(value, name) {
|
|
11215
|
+
let equalsToken;
|
|
11216
|
+
let nameIdentifier;
|
|
11217
|
+
if (name !== void 0) {
|
|
11218
|
+
equalsToken = this.token(64 /* Equals */);
|
|
11219
|
+
nameIdentifier = this.identifier(name);
|
|
11220
|
+
}
|
|
11221
|
+
return new Argument(nameIdentifier, equalsToken, value, void 0);
|
|
11222
|
+
}
|
|
11223
|
+
static missingExpression() {
|
|
11224
|
+
return new MissingExpression(void 0);
|
|
11225
|
+
}
|
|
11226
|
+
static booleanLiteral(value) {
|
|
11227
|
+
const keyword = value ? this.keyword(57 /* Yes */) : this.keyword(58 /* No */);
|
|
11228
|
+
return new KeywordExpression(keyword, void 0);
|
|
11229
|
+
}
|
|
11230
|
+
static textLiteral(valueWithoutQuotes) {
|
|
11231
|
+
const token = this.token(5 /* TextLiteral */, `"${valueWithoutQuotes}"`);
|
|
11232
|
+
return new TextLiteral(token, void 0);
|
|
11233
|
+
}
|
|
11234
|
+
static numericLiteral(value) {
|
|
11235
|
+
let token;
|
|
11236
|
+
if (Number.isInteger(value)) {
|
|
11237
|
+
token = this.token(2 /* IntegerLiteral */, value.toString());
|
|
11238
|
+
} else {
|
|
11239
|
+
token = this.token(3 /* RealLiteral */, value.toString());
|
|
11240
|
+
}
|
|
11241
|
+
return new TokenExpression(token, void 0);
|
|
11242
|
+
}
|
|
11243
|
+
static identifierExpression(value) {
|
|
11244
|
+
const valueIdentifier = this.identifier(value);
|
|
11245
|
+
return new IdentifierExpression(valueIdentifier, void 0);
|
|
11246
|
+
}
|
|
11247
|
+
static memberAccessExpression(expression, memberName) {
|
|
11248
|
+
const dotToken = this.token(34 /* Dot */);
|
|
11249
|
+
const memberNameIdentifier = this.identifier(memberName);
|
|
11250
|
+
return new MemberAccessExpression(expression, dotToken, memberNameIdentifier, void 0);
|
|
11251
|
+
}
|
|
11214
11252
|
static identifier(value, flags = 0 /* None */) {
|
|
11215
11253
|
if (typeof value === "string") {
|
|
11216
11254
|
return this.createToken(9 /* Identifier */, value, flags);
|
|
@@ -17771,14 +17809,13 @@ var SyntaxFactory2 = class {
|
|
|
17771
17809
|
return new ParameterDeclaration2(tagList, nameIdentifier, typeAnnotation, initializer, void 0);
|
|
17772
17810
|
}
|
|
17773
17811
|
static typeMemberDeclarationBlock(members) {
|
|
17774
|
-
const openBraceToken = this.token(1046 /* OpenBrace */);
|
|
17775
17812
|
const memberList = members instanceof Array ? new TypeMemberDeclarationList2(members, void 0) : members;
|
|
17776
|
-
const
|
|
17813
|
+
const endKeyword = this.keyword(1011 /* End */);
|
|
17777
17814
|
return new TypeMemberDeclarationBlock2(
|
|
17778
|
-
|
|
17815
|
+
void 0,
|
|
17779
17816
|
memberList,
|
|
17780
|
-
closeBraceToken,
|
|
17781
17817
|
void 0,
|
|
17818
|
+
endKeyword,
|
|
17782
17819
|
void 0
|
|
17783
17820
|
);
|
|
17784
17821
|
}
|
|
@@ -18116,6 +18153,44 @@ var SyntaxFactory2 = class {
|
|
|
18116
18153
|
}
|
|
18117
18154
|
return this.translationTypeParameterClause(typeParameters);
|
|
18118
18155
|
}
|
|
18156
|
+
static argument(value, name) {
|
|
18157
|
+
let equalsToken;
|
|
18158
|
+
let nameIdentifier;
|
|
18159
|
+
if (name !== void 0) {
|
|
18160
|
+
equalsToken = this.token(1030 /* Equals */);
|
|
18161
|
+
nameIdentifier = this.identifier(name);
|
|
18162
|
+
}
|
|
18163
|
+
return new Argument2(nameIdentifier, equalsToken, value, void 0);
|
|
18164
|
+
}
|
|
18165
|
+
static missingExpression() {
|
|
18166
|
+
return new MissingExpression2(void 0);
|
|
18167
|
+
}
|
|
18168
|
+
static booleanLiteral(value) {
|
|
18169
|
+
const keyword = value ? this.keyword(1036 /* Yes */) : this.keyword(1022 /* No */);
|
|
18170
|
+
return new KeywordExpression2(keyword, void 0);
|
|
18171
|
+
}
|
|
18172
|
+
static textLiteral(valueWithoutQuotes) {
|
|
18173
|
+
const token = this.token(1062 /* TextLiteral */, `"${valueWithoutQuotes}"`);
|
|
18174
|
+
return new TextLiteral2(token, void 0);
|
|
18175
|
+
}
|
|
18176
|
+
static numericLiteral(value) {
|
|
18177
|
+
let token;
|
|
18178
|
+
if (Number.isInteger(value)) {
|
|
18179
|
+
token = this.token(1038 /* IntegerLiteral */, value.toString());
|
|
18180
|
+
} else {
|
|
18181
|
+
token = this.token(1057 /* RealLiteral */, value.toString());
|
|
18182
|
+
}
|
|
18183
|
+
return new TokenExpression2(token, void 0);
|
|
18184
|
+
}
|
|
18185
|
+
static identifierExpression(value) {
|
|
18186
|
+
const valueIdentifier = this.identifier(value);
|
|
18187
|
+
return new IdentifierExpression2(valueIdentifier, void 0);
|
|
18188
|
+
}
|
|
18189
|
+
static memberAccessExpression(expression, memberName) {
|
|
18190
|
+
const dotToken = this.token(1026 /* Dot */);
|
|
18191
|
+
const memberNameIdentifier = this.identifier(memberName);
|
|
18192
|
+
return new MemberAccessExpression2(expression, dotToken, memberNameIdentifier, void 0);
|
|
18193
|
+
}
|
|
18119
18194
|
static identifier(value, flags = 0 /* None */) {
|
|
18120
18195
|
if (typeof value === "string") {
|
|
18121
18196
|
return this.createToken(1037 /* Identifier */, value, flags);
|
|
@@ -19185,8 +19260,8 @@ var SyntaxToCode2 = class _SyntaxToCode {
|
|
|
19185
19260
|
if (node.openBraceToken !== void 0) {
|
|
19186
19261
|
Debug.assert(node.endKeyword === void 0);
|
|
19187
19262
|
this.writeToken(node.openBraceToken);
|
|
19263
|
+
this.writeNewLineOrWhitespace();
|
|
19188
19264
|
}
|
|
19189
|
-
this.writeNewLineOrWhitespace();
|
|
19190
19265
|
if (node.memberList.elements.length > 0) {
|
|
19191
19266
|
this.increaseIndentation();
|
|
19192
19267
|
const addSemicolonsIfMissing = this.isSingleLineMode;
|
|
@@ -33535,10 +33610,10 @@ var TagFunction = class extends TagBase {
|
|
|
33535
33610
|
return this.func.entity;
|
|
33536
33611
|
}
|
|
33537
33612
|
};
|
|
33538
|
-
var
|
|
33613
|
+
var TagArgument_text = class {
|
|
33539
33614
|
constructor(value) {
|
|
33540
33615
|
this.value = value;
|
|
33541
|
-
this.kind = "
|
|
33616
|
+
this.kind = "text";
|
|
33542
33617
|
}
|
|
33543
33618
|
};
|
|
33544
33619
|
var TagArgument_numeric = class {
|
|
@@ -43334,7 +43409,7 @@ var EntityMap = class _EntityMap {
|
|
|
43334
43409
|
const realNameTag = findTag(this.analyzer.originalWellKnownDeclarationsA.realName, tags);
|
|
43335
43410
|
if (realNameTag !== void 0) {
|
|
43336
43411
|
const nameArgument = realNameTag.argumentByNameKey.get("\u0438\u043C\u044F");
|
|
43337
|
-
if (nameArgument?.kind === "
|
|
43412
|
+
if (nameArgument?.kind === "text") {
|
|
43338
43413
|
result = nameArgument.value;
|
|
43339
43414
|
}
|
|
43340
43415
|
}
|
|
@@ -106375,7 +106450,7 @@ var Tags = class {
|
|
|
106375
106450
|
const value = argument2.value;
|
|
106376
106451
|
switch (value.kind) {
|
|
106377
106452
|
case 1108 /* TextLiteral */:
|
|
106378
|
-
result = new
|
|
106453
|
+
result = new TagArgument_text(unescapeText(withoutQuotes(value.text.value)));
|
|
106379
106454
|
break;
|
|
106380
106455
|
case 1114 /* TokenExpression */:
|
|
106381
106456
|
switch (value.token.tokenKind) {
|
|
@@ -117426,7 +117501,7 @@ var Tags2 = class {
|
|
|
117426
117501
|
const value = argument2.value;
|
|
117427
117502
|
switch (value.kind) {
|
|
117428
117503
|
case 78 /* TextLiteral */:
|
|
117429
|
-
result = new
|
|
117504
|
+
result = new TagArgument_text(unescapeText(withoutQuotes(value.text.value)));
|
|
117430
117505
|
break;
|
|
117431
117506
|
case 77 /* TokenExpression */:
|
|
117432
117507
|
switch (value.token.tokenKind) {
|
|
@@ -117955,7 +118030,7 @@ export {
|
|
|
117955
118030
|
entityToStringDecorator,
|
|
117956
118031
|
TagType,
|
|
117957
118032
|
TagFunction,
|
|
117958
|
-
|
|
118033
|
+
TagArgument_text,
|
|
117959
118034
|
TagArgument_numeric,
|
|
117960
118035
|
TagArgument_boolean,
|
|
117961
118036
|
TagArgument_variableExpression,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Compiler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QH5QQEEL.js";
|
|
4
4
|
import {
|
|
5
5
|
ArtelVersion,
|
|
6
6
|
Cached,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
__async,
|
|
17
17
|
performanceMeasurementStageNames,
|
|
18
18
|
performanceMeasurementStages
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HOYH73XP.js";
|
|
20
20
|
|
|
21
21
|
// source/executor/FileSystemUri.ts
|
|
22
22
|
import { platform } from "os";
|
|
@@ -385,7 +385,7 @@ declare class Tags {
|
|
|
385
385
|
private createTagFromNode;
|
|
386
386
|
private argumentToTagArgument;
|
|
387
387
|
getWellKnownTagFlagsOfNodeWithTags(node: tree.NodeWithTags): tree.WellKnownTagFlags;
|
|
388
|
-
getWellKnownTagFlagByTagEntity(entity: e.
|
|
388
|
+
getWellKnownTagFlagByTagEntity(entity: e.PackageTypeEntity): tree.WellKnownTagFlags | undefined;
|
|
389
389
|
getTagEntityByWellKnownTagFlag(flag: tree.WellKnownTagFlags, locale: PackageLocale): e.PackageTypeEntity | undefined;
|
|
390
390
|
private getFlagByOriginalEntityMap;
|
|
391
391
|
private getLocalizedEntityByFlagMap;
|
|
@@ -25,10 +25,10 @@ export declare class TagFunction extends TagBase {
|
|
|
25
25
|
get entity(): TypeEntity | FunctionEntity;
|
|
26
26
|
constructor(func: AccessedFunction, argumentByParameter: ReadonlyMap<ParameterEntity, TagArgument>);
|
|
27
27
|
}
|
|
28
|
-
export type TagArgument =
|
|
29
|
-
export declare class
|
|
28
|
+
export type TagArgument = TagArgument_text | TagArgument_numeric | TagArgument_boolean | TagArgument_variableExpression | TagArgument_invalid;
|
|
29
|
+
export declare class TagArgument_text {
|
|
30
30
|
readonly value: string;
|
|
31
|
-
readonly kind = "
|
|
31
|
+
readonly kind = "text";
|
|
32
32
|
constructor(value: string);
|
|
33
33
|
}
|
|
34
34
|
export declare class TagArgument_numeric {
|
|
@@ -41,6 +41,7 @@ export declare class EntityToSyntax {
|
|
|
41
41
|
private convertParameter;
|
|
42
42
|
private createHidingModifier;
|
|
43
43
|
private convertTags;
|
|
44
|
+
private convertTag;
|
|
44
45
|
private getEntityName;
|
|
45
46
|
private groupTypeMemberDeclarations;
|
|
46
47
|
private groupTypeMemberDeclarationsRecursively;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Analyzer } from '../../../analysis/Analyzer.js';
|
|
1
|
+
import { Analyzer } from '../../../analysis/m/Analyzer.js';
|
|
2
2
|
import { PackageEntity } from '../../../entities/index.js';
|
|
3
3
|
import * as tree from '../../../tree/m/index.js';
|
|
4
4
|
export declare class EntityToSyntax {
|
|
@@ -27,6 +27,7 @@ export declare class EntityToSyntax {
|
|
|
27
27
|
private convertParameters;
|
|
28
28
|
private convertParameter;
|
|
29
29
|
private convertTags;
|
|
30
|
+
private convertUserTag;
|
|
30
31
|
private getEntityName;
|
|
31
32
|
private convertType;
|
|
32
33
|
private convertStructuredType;
|
|
@@ -65,6 +65,13 @@ export declare class SyntaxFactory {
|
|
|
65
65
|
static translationParameterClause(parameters: readonly (tree.Identifier | string)[]): tree.TranslationParameterClause;
|
|
66
66
|
static indexParameterTranslationClause(parameters: readonly (tree.Identifier | string)[]): tree.IndexParameterTranslationClause;
|
|
67
67
|
static typeMemberDeclarationWithModifiers(node: tree.TypeMemberDeclaration, modifiers: readonly tree.Modifier[] | tree.ModifierList): tree.TypeMemberDeclaration;
|
|
68
|
+
static argument(value: tree.Expression, name?: tree.Identifier | string): tree.Argument;
|
|
69
|
+
static missingExpression(): tree.MissingExpression;
|
|
70
|
+
static booleanLiteral(value: boolean): tree.KeywordExpression;
|
|
71
|
+
static textLiteral(valueWithoutQuotes: string): tree.TextLiteral;
|
|
72
|
+
static numericLiteral(value: number): tree.TokenExpression;
|
|
73
|
+
static identifierExpression(value: tree.Identifier | string): tree.IdentifierExpression;
|
|
74
|
+
static memberAccessExpression(expression: tree.Expression, memberName: tree.Identifier | string): tree.MemberAccessExpression;
|
|
68
75
|
static identifier(value: tree.Identifier | string, flags?: TokenFlags): tree.Identifier;
|
|
69
76
|
static token<T extends TokenKind>(kind: T, value?: string): Token<T>;
|
|
70
77
|
static keyword<T extends KeywordKind>(kind: T): tree.Keyword<T>;
|
|
@@ -53,6 +53,13 @@ export declare class SyntaxFactory {
|
|
|
53
53
|
private static translationTypeParameterClause;
|
|
54
54
|
private static translationParameterClause;
|
|
55
55
|
private static createTranslationTypeParameterClause;
|
|
56
|
+
static argument(value: tree.Expression, name?: tree.Identifier | string): tree.Argument;
|
|
57
|
+
static missingExpression(): tree.MissingExpression;
|
|
58
|
+
static booleanLiteral(value: boolean): tree.KeywordExpression;
|
|
59
|
+
static textLiteral(valueWithoutQuotes: string): tree.TextLiteral;
|
|
60
|
+
static numericLiteral(value: number): tree.TokenExpression;
|
|
61
|
+
static identifierExpression(value: tree.Identifier | string): tree.IdentifierExpression;
|
|
62
|
+
static memberAccessExpression(expression: tree.Expression, memberName: tree.Identifier | string): tree.MemberAccessExpression;
|
|
56
63
|
static identifier(value: tree.Identifier | string, flags?: TokenFlags): tree.Identifier;
|
|
57
64
|
static token<T extends TokenKind>(kind: T, value?: string): Token<T>;
|
|
58
65
|
static keyword<T extends KeywordKind>(kind: T): tree.Keyword<T>;
|
package/package.json
CHANGED