@artel/artc 0.9.26072-pre-release → 0.9.26074-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 +2 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +476 -15
- package/build/{chunk-UN3WJATG.js → chunk-VJJPNCJV.js} +1 -1
- package/build/{chunk-DO2TCR45.js → chunk-X3V7QMLU.js} +2 -2
- package/build/{chunk-SEDG5ETC.js → chunk-XJ5TJ7IA.js} +13 -13
- package/build/types/services/CustomRequests.d.ts +3 -0
- package/build/types/services/LanguageServer.d.ts +2 -0
- package/build/types/services/a/SemanticTokensService.d.ts +10 -2
- package/build/types/services/common/semantic-tokens/Types.d.ts +10 -2
- package/build/types/services/m/SemanticTokensService.d.ts +10 -2
- 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-X3V7QMLU.js";
|
|
5
|
+
import "./chunk-VJJPNCJV.js";
|
|
6
6
|
import {
|
|
7
7
|
__async
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XJ5TJ7IA.js";
|
|
9
9
|
|
|
10
10
|
// source/Cli.ts
|
|
11
11
|
function main() {
|
package/build/api/Api.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
ImportEmitKind,
|
|
9
9
|
NotEmittedPackageInfo,
|
|
10
10
|
SourceMapMode
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-VJJPNCJV.js";
|
|
12
12
|
import {
|
|
13
13
|
AccessKind,
|
|
14
14
|
AccessedFunction_entity,
|
|
@@ -328,7 +328,7 @@ import {
|
|
|
328
328
|
withoutQuotes,
|
|
329
329
|
withoutTemplateQuotes,
|
|
330
330
|
yieldTask
|
|
331
|
-
} from "../chunk-
|
|
331
|
+
} from "../chunk-XJ5TJ7IA.js";
|
|
332
332
|
export {
|
|
333
333
|
AccessKind,
|
|
334
334
|
AccessedFunction_entity,
|
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-X3V7QMLU.js";
|
|
10
|
+
import "../chunk-VJJPNCJV.js";
|
|
11
|
+
import "../chunk-XJ5TJ7IA.js";
|
|
12
12
|
export {
|
|
13
13
|
CommandLineCompiler,
|
|
14
14
|
FileSystemUri,
|
package/build/api/ApiServices.js
CHANGED
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
traverseTreeAsync,
|
|
148
148
|
traverseTreeAsync2,
|
|
149
149
|
yieldTask
|
|
150
|
-
} from "../chunk-
|
|
150
|
+
} from "../chunk-XJ5TJ7IA.js";
|
|
151
151
|
|
|
152
152
|
// source/services/common/Types.ts
|
|
153
153
|
import * as ls from "vscode-languageserver";
|
|
@@ -187,6 +187,8 @@ var CustomRequestType0 = class extends ls2.RequestType0 {
|
|
|
187
187
|
};
|
|
188
188
|
var CustomNotificationType = class extends ls2.NotificationType0 {
|
|
189
189
|
};
|
|
190
|
+
var CustomNotificationType1 = class extends ls2.NotificationType {
|
|
191
|
+
};
|
|
190
192
|
var customRequests = {
|
|
191
193
|
getLocalesAvailableForTranslation: new CustomRequestType("artel/getLocalesAvailableForTranslation"),
|
|
192
194
|
getSourceFileDialect: new CustomRequestType("artel/getSourceFileDialect"),
|
|
@@ -199,7 +201,8 @@ var customRequests = {
|
|
|
199
201
|
getMemoryUsage: new CustomRequestType0("artel/getMemoryUsage")
|
|
200
202
|
};
|
|
201
203
|
var customNotifications = {
|
|
202
|
-
sourceFileDialectsChanged: new CustomNotificationType("artel/sourceFileDialectsChanged")
|
|
204
|
+
sourceFileDialectsChanged: new CustomNotificationType("artel/sourceFileDialectsChanged"),
|
|
205
|
+
highlightFunctionParenthesesChanged: new CustomNotificationType1("artel/highlightFunctionParenthesesChanged")
|
|
203
206
|
};
|
|
204
207
|
|
|
205
208
|
// source/services/LanguageServer.ts
|
|
@@ -9672,7 +9675,15 @@ var supportedSemanticTokens = [
|
|
|
9672
9675
|
5 /* NestedFunction */,
|
|
9673
9676
|
6 /* Method */,
|
|
9674
9677
|
7 /* Operator */,
|
|
9675
|
-
8 /* KeywordControl
|
|
9678
|
+
8 /* KeywordControl */,
|
|
9679
|
+
9 /* NamedArgument */,
|
|
9680
|
+
10 /* SpecialMethodParenthesis */,
|
|
9681
|
+
11 /* PackageFunctionParenthesis */,
|
|
9682
|
+
12 /* NestedFunctionParenthesis */,
|
|
9683
|
+
13 /* MethodParenthesis */,
|
|
9684
|
+
14 /* OperatorParenthesis */,
|
|
9685
|
+
15 /* TypeParenthesis */,
|
|
9686
|
+
16 /* FunctionParenthesis */
|
|
9676
9687
|
];
|
|
9677
9688
|
var supportedSemanticTokenModifiers = [
|
|
9678
9689
|
1 /* Const */,
|
|
@@ -9682,17 +9693,18 @@ var supportedSemanticTokenModifiers = [
|
|
|
9682
9693
|
|
|
9683
9694
|
// source/services/a/SemanticTokensService.ts
|
|
9684
9695
|
var SemanticTokensServiceA = class {
|
|
9685
|
-
getSemanticTokens(analyzer, sourceFile, taskController) {
|
|
9696
|
+
getSemanticTokens(analyzer, sourceFile, taskController, highlightFunctionParentheses = false) {
|
|
9686
9697
|
return __async(this, null, function* () {
|
|
9687
9698
|
return this.getSemanticTokensInRange(
|
|
9688
9699
|
analyzer,
|
|
9689
9700
|
sourceFile,
|
|
9690
9701
|
sourceFile.getSyntaxNode().rangeWithTrivia,
|
|
9691
|
-
taskController
|
|
9702
|
+
taskController,
|
|
9703
|
+
highlightFunctionParentheses
|
|
9692
9704
|
);
|
|
9693
9705
|
});
|
|
9694
9706
|
}
|
|
9695
|
-
getSemanticTokensInRange(analyzer, sourceFile, range, taskController) {
|
|
9707
|
+
getSemanticTokensInRange(analyzer, sourceFile, range, taskController, highlightFunctionParentheses = false) {
|
|
9696
9708
|
return __async(this, null, function* () {
|
|
9697
9709
|
const result = new Array();
|
|
9698
9710
|
yield traverseTreeAsync(
|
|
@@ -9822,10 +9834,29 @@ var SemanticTokensServiceA = class {
|
|
|
9822
9834
|
new SemanticToken(node.name.rangeWithoutTrivia, kind, new SemanticTokenModifiers().makeDeclaration().setCapitalized(this.isCapitalizedName(node.name.value)))
|
|
9823
9835
|
);
|
|
9824
9836
|
}
|
|
9837
|
+
if (node.kind === 39 /* ConstructorDeclaration */) {
|
|
9838
|
+
if (node.name !== void 0) {
|
|
9839
|
+
result.push(
|
|
9840
|
+
new SemanticToken(node.name.rangeWithoutTrivia, 6 /* Method */, new SemanticTokenModifiers().makeDeclaration().setCapitalized(this.isCapitalizedName(node.name.value)))
|
|
9841
|
+
);
|
|
9842
|
+
}
|
|
9843
|
+
}
|
|
9844
|
+
if (node.kind === 147 /* Argument */ && node.name !== void 0) {
|
|
9845
|
+
result.push(
|
|
9846
|
+
new SemanticToken(
|
|
9847
|
+
node.name.rangeWithoutTrivia,
|
|
9848
|
+
9 /* NamedArgument */,
|
|
9849
|
+
new SemanticTokenModifiers()
|
|
9850
|
+
)
|
|
9851
|
+
);
|
|
9852
|
+
}
|
|
9853
|
+
if (highlightFunctionParentheses) {
|
|
9854
|
+
this.appendFunctionParentheses(result, this.functionParenthesesOfNode(analyzer, node));
|
|
9855
|
+
}
|
|
9825
9856
|
return void 0;
|
|
9826
9857
|
}
|
|
9827
9858
|
);
|
|
9828
|
-
return result.sort((t1, t2) => t1.range.start - t2.range.
|
|
9859
|
+
return result.sort((t1, t2) => t1.range.start - t2.range.start);
|
|
9829
9860
|
});
|
|
9830
9861
|
}
|
|
9831
9862
|
rangesOverlap(range1, range2) {
|
|
@@ -9843,6 +9874,195 @@ var SemanticTokensServiceA = class {
|
|
|
9843
9874
|
Debug.never(entity);
|
|
9844
9875
|
}
|
|
9845
9876
|
}
|
|
9877
|
+
appendFunctionParentheses(result, infos) {
|
|
9878
|
+
for (const info of infos) {
|
|
9879
|
+
if (info.open !== void 0) {
|
|
9880
|
+
result.push(new SemanticToken(info.open.rangeWithoutTrivia, info.kind, info.modifiers));
|
|
9881
|
+
}
|
|
9882
|
+
if (info.close !== void 0) {
|
|
9883
|
+
result.push(new SemanticToken(info.close.rangeWithoutTrivia, info.kind, info.modifiers));
|
|
9884
|
+
}
|
|
9885
|
+
}
|
|
9886
|
+
}
|
|
9887
|
+
functionParenthesesOfNode(analyzer, node) {
|
|
9888
|
+
if (node.kind === 63 /* CallExpression */) {
|
|
9889
|
+
return this.functionParenthesesOfCall(analyzer, node);
|
|
9890
|
+
}
|
|
9891
|
+
if (node.kind === 87 /* BaseConstructorCallStatement */ || node.kind === 88 /* OwnConstructorCallStatement */) {
|
|
9892
|
+
return this.keywordOrNameParentheses(
|
|
9893
|
+
node.openParenthesisToken,
|
|
9894
|
+
node.closeParenthesisToken,
|
|
9895
|
+
node.constructorName?.value,
|
|
9896
|
+
13 /* MethodParenthesis */
|
|
9897
|
+
);
|
|
9898
|
+
}
|
|
9899
|
+
if (node.kind === 23 /* PackageFunctionDeclaration */) {
|
|
9900
|
+
return this.parentheses(
|
|
9901
|
+
node.parameterClause.openParenthesisToken,
|
|
9902
|
+
node.parameterClause.closeParenthesisToken,
|
|
9903
|
+
11 /* PackageFunctionParenthesis */,
|
|
9904
|
+
this.declarationModifiers(node.name.value)
|
|
9905
|
+
);
|
|
9906
|
+
}
|
|
9907
|
+
if (node.kind === 51 /* NestedFunctionDeclaration */) {
|
|
9908
|
+
return this.parentheses(
|
|
9909
|
+
node.parameterClause.openParenthesisToken,
|
|
9910
|
+
node.parameterClause.closeParenthesisToken,
|
|
9911
|
+
12 /* NestedFunctionParenthesis */,
|
|
9912
|
+
this.declarationModifiers(node.name.value)
|
|
9913
|
+
);
|
|
9914
|
+
}
|
|
9915
|
+
if (node.kind === 46 /* MethodDeclaration */) {
|
|
9916
|
+
const entity = analyzer.entity.ofMethodDeclaration(node);
|
|
9917
|
+
return this.parentheses(
|
|
9918
|
+
node.parameterClause.openParenthesisToken,
|
|
9919
|
+
node.parameterClause.closeParenthesisToken,
|
|
9920
|
+
this.parenthesisKindForNamedFunctionEntity(entity),
|
|
9921
|
+
this.declarationModifiers(node.name.value)
|
|
9922
|
+
);
|
|
9923
|
+
}
|
|
9924
|
+
if (node.kind === 39 /* ConstructorDeclaration */) {
|
|
9925
|
+
return this.keywordOrNameParentheses(
|
|
9926
|
+
node.parameterClause.openParenthesisToken,
|
|
9927
|
+
node.parameterClause.closeParenthesisToken,
|
|
9928
|
+
node.name?.value,
|
|
9929
|
+
13 /* MethodParenthesis */
|
|
9930
|
+
);
|
|
9931
|
+
}
|
|
9932
|
+
if (node.kind === 40 /* DestructorDeclaration */) {
|
|
9933
|
+
return this.parentheses(
|
|
9934
|
+
node.parameterClause.openParenthesisToken,
|
|
9935
|
+
node.parameterClause.closeParenthesisToken,
|
|
9936
|
+
10 /* SpecialMethodParenthesis */
|
|
9937
|
+
);
|
|
9938
|
+
}
|
|
9939
|
+
if (node.kind === 60 /* FunctionLiteral */ || node.kind === 17 /* AnonymousFunctionTypeDeclaration */ || node.kind === 124 /* ConstructorTranslation */) {
|
|
9940
|
+
if (node.kind === 124 /* ConstructorTranslation */) {
|
|
9941
|
+
return this.parentheses(
|
|
9942
|
+
node.sourceParameterClause.openParenthesisToken,
|
|
9943
|
+
node.sourceParameterClause.closeParenthesisToken,
|
|
9944
|
+
16 /* FunctionParenthesis */
|
|
9945
|
+
).concat(this.parentheses(
|
|
9946
|
+
node.translatedParameterClause.openParenthesisToken,
|
|
9947
|
+
node.translatedParameterClause.closeParenthesisToken,
|
|
9948
|
+
16 /* FunctionParenthesis */
|
|
9949
|
+
));
|
|
9950
|
+
}
|
|
9951
|
+
return this.parentheses(
|
|
9952
|
+
node.parameterClause.openParenthesisToken,
|
|
9953
|
+
node.parameterClause.closeParenthesisToken,
|
|
9954
|
+
16 /* FunctionParenthesis */
|
|
9955
|
+
);
|
|
9956
|
+
}
|
|
9957
|
+
if (node.kind === 129 /* PackageFunctionTranslationDeclaration */) {
|
|
9958
|
+
return this.parentheses(
|
|
9959
|
+
node.sourceParameterClause.openParenthesisToken,
|
|
9960
|
+
node.sourceParameterClause.closeParenthesisToken,
|
|
9961
|
+
11 /* PackageFunctionParenthesis */
|
|
9962
|
+
).concat(this.parentheses(
|
|
9963
|
+
node.translatedParameterClause.openParenthesisToken,
|
|
9964
|
+
node.translatedParameterClause.closeParenthesisToken,
|
|
9965
|
+
11 /* PackageFunctionParenthesis */
|
|
9966
|
+
));
|
|
9967
|
+
}
|
|
9968
|
+
if (node.kind === 130 /* MethodTranslation */) {
|
|
9969
|
+
return this.parentheses(
|
|
9970
|
+
node.sourceParameterClause.openParenthesisToken,
|
|
9971
|
+
node.sourceParameterClause.closeParenthesisToken,
|
|
9972
|
+
13 /* MethodParenthesis */
|
|
9973
|
+
).concat(this.parentheses(
|
|
9974
|
+
node.translatedParameterClause.openParenthesisToken,
|
|
9975
|
+
node.translatedParameterClause.closeParenthesisToken,
|
|
9976
|
+
13 /* MethodParenthesis */
|
|
9977
|
+
));
|
|
9978
|
+
}
|
|
9979
|
+
if (node.kind === 131 /* FunctionTypeTranslationDeclaration */) {
|
|
9980
|
+
return this.parentheses(
|
|
9981
|
+
node.sourceParameterClause.openParenthesisToken,
|
|
9982
|
+
node.sourceParameterClause.closeParenthesisToken,
|
|
9983
|
+
16 /* FunctionParenthesis */
|
|
9984
|
+
).concat(this.parentheses(
|
|
9985
|
+
node.translatedParameterClause.openParenthesisToken,
|
|
9986
|
+
node.translatedParameterClause.closeParenthesisToken,
|
|
9987
|
+
16 /* FunctionParenthesis */
|
|
9988
|
+
));
|
|
9989
|
+
}
|
|
9990
|
+
return [];
|
|
9991
|
+
}
|
|
9992
|
+
functionParenthesesOfCall(analyzer, node) {
|
|
9993
|
+
const meaning = analyzer.resolveCallExpression(node);
|
|
9994
|
+
switch (meaning.kind) {
|
|
9995
|
+
case "function-call": {
|
|
9996
|
+
const func = meaning.suitableOrSingleFunction?.value ?? meaning.candidates.at(0);
|
|
9997
|
+
if (func !== void 0) {
|
|
9998
|
+
return this.parentheses(
|
|
9999
|
+
node.openParenthesisToken,
|
|
10000
|
+
node.closeParenthesisToken,
|
|
10001
|
+
this.parenthesisKindForNamedFunctionEntity(func.entity),
|
|
10002
|
+
new SemanticTokenModifiers().setCapitalized(this.isCapitalizedName(func.entity.getName()))
|
|
10003
|
+
);
|
|
10004
|
+
}
|
|
10005
|
+
return this.parentheses(
|
|
10006
|
+
node.openParenthesisToken,
|
|
10007
|
+
node.closeParenthesisToken,
|
|
10008
|
+
16 /* FunctionParenthesis */
|
|
10009
|
+
);
|
|
10010
|
+
}
|
|
10011
|
+
case "object-function-call":
|
|
10012
|
+
return this.parentheses(
|
|
10013
|
+
node.openParenthesisToken,
|
|
10014
|
+
node.closeParenthesisToken,
|
|
10015
|
+
16 /* FunctionParenthesis */
|
|
10016
|
+
);
|
|
10017
|
+
case "constructor-call":
|
|
10018
|
+
return this.parentheses(
|
|
10019
|
+
node.openParenthesisToken,
|
|
10020
|
+
node.closeParenthesisToken,
|
|
10021
|
+
15 /* TypeParenthesis */
|
|
10022
|
+
);
|
|
10023
|
+
case "unresolved":
|
|
10024
|
+
return this.parentheses(
|
|
10025
|
+
node.openParenthesisToken,
|
|
10026
|
+
node.closeParenthesisToken,
|
|
10027
|
+
16 /* FunctionParenthesis */
|
|
10028
|
+
);
|
|
10029
|
+
default:
|
|
10030
|
+
Debug.never(meaning);
|
|
10031
|
+
}
|
|
10032
|
+
}
|
|
10033
|
+
parenthesisKindForNamedFunctionEntity(entity) {
|
|
10034
|
+
switch (entity.subkind) {
|
|
10035
|
+
case "package":
|
|
10036
|
+
return 11 /* PackageFunctionParenthesis */;
|
|
10037
|
+
case "method":
|
|
10038
|
+
return entity.methodKind === 4 /* Operator */ ? 14 /* OperatorParenthesis */ : 13 /* MethodParenthesis */;
|
|
10039
|
+
case "nested":
|
|
10040
|
+
return 12 /* NestedFunctionParenthesis */;
|
|
10041
|
+
default:
|
|
10042
|
+
Debug.never(entity);
|
|
10043
|
+
}
|
|
10044
|
+
}
|
|
10045
|
+
keywordOrNameParentheses(open, close, name, nameParenthesisKind) {
|
|
10046
|
+
const kind = name === void 0 ? 10 /* SpecialMethodParenthesis */ : nameParenthesisKind;
|
|
10047
|
+
return this.parentheses(open, close, kind);
|
|
10048
|
+
}
|
|
10049
|
+
declarationModifiers(name) {
|
|
10050
|
+
return new SemanticTokenModifiers().makeDeclaration().setCapitalized(this.isCapitalizedName(name));
|
|
10051
|
+
}
|
|
10052
|
+
parentheses(open, close, kind, modifiers = new SemanticTokenModifiers()) {
|
|
10053
|
+
const openToken = this.presentParenthesis(open);
|
|
10054
|
+
const closeToken = this.presentParenthesis(close);
|
|
10055
|
+
if (openToken === void 0 && closeToken === void 0) {
|
|
10056
|
+
return [];
|
|
10057
|
+
}
|
|
10058
|
+
return [{ open: openToken, close: closeToken, kind, modifiers }];
|
|
10059
|
+
}
|
|
10060
|
+
presentParenthesis(token) {
|
|
10061
|
+
if (token === void 0 || token.isMissing || token.rangeWithoutTrivia.length === 0) {
|
|
10062
|
+
return void 0;
|
|
10063
|
+
}
|
|
10064
|
+
return token;
|
|
10065
|
+
}
|
|
9846
10066
|
isCapitalizedName(name) {
|
|
9847
10067
|
let firstChar;
|
|
9848
10068
|
if (typeof name === "string") {
|
|
@@ -19160,17 +19380,18 @@ var SelectionRangeServiceM = class {
|
|
|
19160
19380
|
|
|
19161
19381
|
// source/services/m/SemanticTokensService.ts
|
|
19162
19382
|
var SemanticTokensServiceM = class {
|
|
19163
|
-
getSemanticTokens(analyzer, sourceFile, taskController) {
|
|
19383
|
+
getSemanticTokens(analyzer, sourceFile, taskController, highlightFunctionParentheses = false) {
|
|
19164
19384
|
return __async(this, null, function* () {
|
|
19165
19385
|
return this.getSemanticTokensInRange(
|
|
19166
19386
|
analyzer,
|
|
19167
19387
|
sourceFile,
|
|
19168
19388
|
sourceFile.getSyntaxNode().rangeWithTrivia,
|
|
19169
|
-
taskController
|
|
19389
|
+
taskController,
|
|
19390
|
+
highlightFunctionParentheses
|
|
19170
19391
|
);
|
|
19171
19392
|
});
|
|
19172
19393
|
}
|
|
19173
|
-
getSemanticTokensInRange(analyzer, sourceFile, range, taskController) {
|
|
19394
|
+
getSemanticTokensInRange(analyzer, sourceFile, range, taskController, highlightFunctionParentheses = false) {
|
|
19174
19395
|
return __async(this, null, function* () {
|
|
19175
19396
|
const result = new Array();
|
|
19176
19397
|
yield traverseTreeAsync2(
|
|
@@ -19331,10 +19552,22 @@ var SemanticTokensServiceM = class {
|
|
|
19331
19552
|
new SemanticTokenModifiers()
|
|
19332
19553
|
));
|
|
19333
19554
|
}
|
|
19555
|
+
if (node.kind === 1003 /* Argument */ && node.name !== void 0) {
|
|
19556
|
+
result.push(
|
|
19557
|
+
new SemanticToken(
|
|
19558
|
+
node.name.rangeWithoutTrivia,
|
|
19559
|
+
9 /* NamedArgument */,
|
|
19560
|
+
new SemanticTokenModifiers()
|
|
19561
|
+
)
|
|
19562
|
+
);
|
|
19563
|
+
}
|
|
19564
|
+
if (highlightFunctionParentheses) {
|
|
19565
|
+
this.appendFunctionParentheses(result, this.functionParenthesesOfNode(analyzer, node));
|
|
19566
|
+
}
|
|
19334
19567
|
return void 0;
|
|
19335
19568
|
}
|
|
19336
19569
|
);
|
|
19337
|
-
return result.sort((t1, t2) => t1.range.start - t2.range.
|
|
19570
|
+
return result.sort((t1, t2) => t1.range.start - t2.range.start);
|
|
19338
19571
|
});
|
|
19339
19572
|
}
|
|
19340
19573
|
rangesOverlap(range1, range2) {
|
|
@@ -19371,6 +19604,199 @@ var SemanticTokensServiceM = class {
|
|
|
19371
19604
|
return false;
|
|
19372
19605
|
}
|
|
19373
19606
|
}
|
|
19607
|
+
appendFunctionParentheses(result, infos) {
|
|
19608
|
+
for (const info of infos) {
|
|
19609
|
+
if (info.open !== void 0) {
|
|
19610
|
+
result.push(new SemanticToken(info.open.rangeWithoutTrivia, info.kind, info.modifiers));
|
|
19611
|
+
}
|
|
19612
|
+
if (info.close !== void 0) {
|
|
19613
|
+
result.push(new SemanticToken(info.close.rangeWithoutTrivia, info.kind, info.modifiers));
|
|
19614
|
+
}
|
|
19615
|
+
}
|
|
19616
|
+
}
|
|
19617
|
+
functionParenthesesOfNode(analyzer, node) {
|
|
19618
|
+
if (node.kind === 1012 /* CallExpression */) {
|
|
19619
|
+
return this.functionParenthesesOfCall(analyzer, node);
|
|
19620
|
+
}
|
|
19621
|
+
if (node.kind === 1077 /* PackageFunctionDeclaration */) {
|
|
19622
|
+
return this.parentheses(
|
|
19623
|
+
node.parameterClause.openParenthesisToken,
|
|
19624
|
+
node.parameterClause.closeParenthesisToken,
|
|
19625
|
+
11 /* PackageFunctionParenthesis */,
|
|
19626
|
+
this.declarationModifiers(node.name.value)
|
|
19627
|
+
);
|
|
19628
|
+
}
|
|
19629
|
+
if (node.kind === 1072 /* NestedFunctionDeclaration */) {
|
|
19630
|
+
return this.parentheses(
|
|
19631
|
+
node.parameterClause.openParenthesisToken,
|
|
19632
|
+
node.parameterClause.closeParenthesisToken,
|
|
19633
|
+
12 /* NestedFunctionParenthesis */,
|
|
19634
|
+
this.declarationModifiers(node.name.value)
|
|
19635
|
+
);
|
|
19636
|
+
}
|
|
19637
|
+
if (node.kind === 1064 /* MethodDeclaration */) {
|
|
19638
|
+
if (isIdentifier2(node.name)) {
|
|
19639
|
+
return this.parentheses(
|
|
19640
|
+
node.parameterClause.openParenthesisToken,
|
|
19641
|
+
node.parameterClause.closeParenthesisToken,
|
|
19642
|
+
13 /* MethodParenthesis */,
|
|
19643
|
+
this.declarationModifiers(node.name.value)
|
|
19644
|
+
);
|
|
19645
|
+
}
|
|
19646
|
+
return this.parentheses(
|
|
19647
|
+
node.parameterClause.openParenthesisToken,
|
|
19648
|
+
node.parameterClause.closeParenthesisToken,
|
|
19649
|
+
14 /* OperatorParenthesis */,
|
|
19650
|
+
new SemanticTokenModifiers().makeDeclaration()
|
|
19651
|
+
);
|
|
19652
|
+
}
|
|
19653
|
+
if (node.kind === 1039 /* FunctionLiteral */ || node.kind === 1052 /* LocalFunctionTypeDeclaration */ || node.kind === 1047 /* IndexedElementGetterDeclaration */ || node.kind === 1049 /* IndexedElementSetterDeclaration */ || node.kind === 1020 /* DereferencedVariableGetterDeclaration */ || node.kind === 1021 /* DereferencedVariableSetterDeclaration */) {
|
|
19654
|
+
return this.parentheses(
|
|
19655
|
+
node.parameterClause.openParenthesisToken,
|
|
19656
|
+
node.parameterClause.closeParenthesisToken,
|
|
19657
|
+
16 /* FunctionParenthesis */
|
|
19658
|
+
);
|
|
19659
|
+
}
|
|
19660
|
+
if (node.kind === 1031 /* FieldGetterDeclaration */ || node.kind === 1032 /* FieldSetterDeclaration */) {
|
|
19661
|
+
return this.parentheses(
|
|
19662
|
+
node.parameterClause.openParenthesisToken,
|
|
19663
|
+
node.parameterClause.closeParenthesisToken,
|
|
19664
|
+
13 /* MethodParenthesis */
|
|
19665
|
+
);
|
|
19666
|
+
}
|
|
19667
|
+
if (node.kind === 1088 /* PackageVariableGetterDeclaration */ || node.kind === 1089 /* PackageVariableSetterDeclaration */) {
|
|
19668
|
+
return this.parentheses(
|
|
19669
|
+
node.parameterClause.openParenthesisToken,
|
|
19670
|
+
node.parameterClause.closeParenthesisToken,
|
|
19671
|
+
11 /* PackageFunctionParenthesis */
|
|
19672
|
+
);
|
|
19673
|
+
}
|
|
19674
|
+
if (node.kind === 1078 /* PackageFunctionTranslationDeclaration */) {
|
|
19675
|
+
return this.parentheses(
|
|
19676
|
+
node.sourceParameterClause.openParenthesisToken,
|
|
19677
|
+
node.sourceParameterClause.closeParenthesisToken,
|
|
19678
|
+
11 /* PackageFunctionParenthesis */
|
|
19679
|
+
).concat(this.parentheses(
|
|
19680
|
+
node.translatedParameterClause.openParenthesisToken,
|
|
19681
|
+
node.translatedParameterClause.closeParenthesisToken,
|
|
19682
|
+
11 /* PackageFunctionParenthesis */
|
|
19683
|
+
));
|
|
19684
|
+
}
|
|
19685
|
+
if (node.kind === 1040 /* FunctionTypeTranslationDeclaration */) {
|
|
19686
|
+
return this.parentheses(
|
|
19687
|
+
node.sourceParameterClause.openParenthesisToken,
|
|
19688
|
+
node.sourceParameterClause.closeParenthesisToken,
|
|
19689
|
+
16 /* FunctionParenthesis */
|
|
19690
|
+
).concat(this.parentheses(
|
|
19691
|
+
node.translatedParameterClause.openParenthesisToken,
|
|
19692
|
+
node.translatedParameterClause.closeParenthesisToken,
|
|
19693
|
+
16 /* FunctionParenthesis */
|
|
19694
|
+
));
|
|
19695
|
+
}
|
|
19696
|
+
if (node.kind === 1065 /* MethodTranslation */) {
|
|
19697
|
+
return this.methodTranslationParentheses(node.sourceParameterClause, node.sourceName).concat(this.methodTranslationParentheses(node.translatedParameterClause, node.translatedName));
|
|
19698
|
+
}
|
|
19699
|
+
if (node.kind === 1048 /* IndexedElementGetterTranslation */ || node.kind === 1050 /* IndexedElementSetterTranslation */) {
|
|
19700
|
+
return this.parentheses(
|
|
19701
|
+
node.sourceParameterClause.openParenthesisToken,
|
|
19702
|
+
node.sourceParameterClause.closeParenthesisToken,
|
|
19703
|
+
16 /* FunctionParenthesis */
|
|
19704
|
+
).concat(this.parentheses(
|
|
19705
|
+
node.translatedParameterClause.openParenthesisToken,
|
|
19706
|
+
node.translatedParameterClause.closeParenthesisToken,
|
|
19707
|
+
16 /* FunctionParenthesis */
|
|
19708
|
+
));
|
|
19709
|
+
}
|
|
19710
|
+
return [];
|
|
19711
|
+
}
|
|
19712
|
+
functionParenthesesOfCall(analyzer, node) {
|
|
19713
|
+
const meaning = analyzer.resolveCallExpression(node);
|
|
19714
|
+
switch (meaning.kind) {
|
|
19715
|
+
case "function-call": {
|
|
19716
|
+
const func = meaning.suitableOrSingleFunction?.value;
|
|
19717
|
+
if (func !== void 0) {
|
|
19718
|
+
return this.parentheses(
|
|
19719
|
+
node.openParenthesisToken,
|
|
19720
|
+
node.closeParenthesisToken,
|
|
19721
|
+
this.parenthesisKindForNamedFunctionEntity(func.entity),
|
|
19722
|
+
new SemanticTokenModifiers().setCapitalized(this.isCapitalizedName(func.entity.getName()))
|
|
19723
|
+
);
|
|
19724
|
+
}
|
|
19725
|
+
return this.parentheses(
|
|
19726
|
+
node.openParenthesisToken,
|
|
19727
|
+
node.closeParenthesisToken,
|
|
19728
|
+
16 /* FunctionParenthesis */
|
|
19729
|
+
);
|
|
19730
|
+
}
|
|
19731
|
+
case "object-function-call":
|
|
19732
|
+
return this.parentheses(
|
|
19733
|
+
node.openParenthesisToken,
|
|
19734
|
+
node.closeParenthesisToken,
|
|
19735
|
+
16 /* FunctionParenthesis */
|
|
19736
|
+
);
|
|
19737
|
+
case "constructor-call":
|
|
19738
|
+
return this.parentheses(
|
|
19739
|
+
node.openParenthesisToken,
|
|
19740
|
+
node.closeParenthesisToken,
|
|
19741
|
+
15 /* TypeParenthesis */
|
|
19742
|
+
);
|
|
19743
|
+
case "unresolved":
|
|
19744
|
+
return this.parentheses(
|
|
19745
|
+
node.openParenthesisToken,
|
|
19746
|
+
node.closeParenthesisToken,
|
|
19747
|
+
16 /* FunctionParenthesis */
|
|
19748
|
+
);
|
|
19749
|
+
case "variant-value-access":
|
|
19750
|
+
case "bit-flag-selection":
|
|
19751
|
+
return [];
|
|
19752
|
+
default:
|
|
19753
|
+
Debug.never(meaning);
|
|
19754
|
+
}
|
|
19755
|
+
}
|
|
19756
|
+
methodTranslationParentheses(clause, name) {
|
|
19757
|
+
if (isIdentifier2(name)) {
|
|
19758
|
+
return this.parentheses(
|
|
19759
|
+
clause.openParenthesisToken,
|
|
19760
|
+
clause.closeParenthesisToken,
|
|
19761
|
+
13 /* MethodParenthesis */
|
|
19762
|
+
);
|
|
19763
|
+
}
|
|
19764
|
+
return this.parentheses(
|
|
19765
|
+
clause.openParenthesisToken,
|
|
19766
|
+
clause.closeParenthesisToken,
|
|
19767
|
+
14 /* OperatorParenthesis */,
|
|
19768
|
+
new SemanticTokenModifiers().makeDeclaration()
|
|
19769
|
+
);
|
|
19770
|
+
}
|
|
19771
|
+
parenthesisKindForNamedFunctionEntity(entity) {
|
|
19772
|
+
switch (entity.subkind) {
|
|
19773
|
+
case "package":
|
|
19774
|
+
return 11 /* PackageFunctionParenthesis */;
|
|
19775
|
+
case "method":
|
|
19776
|
+
return entity.getOperatorKind() === void 0 ? 13 /* MethodParenthesis */ : 14 /* OperatorParenthesis */;
|
|
19777
|
+
case "nested":
|
|
19778
|
+
return 12 /* NestedFunctionParenthesis */;
|
|
19779
|
+
default:
|
|
19780
|
+
Debug.never(entity);
|
|
19781
|
+
}
|
|
19782
|
+
}
|
|
19783
|
+
declarationModifiers(name) {
|
|
19784
|
+
return new SemanticTokenModifiers().makeDeclaration().setCapitalized(this.isCapitalizedName(name));
|
|
19785
|
+
}
|
|
19786
|
+
parentheses(open, close, kind, modifiers = new SemanticTokenModifiers()) {
|
|
19787
|
+
const openToken = this.presentParenthesis(open);
|
|
19788
|
+
const closeToken = this.presentParenthesis(close);
|
|
19789
|
+
if (openToken === void 0 && closeToken === void 0) {
|
|
19790
|
+
return [];
|
|
19791
|
+
}
|
|
19792
|
+
return [{ open: openToken, close: closeToken, kind, modifiers }];
|
|
19793
|
+
}
|
|
19794
|
+
presentParenthesis(token) {
|
|
19795
|
+
if (token === void 0 || token.isMissing || token.rangeWithoutTrivia.length === 0) {
|
|
19796
|
+
return void 0;
|
|
19797
|
+
}
|
|
19798
|
+
return token;
|
|
19799
|
+
}
|
|
19374
19800
|
isCapitalizedName(name) {
|
|
19375
19801
|
let firstChar;
|
|
19376
19802
|
if (typeof name === "string") {
|
|
@@ -19966,6 +20392,7 @@ var _LanguageServer = class _LanguageServer {
|
|
|
19966
20392
|
this.renameServiceM = new RenameServiceM();
|
|
19967
20393
|
this.selectionRangeServiceM = new SelectionRangeServiceM();
|
|
19968
20394
|
this.semanticTokensServiceM = new SemanticTokensServiceM();
|
|
20395
|
+
this.highlightFunctionParentheses = false;
|
|
19969
20396
|
this.signatureHelpServiceM = new SignatureHelpServiceM();
|
|
19970
20397
|
this.sourceFileItemsServiceM = new SourceFileItemsServiceM();
|
|
19971
20398
|
this.connection = config.connection;
|
|
@@ -20089,6 +20516,11 @@ var _LanguageServer = class _LanguageServer {
|
|
|
20089
20516
|
this.disposables.push(disposable);
|
|
20090
20517
|
disposable = this.connection.onRequest(customRequests.getMemoryUsage, () => this.onGetMemoryUsage());
|
|
20091
20518
|
this.disposables.push(disposable);
|
|
20519
|
+
disposable = this.connection.onNotification(customNotifications.highlightFunctionParenthesesChanged, (enabled) => {
|
|
20520
|
+
this.highlightFunctionParentheses = enabled;
|
|
20521
|
+
void this.connection.languages.semanticTokens.refresh();
|
|
20522
|
+
});
|
|
20523
|
+
this.disposables.push(disposable);
|
|
20092
20524
|
this.connection.listen();
|
|
20093
20525
|
}
|
|
20094
20526
|
dispose() {
|
|
@@ -20104,6 +20536,7 @@ var _LanguageServer = class _LanguageServer {
|
|
|
20104
20536
|
const initializeStartTime = performance.now();
|
|
20105
20537
|
this.clientCapabilities = params.capabilities;
|
|
20106
20538
|
setUserLocale(params.initializationOptions?.localeOverride ?? params.locale ?? "en");
|
|
20539
|
+
this.highlightFunctionParentheses = params.initializationOptions?.initialHighlightFunctionParentheses === true;
|
|
20107
20540
|
let workspaceFolderUris;
|
|
20108
20541
|
if (params.initializationOptions?.workspaceFoldersOverride !== void 0) {
|
|
20109
20542
|
workspaceFolderUris = params.initializationOptions.workspaceFoldersOverride.map((f) => this.convertVscodeUriToUri(URI.parse(f.uri)));
|
|
@@ -21028,10 +21461,10 @@ var _LanguageServer = class _LanguageServer {
|
|
|
21028
21461
|
let semanticTokens;
|
|
21029
21462
|
switch (sourceFile.dialect) {
|
|
21030
21463
|
case 0 /* ArtelA */:
|
|
21031
|
-
semanticTokens = yield this.semanticTokensServiceA.getSemanticTokens(analyzer.dialectA, sourceFile, taskController);
|
|
21464
|
+
semanticTokens = yield this.semanticTokensServiceA.getSemanticTokens(analyzer.dialectA, sourceFile, taskController, this.highlightFunctionParentheses);
|
|
21032
21465
|
break;
|
|
21033
21466
|
case 1 /* ArtelM */:
|
|
21034
|
-
semanticTokens = yield this.semanticTokensServiceM.getSemanticTokens(analyzer.dialectM, sourceFile, taskController);
|
|
21467
|
+
semanticTokens = yield this.semanticTokensServiceM.getSemanticTokens(analyzer.dialectM, sourceFile, taskController, this.highlightFunctionParentheses);
|
|
21035
21468
|
break;
|
|
21036
21469
|
default:
|
|
21037
21470
|
Debug.never(sourceFile);
|
|
@@ -21054,10 +21487,22 @@ var _LanguageServer = class _LanguageServer {
|
|
|
21054
21487
|
let semanticTokens;
|
|
21055
21488
|
switch (sourceFile.dialect) {
|
|
21056
21489
|
case 0 /* ArtelA */:
|
|
21057
|
-
semanticTokens = yield this.semanticTokensServiceA.getSemanticTokensInRange(
|
|
21490
|
+
semanticTokens = yield this.semanticTokensServiceA.getSemanticTokensInRange(
|
|
21491
|
+
analyzer.dialectA,
|
|
21492
|
+
sourceFile,
|
|
21493
|
+
range,
|
|
21494
|
+
taskController,
|
|
21495
|
+
this.highlightFunctionParentheses
|
|
21496
|
+
);
|
|
21058
21497
|
break;
|
|
21059
21498
|
case 1 /* ArtelM */:
|
|
21060
|
-
semanticTokens = yield this.semanticTokensServiceM.getSemanticTokensInRange(
|
|
21499
|
+
semanticTokens = yield this.semanticTokensServiceM.getSemanticTokensInRange(
|
|
21500
|
+
analyzer.dialectM,
|
|
21501
|
+
sourceFile,
|
|
21502
|
+
range,
|
|
21503
|
+
taskController,
|
|
21504
|
+
this.highlightFunctionParentheses
|
|
21505
|
+
);
|
|
21061
21506
|
break;
|
|
21062
21507
|
default:
|
|
21063
21508
|
Debug.never(sourceFile);
|
|
@@ -21120,6 +21565,22 @@ var _LanguageServer = class _LanguageServer {
|
|
|
21120
21565
|
return ls3.SemanticTokenTypes.operator;
|
|
21121
21566
|
case 8 /* KeywordControl */:
|
|
21122
21567
|
return "keyword.control";
|
|
21568
|
+
case 9 /* NamedArgument */:
|
|
21569
|
+
return "keywordNotControl";
|
|
21570
|
+
case 10 /* SpecialMethodParenthesis */:
|
|
21571
|
+
return "keywordNotControl";
|
|
21572
|
+
case 11 /* PackageFunctionParenthesis */:
|
|
21573
|
+
return ls3.SemanticTokenTypes.function;
|
|
21574
|
+
case 12 /* NestedFunctionParenthesis */:
|
|
21575
|
+
return ls3.SemanticTokenTypes.function;
|
|
21576
|
+
case 13 /* MethodParenthesis */:
|
|
21577
|
+
return ls3.SemanticTokenTypes.method;
|
|
21578
|
+
case 14 /* OperatorParenthesis */:
|
|
21579
|
+
return ls3.SemanticTokenTypes.operator;
|
|
21580
|
+
case 15 /* TypeParenthesis */:
|
|
21581
|
+
return ls3.SemanticTokenTypes.type;
|
|
21582
|
+
case 16 /* FunctionParenthesis */:
|
|
21583
|
+
return ls3.SemanticTokenTypes.function;
|
|
21123
21584
|
default:
|
|
21124
21585
|
Debug.never(kind);
|
|
21125
21586
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Compiler,
|
|
3
3
|
DiagnosticFormatter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VJJPNCJV.js";
|
|
5
5
|
import {
|
|
6
6
|
ArtelVersion,
|
|
7
7
|
Cached,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
__async,
|
|
17
17
|
performanceMeasurementStageNames,
|
|
18
18
|
performanceMeasurementStages
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XJ5TJ7IA.js";
|
|
20
20
|
|
|
21
21
|
// source/executor/FileSystemUri.ts
|
|
22
22
|
import { platform } from "os";
|
|
@@ -782,7 +782,7 @@ var UniqueWithComparatorQuery = class extends Query {
|
|
|
782
782
|
};
|
|
783
783
|
|
|
784
784
|
// source/common/Constants.ts
|
|
785
|
-
var ArtelVersion = true ? "0.9.
|
|
785
|
+
var ArtelVersion = true ? "0.9.26074-pre-release" : "";
|
|
786
786
|
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"];
|
|
787
787
|
var ArtelSourceFileExtensionSet = new Set(ArtelSourceFileExtensions);
|
|
788
788
|
var ArtelSourceAndConfigurationFileExtensionSet = new Set(ArtelSourceFileExtensionSet).add(".json");
|
|
@@ -19303,10 +19303,10 @@ var nameByWellKnownTagFlagByLocale = {
|
|
|
19303
19303
|
[8192 /* BitFlags */]: new Name("\u0431\u0438\u0442\u043E\u0432\u044B\u0435-\u0444\u043B\u0430\u0433\u0438"),
|
|
19304
19304
|
[512 /* Const */]: new Name("\u043A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u0430"),
|
|
19305
19305
|
[1048576 /* Extension */]: new Name("\u0434\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435"),
|
|
19306
|
-
[4 /* HiddenInFile */]: new Name("\
|
|
19307
|
-
[2 /* HiddenInHierarchy */]: new Name("\
|
|
19308
|
-
[8 /* HiddenInPackage */]: new Name("\
|
|
19309
|
-
[1 /* HiddenInType */]: new Name("\
|
|
19306
|
+
[4 /* HiddenInFile */]: new Name("\u0441\u043A\u0440\u044B\u0442\u043E-\u0432-\u0444\u0430\u0439\u043B\u0435"),
|
|
19307
|
+
[2 /* HiddenInHierarchy */]: new Name("\u0441\u043A\u0440\u044B\u0442\u043E-\u0432-\u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438"),
|
|
19308
|
+
[8 /* HiddenInPackage */]: new Name("\u0441\u043A\u0440\u044B\u0442\u043E-\u0432-\u043C\u043E\u0434\u0443\u043B\u0435"),
|
|
19309
|
+
[1 /* HiddenInType */]: new Name("\u0441\u043A\u0440\u044B\u0442\u043E-\u0432-\u0442\u0438\u043F\u0435"),
|
|
19310
19310
|
[2048 /* Meta */]: new Name("\u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440"),
|
|
19311
19311
|
[16384 /* ClosedHierarchyInFile */]: new Name("\u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044F-\u0437\u0430\u043A\u0440\u044B\u0442\u0430-\u0432-\u0444\u0430\u0439\u043B\u0435"),
|
|
19312
19312
|
[32768 /* ClosedHierarchyInPackage */]: new Name("\u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044F-\u0437\u0430\u043A\u0440\u044B\u0442\u0430-\u0432-\u043C\u043E\u0434\u0443\u043B\u0435"),
|
|
@@ -19330,10 +19330,10 @@ var nameByWellKnownTagFlagByLocale = {
|
|
|
19330
19330
|
[8192 /* BitFlags */]: new Name("bit-flags"),
|
|
19331
19331
|
[512 /* Const */]: new Name("constant"),
|
|
19332
19332
|
[1048576 /* Extension */]: new Name("extension"),
|
|
19333
|
-
[4 /* HiddenInFile */]: new Name("
|
|
19334
|
-
[2 /* HiddenInHierarchy */]: new Name("
|
|
19335
|
-
[8 /* HiddenInPackage */]: new Name("
|
|
19336
|
-
[1 /* HiddenInType */]: new Name("
|
|
19333
|
+
[4 /* HiddenInFile */]: new Name("hidden-in-file"),
|
|
19334
|
+
[2 /* HiddenInHierarchy */]: new Name("hidden-in-hierarchy"),
|
|
19335
|
+
[8 /* HiddenInPackage */]: new Name("hidden-in-module"),
|
|
19336
|
+
[1 /* HiddenInType */]: new Name("hidden-in-type"),
|
|
19337
19337
|
[2048 /* Meta */]: new Name("modifier"),
|
|
19338
19338
|
[16384 /* ClosedHierarchyInFile */]: new Name("hierarchy-is-closed-in-file"),
|
|
19339
19339
|
[32768 /* ClosedHierarchyInPackage */]: new Name("hierarchy-is-closed-in-module"),
|
|
@@ -74434,10 +74434,10 @@ var WellKnownDeclarationsLoader = class {
|
|
|
74434
74434
|
tagBitFlags: this.findPackageType(systemPackageM, new Name("\u0431\u0438\u0442\u043E\u0432\u044B\u0435-\u0444\u043B\u0430\u0433\u0438"), 0),
|
|
74435
74435
|
tagConst: this.findPackageType(systemPackageM, new Name("\u043A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u0430"), 0),
|
|
74436
74436
|
tagExtension: this.findPackageType(systemPackageM, new Name("\u0434\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435"), 0),
|
|
74437
|
-
tagHiddenInFile: this.findPackageType(systemPackageM, new Name("\
|
|
74438
|
-
tagHiddenInHierarchy: this.findPackageType(systemPackageM, new Name("\
|
|
74439
|
-
tagHiddenInPackage: this.findPackageType(systemPackageM, new Name("\
|
|
74440
|
-
tagHiddenInType: this.findPackageType(systemPackageM, new Name("\
|
|
74437
|
+
tagHiddenInFile: this.findPackageType(systemPackageM, new Name("\u0441\u043A\u0440\u044B\u0442\u043E-\u0432-\u0444\u0430\u0439\u043B\u0435"), 0),
|
|
74438
|
+
tagHiddenInHierarchy: this.findPackageType(systemPackageM, new Name("\u0441\u043A\u0440\u044B\u0442\u043E-\u0432-\u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438"), 0),
|
|
74439
|
+
tagHiddenInPackage: this.findPackageType(systemPackageM, new Name("\u0441\u043A\u0440\u044B\u0442\u043E-\u0432-\u043C\u043E\u0434\u0443\u043B\u0435"), 0),
|
|
74440
|
+
tagHiddenInType: this.findPackageType(systemPackageM, new Name("\u0441\u043A\u0440\u044B\u0442\u043E-\u0432-\u0442\u0438\u043F\u0435"), 0),
|
|
74441
74441
|
tagMeta: this.findPackageType(systemPackageM, new Name("\u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440"), 0),
|
|
74442
74442
|
tagNamedConstructor: this.findPackageType(systemPackageM, new Name("\u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440-\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u043D\u044B\u0439"), 0),
|
|
74443
74443
|
tagNew: this.findPackageType(systemPackageM, new Name("\u0437\u0430\u043D\u043E\u0432\u043E"), 0),
|
|
@@ -6,6 +6,8 @@ declare class CustomRequestType0<R> extends ls.RequestType0<R, void> {
|
|
|
6
6
|
}
|
|
7
7
|
declare class CustomNotificationType extends ls.NotificationType0 {
|
|
8
8
|
}
|
|
9
|
+
declare class CustomNotificationType1<P> extends ls.NotificationType<P> {
|
|
10
|
+
}
|
|
9
11
|
export declare const customRequests: {
|
|
10
12
|
getLocalesAvailableForTranslation: CustomRequestType<GetLocalesAvailableForTranslationParams, string[] | null>;
|
|
11
13
|
getSourceFileDialect: CustomRequestType<GetSourceFileDialectParams, GetSourceFileDialectResult>;
|
|
@@ -19,6 +21,7 @@ export declare const customRequests: {
|
|
|
19
21
|
};
|
|
20
22
|
export declare const customNotifications: {
|
|
21
23
|
sourceFileDialectsChanged: CustomNotificationType;
|
|
24
|
+
highlightFunctionParenthesesChanged: CustomNotificationType1<boolean>;
|
|
22
25
|
};
|
|
23
26
|
export type GetLocalesAvailableForTranslationParams = {
|
|
24
27
|
textDocument: ls.TextDocumentIdentifier;
|
|
@@ -45,6 +45,7 @@ export declare class LanguageServer {
|
|
|
45
45
|
private readonly renameServiceM;
|
|
46
46
|
private readonly selectionRangeServiceM;
|
|
47
47
|
private readonly semanticTokensServiceM;
|
|
48
|
+
private highlightFunctionParentheses;
|
|
48
49
|
private readonly signatureHelpServiceM;
|
|
49
50
|
private readonly sourceFileItemsServiceM;
|
|
50
51
|
private definitionServiceM;
|
|
@@ -145,6 +146,7 @@ export interface ArtelServerInitializationOptions {
|
|
|
145
146
|
localeOverride?: string;
|
|
146
147
|
standardPackagesUri?: ls.URI;
|
|
147
148
|
enableLogging?: boolean;
|
|
149
|
+
initialHighlightFunctionParentheses?: boolean;
|
|
148
150
|
}
|
|
149
151
|
export declare class ClientCancellationToken implements CancellationToken {
|
|
150
152
|
private readonly token;
|
|
@@ -3,9 +3,17 @@ import { Range, TaskController } from '../../common/index.js';
|
|
|
3
3
|
import { SourceFileA } from '../../project/index.js';
|
|
4
4
|
import { SemanticToken } from '../common/semantic-tokens/Types.js';
|
|
5
5
|
export declare class SemanticTokensServiceA {
|
|
6
|
-
getSemanticTokens(analyzer: Analyzer, sourceFile: SourceFileA, taskController: TaskController): Promise<SemanticToken[]>;
|
|
7
|
-
getSemanticTokensInRange(analyzer: Analyzer, sourceFile: SourceFileA, range: Range, taskController: TaskController): Promise<SemanticToken[]>;
|
|
6
|
+
getSemanticTokens(analyzer: Analyzer, sourceFile: SourceFileA, taskController: TaskController, highlightFunctionParentheses?: boolean): Promise<SemanticToken[]>;
|
|
7
|
+
getSemanticTokensInRange(analyzer: Analyzer, sourceFile: SourceFileA, range: Range, taskController: TaskController, highlightFunctionParentheses?: boolean): Promise<SemanticToken[]>;
|
|
8
8
|
private rangesOverlap;
|
|
9
9
|
private getSemanticTokenKindForNamedFunctionEntity;
|
|
10
|
+
private appendFunctionParentheses;
|
|
11
|
+
private functionParenthesesOfNode;
|
|
12
|
+
private functionParenthesesOfCall;
|
|
13
|
+
private parenthesisKindForNamedFunctionEntity;
|
|
14
|
+
private keywordOrNameParentheses;
|
|
15
|
+
private declarationModifiers;
|
|
16
|
+
private parentheses;
|
|
17
|
+
private presentParenthesis;
|
|
10
18
|
private isCapitalizedName;
|
|
11
19
|
}
|
|
@@ -22,9 +22,17 @@ export declare const enum SemanticTokenKind {
|
|
|
22
22
|
NestedFunction = 5,
|
|
23
23
|
Method = 6,
|
|
24
24
|
Operator = 7,
|
|
25
|
-
KeywordControl = 8
|
|
25
|
+
KeywordControl = 8,
|
|
26
|
+
NamedArgument = 9,
|
|
27
|
+
SpecialMethodParenthesis = 10,
|
|
28
|
+
PackageFunctionParenthesis = 11,
|
|
29
|
+
NestedFunctionParenthesis = 12,
|
|
30
|
+
MethodParenthesis = 13,
|
|
31
|
+
OperatorParenthesis = 14,
|
|
32
|
+
TypeParenthesis = 15,
|
|
33
|
+
FunctionParenthesis = 16
|
|
26
34
|
}
|
|
27
|
-
export declare const supportedSemanticTokens: readonly [SemanticTokenKind.FunctionBlockLiteralParameter, SemanticTokenKind.SpecialVariable, SemanticTokenKind.SpecialMethod, SemanticTokenKind.Variant, SemanticTokenKind.PackageFunction, SemanticTokenKind.NestedFunction, SemanticTokenKind.Method, SemanticTokenKind.Operator, SemanticTokenKind.KeywordControl];
|
|
35
|
+
export declare const supportedSemanticTokens: readonly [SemanticTokenKind.FunctionBlockLiteralParameter, SemanticTokenKind.SpecialVariable, SemanticTokenKind.SpecialMethod, SemanticTokenKind.Variant, SemanticTokenKind.PackageFunction, SemanticTokenKind.NestedFunction, SemanticTokenKind.Method, SemanticTokenKind.Operator, SemanticTokenKind.KeywordControl, SemanticTokenKind.NamedArgument, SemanticTokenKind.SpecialMethodParenthesis, SemanticTokenKind.PackageFunctionParenthesis, SemanticTokenKind.NestedFunctionParenthesis, SemanticTokenKind.MethodParenthesis, SemanticTokenKind.OperatorParenthesis, SemanticTokenKind.TypeParenthesis, SemanticTokenKind.FunctionParenthesis];
|
|
28
36
|
export declare const enum SemanticTokenModifierFlag {
|
|
29
37
|
Const = 1,
|
|
30
38
|
Declaration = 2,
|
|
@@ -3,10 +3,18 @@ import { Range, TaskController } from '../../common/index.js';
|
|
|
3
3
|
import { SourceFileM } from '../../project/index.js';
|
|
4
4
|
import { SemanticToken } from '../common/semantic-tokens/Types.js';
|
|
5
5
|
export declare class SemanticTokensServiceM {
|
|
6
|
-
getSemanticTokens(analyzer: Analyzer, sourceFile: SourceFileM, taskController: TaskController): Promise<SemanticToken[]>;
|
|
7
|
-
getSemanticTokensInRange(analyzer: Analyzer, sourceFile: SourceFileM, range: Range, taskController: TaskController): Promise<SemanticToken[]>;
|
|
6
|
+
getSemanticTokens(analyzer: Analyzer, sourceFile: SourceFileM, taskController: TaskController, highlightFunctionParentheses?: boolean): Promise<SemanticToken[]>;
|
|
7
|
+
getSemanticTokensInRange(analyzer: Analyzer, sourceFile: SourceFileM, range: Range, taskController: TaskController, highlightFunctionParentheses?: boolean): Promise<SemanticToken[]>;
|
|
8
8
|
private rangesOverlap;
|
|
9
9
|
private getSemanticTokenKindForNamedFunctionEntity;
|
|
10
10
|
private isEndKeywordEndingStatement;
|
|
11
|
+
private appendFunctionParentheses;
|
|
12
|
+
private functionParenthesesOfNode;
|
|
13
|
+
private functionParenthesesOfCall;
|
|
14
|
+
private methodTranslationParentheses;
|
|
15
|
+
private parenthesisKindForNamedFunctionEntity;
|
|
16
|
+
private declarationModifiers;
|
|
17
|
+
private parentheses;
|
|
18
|
+
private presentParenthesis;
|
|
11
19
|
private isCapitalizedName;
|
|
12
20
|
}
|
package/package.json
CHANGED