@artel/artc 0.9.26073-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 +455 -15
- package/build/{chunk-EVBBPJT6.js → chunk-VJJPNCJV.js} +1 -1
- package/build/{chunk-OHEVIYK7.js → chunk-X3V7QMLU.js} +2 -2
- package/build/{chunk-4ALH4HEN.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 +9 -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
|
|
@@ -9673,7 +9676,14 @@ var supportedSemanticTokens = [
|
|
|
9673
9676
|
6 /* Method */,
|
|
9674
9677
|
7 /* Operator */,
|
|
9675
9678
|
8 /* KeywordControl */,
|
|
9676
|
-
9 /* NamedArgument
|
|
9679
|
+
9 /* NamedArgument */,
|
|
9680
|
+
10 /* SpecialMethodParenthesis */,
|
|
9681
|
+
11 /* PackageFunctionParenthesis */,
|
|
9682
|
+
12 /* NestedFunctionParenthesis */,
|
|
9683
|
+
13 /* MethodParenthesis */,
|
|
9684
|
+
14 /* OperatorParenthesis */,
|
|
9685
|
+
15 /* TypeParenthesis */,
|
|
9686
|
+
16 /* FunctionParenthesis */
|
|
9677
9687
|
];
|
|
9678
9688
|
var supportedSemanticTokenModifiers = [
|
|
9679
9689
|
1 /* Const */,
|
|
@@ -9683,17 +9693,18 @@ var supportedSemanticTokenModifiers = [
|
|
|
9683
9693
|
|
|
9684
9694
|
// source/services/a/SemanticTokensService.ts
|
|
9685
9695
|
var SemanticTokensServiceA = class {
|
|
9686
|
-
getSemanticTokens(analyzer, sourceFile, taskController) {
|
|
9696
|
+
getSemanticTokens(analyzer, sourceFile, taskController, highlightFunctionParentheses = false) {
|
|
9687
9697
|
return __async(this, null, function* () {
|
|
9688
9698
|
return this.getSemanticTokensInRange(
|
|
9689
9699
|
analyzer,
|
|
9690
9700
|
sourceFile,
|
|
9691
9701
|
sourceFile.getSyntaxNode().rangeWithTrivia,
|
|
9692
|
-
taskController
|
|
9702
|
+
taskController,
|
|
9703
|
+
highlightFunctionParentheses
|
|
9693
9704
|
);
|
|
9694
9705
|
});
|
|
9695
9706
|
}
|
|
9696
|
-
getSemanticTokensInRange(analyzer, sourceFile, range, taskController) {
|
|
9707
|
+
getSemanticTokensInRange(analyzer, sourceFile, range, taskController, highlightFunctionParentheses = false) {
|
|
9697
9708
|
return __async(this, null, function* () {
|
|
9698
9709
|
const result = new Array();
|
|
9699
9710
|
yield traverseTreeAsync(
|
|
@@ -9823,6 +9834,13 @@ var SemanticTokensServiceA = class {
|
|
|
9823
9834
|
new SemanticToken(node.name.rangeWithoutTrivia, kind, new SemanticTokenModifiers().makeDeclaration().setCapitalized(this.isCapitalizedName(node.name.value)))
|
|
9824
9835
|
);
|
|
9825
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
|
+
}
|
|
9826
9844
|
if (node.kind === 147 /* Argument */ && node.name !== void 0) {
|
|
9827
9845
|
result.push(
|
|
9828
9846
|
new SemanticToken(
|
|
@@ -9832,10 +9850,13 @@ var SemanticTokensServiceA = class {
|
|
|
9832
9850
|
)
|
|
9833
9851
|
);
|
|
9834
9852
|
}
|
|
9853
|
+
if (highlightFunctionParentheses) {
|
|
9854
|
+
this.appendFunctionParentheses(result, this.functionParenthesesOfNode(analyzer, node));
|
|
9855
|
+
}
|
|
9835
9856
|
return void 0;
|
|
9836
9857
|
}
|
|
9837
9858
|
);
|
|
9838
|
-
return result.sort((t1, t2) => t1.range.start - t2.range.
|
|
9859
|
+
return result.sort((t1, t2) => t1.range.start - t2.range.start);
|
|
9839
9860
|
});
|
|
9840
9861
|
}
|
|
9841
9862
|
rangesOverlap(range1, range2) {
|
|
@@ -9853,6 +9874,195 @@ var SemanticTokensServiceA = class {
|
|
|
9853
9874
|
Debug.never(entity);
|
|
9854
9875
|
}
|
|
9855
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
|
+
}
|
|
9856
10066
|
isCapitalizedName(name) {
|
|
9857
10067
|
let firstChar;
|
|
9858
10068
|
if (typeof name === "string") {
|
|
@@ -19170,17 +19380,18 @@ var SelectionRangeServiceM = class {
|
|
|
19170
19380
|
|
|
19171
19381
|
// source/services/m/SemanticTokensService.ts
|
|
19172
19382
|
var SemanticTokensServiceM = class {
|
|
19173
|
-
getSemanticTokens(analyzer, sourceFile, taskController) {
|
|
19383
|
+
getSemanticTokens(analyzer, sourceFile, taskController, highlightFunctionParentheses = false) {
|
|
19174
19384
|
return __async(this, null, function* () {
|
|
19175
19385
|
return this.getSemanticTokensInRange(
|
|
19176
19386
|
analyzer,
|
|
19177
19387
|
sourceFile,
|
|
19178
19388
|
sourceFile.getSyntaxNode().rangeWithTrivia,
|
|
19179
|
-
taskController
|
|
19389
|
+
taskController,
|
|
19390
|
+
highlightFunctionParentheses
|
|
19180
19391
|
);
|
|
19181
19392
|
});
|
|
19182
19393
|
}
|
|
19183
|
-
getSemanticTokensInRange(analyzer, sourceFile, range, taskController) {
|
|
19394
|
+
getSemanticTokensInRange(analyzer, sourceFile, range, taskController, highlightFunctionParentheses = false) {
|
|
19184
19395
|
return __async(this, null, function* () {
|
|
19185
19396
|
const result = new Array();
|
|
19186
19397
|
yield traverseTreeAsync2(
|
|
@@ -19350,10 +19561,13 @@ var SemanticTokensServiceM = class {
|
|
|
19350
19561
|
)
|
|
19351
19562
|
);
|
|
19352
19563
|
}
|
|
19564
|
+
if (highlightFunctionParentheses) {
|
|
19565
|
+
this.appendFunctionParentheses(result, this.functionParenthesesOfNode(analyzer, node));
|
|
19566
|
+
}
|
|
19353
19567
|
return void 0;
|
|
19354
19568
|
}
|
|
19355
19569
|
);
|
|
19356
|
-
return result.sort((t1, t2) => t1.range.start - t2.range.
|
|
19570
|
+
return result.sort((t1, t2) => t1.range.start - t2.range.start);
|
|
19357
19571
|
});
|
|
19358
19572
|
}
|
|
19359
19573
|
rangesOverlap(range1, range2) {
|
|
@@ -19390,6 +19604,199 @@ var SemanticTokensServiceM = class {
|
|
|
19390
19604
|
return false;
|
|
19391
19605
|
}
|
|
19392
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
|
+
}
|
|
19393
19800
|
isCapitalizedName(name) {
|
|
19394
19801
|
let firstChar;
|
|
19395
19802
|
if (typeof name === "string") {
|
|
@@ -19985,6 +20392,7 @@ var _LanguageServer = class _LanguageServer {
|
|
|
19985
20392
|
this.renameServiceM = new RenameServiceM();
|
|
19986
20393
|
this.selectionRangeServiceM = new SelectionRangeServiceM();
|
|
19987
20394
|
this.semanticTokensServiceM = new SemanticTokensServiceM();
|
|
20395
|
+
this.highlightFunctionParentheses = false;
|
|
19988
20396
|
this.signatureHelpServiceM = new SignatureHelpServiceM();
|
|
19989
20397
|
this.sourceFileItemsServiceM = new SourceFileItemsServiceM();
|
|
19990
20398
|
this.connection = config.connection;
|
|
@@ -20108,6 +20516,11 @@ var _LanguageServer = class _LanguageServer {
|
|
|
20108
20516
|
this.disposables.push(disposable);
|
|
20109
20517
|
disposable = this.connection.onRequest(customRequests.getMemoryUsage, () => this.onGetMemoryUsage());
|
|
20110
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);
|
|
20111
20524
|
this.connection.listen();
|
|
20112
20525
|
}
|
|
20113
20526
|
dispose() {
|
|
@@ -20123,6 +20536,7 @@ var _LanguageServer = class _LanguageServer {
|
|
|
20123
20536
|
const initializeStartTime = performance.now();
|
|
20124
20537
|
this.clientCapabilities = params.capabilities;
|
|
20125
20538
|
setUserLocale(params.initializationOptions?.localeOverride ?? params.locale ?? "en");
|
|
20539
|
+
this.highlightFunctionParentheses = params.initializationOptions?.initialHighlightFunctionParentheses === true;
|
|
20126
20540
|
let workspaceFolderUris;
|
|
20127
20541
|
if (params.initializationOptions?.workspaceFoldersOverride !== void 0) {
|
|
20128
20542
|
workspaceFolderUris = params.initializationOptions.workspaceFoldersOverride.map((f) => this.convertVscodeUriToUri(URI.parse(f.uri)));
|
|
@@ -21047,10 +21461,10 @@ var _LanguageServer = class _LanguageServer {
|
|
|
21047
21461
|
let semanticTokens;
|
|
21048
21462
|
switch (sourceFile.dialect) {
|
|
21049
21463
|
case 0 /* ArtelA */:
|
|
21050
|
-
semanticTokens = yield this.semanticTokensServiceA.getSemanticTokens(analyzer.dialectA, sourceFile, taskController);
|
|
21464
|
+
semanticTokens = yield this.semanticTokensServiceA.getSemanticTokens(analyzer.dialectA, sourceFile, taskController, this.highlightFunctionParentheses);
|
|
21051
21465
|
break;
|
|
21052
21466
|
case 1 /* ArtelM */:
|
|
21053
|
-
semanticTokens = yield this.semanticTokensServiceM.getSemanticTokens(analyzer.dialectM, sourceFile, taskController);
|
|
21467
|
+
semanticTokens = yield this.semanticTokensServiceM.getSemanticTokens(analyzer.dialectM, sourceFile, taskController, this.highlightFunctionParentheses);
|
|
21054
21468
|
break;
|
|
21055
21469
|
default:
|
|
21056
21470
|
Debug.never(sourceFile);
|
|
@@ -21073,10 +21487,22 @@ var _LanguageServer = class _LanguageServer {
|
|
|
21073
21487
|
let semanticTokens;
|
|
21074
21488
|
switch (sourceFile.dialect) {
|
|
21075
21489
|
case 0 /* ArtelA */:
|
|
21076
|
-
semanticTokens = yield this.semanticTokensServiceA.getSemanticTokensInRange(
|
|
21490
|
+
semanticTokens = yield this.semanticTokensServiceA.getSemanticTokensInRange(
|
|
21491
|
+
analyzer.dialectA,
|
|
21492
|
+
sourceFile,
|
|
21493
|
+
range,
|
|
21494
|
+
taskController,
|
|
21495
|
+
this.highlightFunctionParentheses
|
|
21496
|
+
);
|
|
21077
21497
|
break;
|
|
21078
21498
|
case 1 /* ArtelM */:
|
|
21079
|
-
semanticTokens = yield this.semanticTokensServiceM.getSemanticTokensInRange(
|
|
21499
|
+
semanticTokens = yield this.semanticTokensServiceM.getSemanticTokensInRange(
|
|
21500
|
+
analyzer.dialectM,
|
|
21501
|
+
sourceFile,
|
|
21502
|
+
range,
|
|
21503
|
+
taskController,
|
|
21504
|
+
this.highlightFunctionParentheses
|
|
21505
|
+
);
|
|
21080
21506
|
break;
|
|
21081
21507
|
default:
|
|
21082
21508
|
Debug.never(sourceFile);
|
|
@@ -21141,6 +21567,20 @@ var _LanguageServer = class _LanguageServer {
|
|
|
21141
21567
|
return "keyword.control";
|
|
21142
21568
|
case 9 /* NamedArgument */:
|
|
21143
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;
|
|
21144
21584
|
default:
|
|
21145
21585
|
Debug.never(kind);
|
|
21146
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
|
}
|
|
@@ -23,9 +23,16 @@ export declare const enum SemanticTokenKind {
|
|
|
23
23
|
Method = 6,
|
|
24
24
|
Operator = 7,
|
|
25
25
|
KeywordControl = 8,
|
|
26
|
-
NamedArgument = 9
|
|
26
|
+
NamedArgument = 9,
|
|
27
|
+
SpecialMethodParenthesis = 10,
|
|
28
|
+
PackageFunctionParenthesis = 11,
|
|
29
|
+
NestedFunctionParenthesis = 12,
|
|
30
|
+
MethodParenthesis = 13,
|
|
31
|
+
OperatorParenthesis = 14,
|
|
32
|
+
TypeParenthesis = 15,
|
|
33
|
+
FunctionParenthesis = 16
|
|
27
34
|
}
|
|
28
|
-
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];
|
|
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];
|
|
29
36
|
export declare const enum SemanticTokenModifierFlag {
|
|
30
37
|
Const = 1,
|
|
31
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