@abaplint/cli 2.102.46 → 2.102.48
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 +2295 -2167
- package/package.json +4 -4
package/build/cli.js
CHANGED
|
@@ -3401,6 +3401,27 @@ exports.AttributeName = AttributeName;
|
|
|
3401
3401
|
|
|
3402
3402
|
/***/ }),
|
|
3403
3403
|
|
|
3404
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/behavior_definition_name.js":
|
|
3405
|
+
/*!*********************************************************************************************************!*\
|
|
3406
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/behavior_definition_name.js ***!
|
|
3407
|
+
\*********************************************************************************************************/
|
|
3408
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
3409
|
+
|
|
3410
|
+
"use strict";
|
|
3411
|
+
|
|
3412
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3413
|
+
exports.BehaviorDefinitionName = void 0;
|
|
3414
|
+
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
3415
|
+
class BehaviorDefinitionName extends combi_1.Expression {
|
|
3416
|
+
getRunnable() {
|
|
3417
|
+
return (0, combi_1.regex)(/^((\w*\/\w+\/)|(\w*\/\w+\/)?[\w\*$%]+)$/);
|
|
3418
|
+
}
|
|
3419
|
+
}
|
|
3420
|
+
exports.BehaviorDefinitionName = BehaviorDefinitionName;
|
|
3421
|
+
//# sourceMappingURL=behavior_definition_name.js.map
|
|
3422
|
+
|
|
3423
|
+
/***/ }),
|
|
3424
|
+
|
|
3404
3425
|
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/block_name.js":
|
|
3405
3426
|
/*!*******************************************************************************************!*\
|
|
3406
3427
|
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/block_name.js ***!
|
|
@@ -5048,6 +5069,7 @@ __exportStar(__webpack_require__(/*! ./assign_source */ "./node_modules/@abaplin
|
|
|
5048
5069
|
__exportStar(__webpack_require__(/*! ./association_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/association_name.js"), exports);
|
|
5049
5070
|
__exportStar(__webpack_require__(/*! ./attribute_chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_chain.js"), exports);
|
|
5050
5071
|
__exportStar(__webpack_require__(/*! ./attribute_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_name.js"), exports);
|
|
5072
|
+
__exportStar(__webpack_require__(/*! ./behavior_definition_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/behavior_definition_name.js"), exports);
|
|
5051
5073
|
__exportStar(__webpack_require__(/*! ./block_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/block_name.js"), exports);
|
|
5052
5074
|
__exportStar(__webpack_require__(/*! ./call_transformation_options */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_options.js"), exports);
|
|
5053
5075
|
__exportStar(__webpack_require__(/*! ./call_transformation_parameters */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_parameters.js"), exports);
|
|
@@ -10038,7 +10060,7 @@ class ClassDefinition {
|
|
|
10038
10060
|
const risk = (0, combi_1.seq)("RISK LEVEL", level);
|
|
10039
10061
|
const time = (0, combi_1.altPrio)("LONG", "MEDIUM", "SHORT");
|
|
10040
10062
|
const duration = (0, combi_1.seq)("DURATION", time);
|
|
10041
|
-
const blah = (0, combi_1.per)(expressions_1.ClassGlobal, expressions_1.ClassFinal, "ABSTRACT", (0, combi_1.seq)("INHERITING FROM", expressions_1.SuperClassName), create, "FOR TESTING", risk, "SHARED MEMORY ENABLED", duration, (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("FOR BEHAVIOR OF", expressions_1.
|
|
10063
|
+
const blah = (0, combi_1.per)(expressions_1.ClassGlobal, expressions_1.ClassFinal, "ABSTRACT", (0, combi_1.seq)("INHERITING FROM", expressions_1.SuperClassName), create, "FOR TESTING", risk, "SHARED MEMORY ENABLED", duration, (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)("FOR BEHAVIOR OF", expressions_1.BehaviorDefinitionName)), expressions_1.ClassFriends);
|
|
10042
10064
|
const def = (0, combi_1.seq)("DEFINITION", (0, combi_1.optPrio)(blah));
|
|
10043
10065
|
return (0, combi_1.seq)("CLASS", expressions_1.ClassName, def);
|
|
10044
10066
|
}
|
|
@@ -21807,6 +21829,11 @@ class TypeUtils {
|
|
|
21807
21829
|
return false;
|
|
21808
21830
|
}
|
|
21809
21831
|
}
|
|
21832
|
+
else if (source instanceof basic_1.GenericObjectReferenceType) {
|
|
21833
|
+
if (target instanceof basic_1.ObjectReferenceType) {
|
|
21834
|
+
return false;
|
|
21835
|
+
}
|
|
21836
|
+
}
|
|
21810
21837
|
else if (source instanceof basic_1.ObjectReferenceType) {
|
|
21811
21838
|
if (target instanceof basic_1.XSequenceType
|
|
21812
21839
|
|| target instanceof basic_1.IntegerType
|
|
@@ -25542,9 +25569,15 @@ class Select {
|
|
|
25542
25569
|
const token = node.getFirstToken();
|
|
25543
25570
|
const from = node.findDirectExpression(Expressions.SQLFrom);
|
|
25544
25571
|
const dbSources = from ? new sql_from_1.SQLFrom().runSyntax(from, scope, filename) : [];
|
|
25572
|
+
const fields = this.findFields(node);
|
|
25573
|
+
if (fields.length === 0
|
|
25574
|
+
&& node.findDirectExpression(Expressions.SQLFieldListLoop) === undefined) {
|
|
25575
|
+
throw new Error(`fields missing`);
|
|
25576
|
+
}
|
|
25577
|
+
this.checkFields(fields, dbSources, scope);
|
|
25545
25578
|
for (const inline of node.findAllExpressions(Expressions.InlineData)) {
|
|
25546
25579
|
// todo, for now these are voided
|
|
25547
|
-
new inline_data_1.InlineData().runSyntax(inline, scope, filename,
|
|
25580
|
+
new inline_data_1.InlineData().runSyntax(inline, scope, filename, this.buildType(fields));
|
|
25548
25581
|
}
|
|
25549
25582
|
const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
|
|
25550
25583
|
if (fae) {
|
|
@@ -25588,6 +25621,59 @@ class Select {
|
|
|
25588
25621
|
scope.pop(node.getLastToken().getEnd());
|
|
25589
25622
|
}
|
|
25590
25623
|
}
|
|
25624
|
+
checkFields(fields, dbSources, scope) {
|
|
25625
|
+
if (dbSources.length > 1) {
|
|
25626
|
+
return;
|
|
25627
|
+
}
|
|
25628
|
+
const first = dbSources[0];
|
|
25629
|
+
if (first === undefined) {
|
|
25630
|
+
// then its voided
|
|
25631
|
+
return;
|
|
25632
|
+
}
|
|
25633
|
+
const type = first.parseType(scope.getRegistry());
|
|
25634
|
+
if (type instanceof basic_1.VoidType || type instanceof basic_1.UnknownType) {
|
|
25635
|
+
return;
|
|
25636
|
+
}
|
|
25637
|
+
if (!(type instanceof basic_1.StructureType)) {
|
|
25638
|
+
throw new Error("checkFields, expected structure, " + type.constructor.name);
|
|
25639
|
+
}
|
|
25640
|
+
const isSimple = /^\w+$/;
|
|
25641
|
+
for (const field of fields) {
|
|
25642
|
+
if (field.code === "*") {
|
|
25643
|
+
continue;
|
|
25644
|
+
}
|
|
25645
|
+
if (isSimple.test(field.code) && type.getComponentByName(field.code) === undefined) {
|
|
25646
|
+
throw new Error(`checkFields, field ${field.code} not found`);
|
|
25647
|
+
}
|
|
25648
|
+
}
|
|
25649
|
+
}
|
|
25650
|
+
buildType(_fields) {
|
|
25651
|
+
return new basic_1.VoidType("SELECT_todo");
|
|
25652
|
+
}
|
|
25653
|
+
findFields(node) {
|
|
25654
|
+
var _a;
|
|
25655
|
+
let expr = undefined;
|
|
25656
|
+
const ret = [];
|
|
25657
|
+
expr = node.findDirectExpression(Expressions.SQLFieldList);
|
|
25658
|
+
if (expr === undefined) {
|
|
25659
|
+
expr = node.findDirectExpression(Expressions.SQLFields);
|
|
25660
|
+
}
|
|
25661
|
+
if (expr === undefined) {
|
|
25662
|
+
node.findDirectExpression(Expressions.SQLFieldName);
|
|
25663
|
+
}
|
|
25664
|
+
for (const field of (expr === null || expr === void 0 ? void 0 : expr.findAllExpressions(Expressions.SQLField)) || []) {
|
|
25665
|
+
let code = field.concatTokens().toUpperCase();
|
|
25666
|
+
const as = ((_a = field.findDirectExpression(Expressions.SQLAsName)) === null || _a === void 0 ? void 0 : _a.concatTokens()) || "";
|
|
25667
|
+
if (as !== "") {
|
|
25668
|
+
code = code.replace(" AS " + as, "");
|
|
25669
|
+
}
|
|
25670
|
+
ret.push({ code, as, expression: field });
|
|
25671
|
+
}
|
|
25672
|
+
if (ret.length === 0 && expr) {
|
|
25673
|
+
ret.push({ code: expr.concatTokens(), as: "", expression: expr });
|
|
25674
|
+
}
|
|
25675
|
+
return ret;
|
|
25676
|
+
}
|
|
25591
25677
|
}
|
|
25592
25678
|
exports.Select = Select;
|
|
25593
25679
|
//# sourceMappingURL=select.js.map
|
|
@@ -40019,7 +40105,7 @@ exports.Issue = Issue;
|
|
|
40019
40105
|
|
|
40020
40106
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40021
40107
|
exports.LSPEdit = void 0;
|
|
40022
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40108
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40023
40109
|
class LSPEdit {
|
|
40024
40110
|
static mapEdits(edits) {
|
|
40025
40111
|
const workspace = { changes: {} };
|
|
@@ -40094,7 +40180,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
40094
40180
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40095
40181
|
exports.LSPLookup = void 0;
|
|
40096
40182
|
/* eslint-disable max-len */
|
|
40097
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40183
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40098
40184
|
const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
40099
40185
|
const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
40100
40186
|
const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
@@ -40451,7 +40537,7 @@ const nodes_1 = __webpack_require__(/*! ../abap/nodes */ "./node_modules/@abapli
|
|
|
40451
40537
|
const _identifier_1 = __webpack_require__(/*! ../abap/4_file_information/_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
|
|
40452
40538
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
40453
40539
|
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
40454
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40540
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40455
40541
|
class LSPUtils {
|
|
40456
40542
|
static getABAPFile(reg, filename) {
|
|
40457
40543
|
const file = reg.getFileByName(filename);
|
|
@@ -40536,7 +40622,7 @@ exports.LSPUtils = LSPUtils;
|
|
|
40536
40622
|
|
|
40537
40623
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40538
40624
|
exports.CodeActions = void 0;
|
|
40539
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40625
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40540
40626
|
const diagnostics_1 = __webpack_require__(/*! ./diagnostics */ "./node_modules/@abaplint/core/build/src/lsp/diagnostics.js");
|
|
40541
40627
|
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
40542
40628
|
const _edit_1 = __webpack_require__(/*! ./_edit */ "./node_modules/@abaplint/core/build/src/lsp/_edit.js");
|
|
@@ -40626,7 +40712,7 @@ exports.CodeActions = CodeActions;
|
|
|
40626
40712
|
|
|
40627
40713
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40628
40714
|
exports.CodeLens = void 0;
|
|
40629
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40715
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40630
40716
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
40631
40717
|
const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
40632
40718
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
@@ -40774,7 +40860,7 @@ exports.Definition = Definition;
|
|
|
40774
40860
|
|
|
40775
40861
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
40776
40862
|
exports.Diagnostics = void 0;
|
|
40777
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
40863
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
40778
40864
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
40779
40865
|
const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
|
|
40780
40866
|
class Diagnostics {
|
|
@@ -41273,7 +41359,7 @@ exports.Highlight = Highlight;
|
|
|
41273
41359
|
|
|
41274
41360
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41275
41361
|
exports.Hover = void 0;
|
|
41276
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
41362
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
41277
41363
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
41278
41364
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
41279
41365
|
const Tokens = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
@@ -41410,7 +41496,7 @@ exports.Implementation = Implementation;
|
|
|
41410
41496
|
|
|
41411
41497
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41412
41498
|
exports.InlayHints = void 0;
|
|
41413
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
41499
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
41414
41500
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
41415
41501
|
const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
41416
41502
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
@@ -41485,7 +41571,7 @@ exports.InlayHints = InlayHints;
|
|
|
41485
41571
|
|
|
41486
41572
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41487
41573
|
exports.LanguageServer = void 0;
|
|
41488
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
41574
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
41489
41575
|
const symbols_1 = __webpack_require__(/*! ./symbols */ "./node_modules/@abaplint/core/build/src/lsp/symbols.js");
|
|
41490
41576
|
const hover_1 = __webpack_require__(/*! ./hover */ "./node_modules/@abaplint/core/build/src/lsp/hover.js");
|
|
41491
41577
|
const diagnostics_1 = __webpack_require__(/*! ./diagnostics */ "./node_modules/@abaplint/core/build/src/lsp/diagnostics.js");
|
|
@@ -41750,7 +41836,7 @@ exports.References = References;
|
|
|
41750
41836
|
|
|
41751
41837
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41752
41838
|
exports.Rename = exports.RenameType = void 0;
|
|
41753
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
41839
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
41754
41840
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
41755
41841
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
41756
41842
|
const _lookup_1 = __webpack_require__(/*! ./_lookup */ "./node_modules/@abaplint/core/build/src/lsp/_lookup.js");
|
|
@@ -41867,7 +41953,7 @@ exports.Rename = Rename;
|
|
|
41867
41953
|
|
|
41868
41954
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
41869
41955
|
exports.SemanticHighlighting = void 0;
|
|
41870
|
-
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
41956
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
41871
41957
|
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
41872
41958
|
const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
41873
41959
|
const nodes_1 = __webpack_require__(/*! ../abap/nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
@@ -42009,8 +42095,10 @@ SemanticHighlighting.tokenTypes = [];
|
|
|
42009
42095
|
|
|
42010
42096
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
42011
42097
|
exports.Symbols = void 0;
|
|
42012
|
-
|
|
42098
|
+
/* eslint-disable max-len */
|
|
42099
|
+
const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
42013
42100
|
const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
42101
|
+
const statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
42014
42102
|
class Symbols {
|
|
42015
42103
|
constructor(reg) {
|
|
42016
42104
|
this.reg = reg;
|
|
@@ -42035,6 +42123,16 @@ class Symbols {
|
|
|
42035
42123
|
const end = identifer.getEnd();
|
|
42036
42124
|
return LServer.Range.create(start.getRow() - 1, start.getCol() - 1, end.getRow() - 1, end.getCol() - 1);
|
|
42037
42125
|
}
|
|
42126
|
+
newSymbolRanged(identifier, kind, children, range) {
|
|
42127
|
+
const symbol = {
|
|
42128
|
+
name: identifier.getName(),
|
|
42129
|
+
kind: kind,
|
|
42130
|
+
range: range,
|
|
42131
|
+
selectionRange: this.selectionRange(identifier),
|
|
42132
|
+
children,
|
|
42133
|
+
};
|
|
42134
|
+
return symbol;
|
|
42135
|
+
}
|
|
42038
42136
|
newSymbol(identifier, kind, children) {
|
|
42039
42137
|
const symbol = {
|
|
42040
42138
|
name: identifier.getName(),
|
|
@@ -42058,22 +42156,36 @@ class Symbols {
|
|
|
42058
42156
|
for (const cla of file.getInfo().listClassDefinitions()) {
|
|
42059
42157
|
const children = [];
|
|
42060
42158
|
children.push(...this.outputClassAttributes(cla.attributes));
|
|
42061
|
-
children.push(...this.outputMethodDefinitions(cla.methods));
|
|
42062
42159
|
const symbol = this.newSymbol(cla.identifier, LServer.SymbolKind.Class, children);
|
|
42063
42160
|
ret.push(symbol);
|
|
42064
42161
|
}
|
|
42065
42162
|
for (const cla of file.getInfo().listClassImplementations()) {
|
|
42066
42163
|
const children = [];
|
|
42067
|
-
children.push(...this.outputMethodImplementations(cla.methods));
|
|
42164
|
+
children.push(...this.outputMethodImplementations(cla.methods, file));
|
|
42068
42165
|
const symbol = this.newSymbol(cla.identifier, LServer.SymbolKind.Class, children);
|
|
42069
42166
|
ret.push(symbol);
|
|
42070
42167
|
}
|
|
42071
42168
|
return ret;
|
|
42072
42169
|
}
|
|
42073
|
-
outputMethodImplementations(methods) {
|
|
42170
|
+
outputMethodImplementations(methods, file) {
|
|
42074
42171
|
const ret = [];
|
|
42075
42172
|
for (const method of methods) {
|
|
42076
|
-
const
|
|
42173
|
+
const start = method.getStart();
|
|
42174
|
+
let end = undefined;
|
|
42175
|
+
for (const s of file.getStatements()) {
|
|
42176
|
+
if (s.getFirstToken().getStart().isBefore(start)) {
|
|
42177
|
+
continue;
|
|
42178
|
+
}
|
|
42179
|
+
if (s.get() instanceof statements_1.EndMethod) {
|
|
42180
|
+
end = s.getLastToken().getEnd();
|
|
42181
|
+
break;
|
|
42182
|
+
}
|
|
42183
|
+
}
|
|
42184
|
+
if (end === undefined) {
|
|
42185
|
+
continue;
|
|
42186
|
+
}
|
|
42187
|
+
const range = LServer.Range.create(start.getRow() - 1, start.getCol() - 1, end.getRow() - 1, end.getCol() - 1);
|
|
42188
|
+
const symbol = this.newSymbolRanged(method, LServer.SymbolKind.Method, [], range);
|
|
42077
42189
|
ret.push(symbol);
|
|
42078
42190
|
}
|
|
42079
42191
|
return ret;
|
|
@@ -42089,13 +42201,6 @@ class Symbols {
|
|
|
42089
42201
|
// todo, also add constants
|
|
42090
42202
|
return ret;
|
|
42091
42203
|
}
|
|
42092
|
-
outputMethodDefinitions(methods) {
|
|
42093
|
-
if (methods === undefined) {
|
|
42094
|
-
return [];
|
|
42095
|
-
}
|
|
42096
|
-
// todo
|
|
42097
|
-
return [];
|
|
42098
|
-
}
|
|
42099
42204
|
}
|
|
42100
42205
|
exports.Symbols = Symbols;
|
|
42101
42206
|
//# sourceMappingURL=symbols.js.map
|
|
@@ -46476,7 +46581,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
46476
46581
|
exports.RenameGlobalClass = void 0;
|
|
46477
46582
|
const Statements = __webpack_require__(/*! ../../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
46478
46583
|
const Expressions = __webpack_require__(/*! ../../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
46479
|
-
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
46584
|
+
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
46480
46585
|
const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
46481
46586
|
const _lsp_utils_1 = __webpack_require__(/*! ../../lsp/_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
46482
46587
|
const renamer_helper_1 = __webpack_require__(/*! ./renamer_helper */ "./node_modules/@abaplint/core/build/src/objects/rename/renamer_helper.js");
|
|
@@ -46541,7 +46646,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
46541
46646
|
exports.RenameGlobalInterface = void 0;
|
|
46542
46647
|
const Statements = __webpack_require__(/*! ../../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
46543
46648
|
const Expressions = __webpack_require__(/*! ../../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
46544
|
-
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
46649
|
+
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
46545
46650
|
const _lsp_utils_1 = __webpack_require__(/*! ../../lsp/_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
|
|
46546
46651
|
const renamer_helper_1 = __webpack_require__(/*! ./renamer_helper */ "./node_modules/@abaplint/core/build/src/objects/rename/renamer_helper.js");
|
|
46547
46652
|
const interface_1 = __webpack_require__(/*! ../interface */ "./node_modules/@abaplint/core/build/src/objects/interface.js");
|
|
@@ -46670,7 +46775,7 @@ exports.RenameTableType = RenameTableType;
|
|
|
46670
46775
|
|
|
46671
46776
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
46672
46777
|
exports.Renamer = void 0;
|
|
46673
|
-
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
46778
|
+
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
46674
46779
|
const memory_file_1 = __webpack_require__(/*! ../../files/memory_file */ "./node_modules/@abaplint/core/build/src/files/memory_file.js");
|
|
46675
46780
|
const rename_data_element_1 = __webpack_require__(/*! ./rename_data_element */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_data_element.js");
|
|
46676
46781
|
const rename_domain_1 = __webpack_require__(/*! ./rename_domain */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_domain.js");
|
|
@@ -46802,7 +46907,7 @@ exports.Renamer = Renamer;
|
|
|
46802
46907
|
|
|
46803
46908
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
46804
46909
|
exports.RenamerHelper = void 0;
|
|
46805
|
-
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/
|
|
46910
|
+
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
46806
46911
|
const __1 = __webpack_require__(/*! ../.. */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
46807
46912
|
const syntax_1 = __webpack_require__(/*! ../../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
46808
46913
|
const _scope_type_1 = __webpack_require__(/*! ../../abap/5_syntax/_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
|
|
@@ -48933,7 +49038,7 @@ class Registry {
|
|
|
48933
49038
|
}
|
|
48934
49039
|
static abaplintVersion() {
|
|
48935
49040
|
// magic, see build script "version.sh"
|
|
48936
|
-
return "2.102.
|
|
49041
|
+
return "2.102.48";
|
|
48937
49042
|
}
|
|
48938
49043
|
getDDICReferences() {
|
|
48939
49044
|
return this.ddicReferences;
|
|
@@ -51577,6 +51682,7 @@ FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
|
|
|
51577
51682
|
}
|
|
51578
51683
|
else if (config.assign === true
|
|
51579
51684
|
&& statement.get() instanceof Statements.Assign
|
|
51685
|
+
&& this.isSimpleAssign(statement) === false
|
|
51580
51686
|
&& this.isChecked(i, statements) === false) {
|
|
51581
51687
|
issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
|
|
51582
51688
|
}
|
|
@@ -51590,6 +51696,16 @@ FIND statement with MATCH COUNT is considered okay if subrc is not checked`,
|
|
|
51590
51696
|
return issues;
|
|
51591
51697
|
}
|
|
51592
51698
|
////////////////
|
|
51699
|
+
isSimpleAssign(statement) {
|
|
51700
|
+
if (statement.getChildren().length === 5) {
|
|
51701
|
+
const source = statement.findDirectExpression(Expressions.AssignSource);
|
|
51702
|
+
if ((source === null || source === void 0 ? void 0 : source.getChildren().length) === 1
|
|
51703
|
+
&& source.findDirectExpression(Expressions.Source) !== undefined) {
|
|
51704
|
+
return true;
|
|
51705
|
+
}
|
|
51706
|
+
}
|
|
51707
|
+
return false;
|
|
51708
|
+
}
|
|
51593
51709
|
isExemptedFind(s) {
|
|
51594
51710
|
// see https://github.com/abaplint/abaplint/issues/2130
|
|
51595
51711
|
return s.concatTokens().toUpperCase().includes(" MATCH COUNT ") === true;
|
|
@@ -67496,7 +67612,7 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
67496
67612
|
return this.issues;
|
|
67497
67613
|
}
|
|
67498
67614
|
traverse(n, file) {
|
|
67499
|
-
var _a;
|
|
67615
|
+
var _a, _b, _c, _d;
|
|
67500
67616
|
const get = n.get();
|
|
67501
67617
|
if (get instanceof Structures.ClassDefinition
|
|
67502
67618
|
|| get instanceof Structures.Interface) {
|
|
@@ -67507,10 +67623,16 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
67507
67623
|
// note that TRY-CATCH might be arbitrarily nested
|
|
67508
67624
|
const previous = this.sinked ? this.sinked.slice() : undefined;
|
|
67509
67625
|
this.addFromTryStructure(n);
|
|
67510
|
-
for (const c of n.getChildren()) {
|
|
67626
|
+
for (const c of ((_a = n.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {
|
|
67511
67627
|
this.traverse(c, file);
|
|
67512
67628
|
}
|
|
67513
67629
|
this.sinked = previous;
|
|
67630
|
+
for (const c of ((_b = n.findDirectStructure(Structures.Catch)) === null || _b === void 0 ? void 0 : _b.getChildren()) || []) {
|
|
67631
|
+
this.traverse(c, file);
|
|
67632
|
+
}
|
|
67633
|
+
for (const c of ((_c = n.findDirectStructure(Structures.Cleanup)) === null || _c === void 0 ? void 0 : _c.getChildren()) || []) {
|
|
67634
|
+
this.traverse(c, file);
|
|
67635
|
+
}
|
|
67514
67636
|
return;
|
|
67515
67637
|
}
|
|
67516
67638
|
else {
|
|
@@ -67540,7 +67662,7 @@ class UncaughtException extends _abap_rule_1.ABAPRule {
|
|
|
67540
67662
|
let name = undefined;
|
|
67541
67663
|
const concat = n.concatTokens().toUpperCase();
|
|
67542
67664
|
if (concat.startsWith("RAISE EXCEPTION TYPE ")) {
|
|
67543
|
-
name = (
|
|
67665
|
+
name = (_d = n.findFirstExpression(Expressions.ClassName)) === null || _d === void 0 ? void 0 : _d.getFirstToken().getStr().toUpperCase();
|
|
67544
67666
|
}
|
|
67545
67667
|
this.check(name, n, file);
|
|
67546
67668
|
}
|
|
@@ -78237,2301 +78359,2307 @@ module.exports = toNumber
|
|
|
78237
78359
|
|
|
78238
78360
|
/***/ }),
|
|
78239
78361
|
|
|
78240
|
-
/***/ "./node_modules/vscode-languageserver-types/lib/
|
|
78362
|
+
/***/ "./node_modules/vscode-languageserver-types/lib/umd/main.js":
|
|
78241
78363
|
/*!******************************************************************!*\
|
|
78242
|
-
!*** ./node_modules/vscode-languageserver-types/lib/
|
|
78364
|
+
!*** ./node_modules/vscode-languageserver-types/lib/umd/main.js ***!
|
|
78243
78365
|
\******************************************************************/
|
|
78244
|
-
/***/ ((
|
|
78245
|
-
|
|
78246
|
-
|
|
78247
|
-
|
|
78248
|
-
|
|
78249
|
-
|
|
78250
|
-
|
|
78251
|
-
|
|
78252
|
-
|
|
78253
|
-
|
|
78254
|
-
|
|
78255
|
-
|
|
78256
|
-
|
|
78257
|
-
|
|
78258
|
-
/*
|
|
78259
|
-
|
|
78260
|
-
|
|
78261
|
-
|
|
78262
|
-
|
|
78263
|
-
|
|
78264
|
-
|
|
78265
|
-
|
|
78266
|
-
|
|
78267
|
-
|
|
78268
|
-
|
|
78269
|
-
|
|
78270
|
-
|
|
78271
|
-
|
|
78272
|
-
|
|
78273
|
-
|
|
78274
|
-
|
|
78275
|
-
|
|
78276
|
-
|
|
78277
|
-
|
|
78278
|
-
|
|
78279
|
-
|
|
78280
|
-
|
|
78281
|
-
|
|
78282
|
-
|
|
78283
|
-
|
|
78284
|
-
|
|
78285
|
-
|
|
78286
|
-
|
|
78287
|
-
|
|
78288
|
-
|
|
78289
|
-
|
|
78290
|
-
|
|
78291
|
-
|
|
78292
|
-
|
|
78293
|
-
|
|
78294
|
-
|
|
78295
|
-
|
|
78296
|
-
|
|
78297
|
-
/* harmony export */ MarkupKind: () => (/* binding */ MarkupKind),
|
|
78298
|
-
/* harmony export */ OptionalVersionedTextDocumentIdentifier: () => (/* binding */ OptionalVersionedTextDocumentIdentifier),
|
|
78299
|
-
/* harmony export */ ParameterInformation: () => (/* binding */ ParameterInformation),
|
|
78300
|
-
/* harmony export */ Position: () => (/* binding */ Position),
|
|
78301
|
-
/* harmony export */ Range: () => (/* binding */ Range),
|
|
78302
|
-
/* harmony export */ RenameFile: () => (/* binding */ RenameFile),
|
|
78303
|
-
/* harmony export */ SelectionRange: () => (/* binding */ SelectionRange),
|
|
78304
|
-
/* harmony export */ SemanticTokenModifiers: () => (/* binding */ SemanticTokenModifiers),
|
|
78305
|
-
/* harmony export */ SemanticTokenTypes: () => (/* binding */ SemanticTokenTypes),
|
|
78306
|
-
/* harmony export */ SemanticTokens: () => (/* binding */ SemanticTokens),
|
|
78307
|
-
/* harmony export */ SignatureInformation: () => (/* binding */ SignatureInformation),
|
|
78308
|
-
/* harmony export */ SymbolInformation: () => (/* binding */ SymbolInformation),
|
|
78309
|
-
/* harmony export */ SymbolKind: () => (/* binding */ SymbolKind),
|
|
78310
|
-
/* harmony export */ SymbolTag: () => (/* binding */ SymbolTag),
|
|
78311
|
-
/* harmony export */ TextDocument: () => (/* binding */ TextDocument),
|
|
78312
|
-
/* harmony export */ TextDocumentEdit: () => (/* binding */ TextDocumentEdit),
|
|
78313
|
-
/* harmony export */ TextDocumentIdentifier: () => (/* binding */ TextDocumentIdentifier),
|
|
78314
|
-
/* harmony export */ TextDocumentItem: () => (/* binding */ TextDocumentItem),
|
|
78315
|
-
/* harmony export */ TextEdit: () => (/* binding */ TextEdit),
|
|
78316
|
-
/* harmony export */ URI: () => (/* binding */ URI),
|
|
78317
|
-
/* harmony export */ VersionedTextDocumentIdentifier: () => (/* binding */ VersionedTextDocumentIdentifier),
|
|
78318
|
-
/* harmony export */ WorkspaceChange: () => (/* binding */ WorkspaceChange),
|
|
78319
|
-
/* harmony export */ WorkspaceEdit: () => (/* binding */ WorkspaceEdit),
|
|
78320
|
-
/* harmony export */ WorkspaceFolder: () => (/* binding */ WorkspaceFolder),
|
|
78321
|
-
/* harmony export */ WorkspaceSymbol: () => (/* binding */ WorkspaceSymbol),
|
|
78322
|
-
/* harmony export */ integer: () => (/* binding */ integer),
|
|
78323
|
-
/* harmony export */ uinteger: () => (/* binding */ uinteger)
|
|
78324
|
-
/* harmony export */ });
|
|
78325
|
-
/* --------------------------------------------------------------------------------------------
|
|
78326
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
78327
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
78328
|
-
* ------------------------------------------------------------------------------------------ */
|
|
78329
|
-
|
|
78330
|
-
var DocumentUri;
|
|
78331
|
-
(function (DocumentUri) {
|
|
78332
|
-
function is(value) {
|
|
78333
|
-
return typeof value === 'string';
|
|
78334
|
-
}
|
|
78335
|
-
DocumentUri.is = is;
|
|
78336
|
-
})(DocumentUri || (DocumentUri = {}));
|
|
78337
|
-
var URI;
|
|
78338
|
-
(function (URI) {
|
|
78339
|
-
function is(value) {
|
|
78340
|
-
return typeof value === 'string';
|
|
78341
|
-
}
|
|
78342
|
-
URI.is = is;
|
|
78343
|
-
})(URI || (URI = {}));
|
|
78344
|
-
var integer;
|
|
78345
|
-
(function (integer) {
|
|
78346
|
-
integer.MIN_VALUE = -2147483648;
|
|
78347
|
-
integer.MAX_VALUE = 2147483647;
|
|
78348
|
-
function is(value) {
|
|
78349
|
-
return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;
|
|
78350
|
-
}
|
|
78351
|
-
integer.is = is;
|
|
78352
|
-
})(integer || (integer = {}));
|
|
78353
|
-
var uinteger;
|
|
78354
|
-
(function (uinteger) {
|
|
78355
|
-
uinteger.MIN_VALUE = 0;
|
|
78356
|
-
uinteger.MAX_VALUE = 2147483647;
|
|
78357
|
-
function is(value) {
|
|
78358
|
-
return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;
|
|
78359
|
-
}
|
|
78360
|
-
uinteger.is = is;
|
|
78361
|
-
})(uinteger || (uinteger = {}));
|
|
78362
|
-
/**
|
|
78363
|
-
* The Position namespace provides helper functions to work with
|
|
78364
|
-
* {@link Position} literals.
|
|
78365
|
-
*/
|
|
78366
|
-
var Position;
|
|
78367
|
-
(function (Position) {
|
|
78366
|
+
/***/ ((module, exports, __webpack_require__) => {
|
|
78367
|
+
|
|
78368
|
+
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (factory) {
|
|
78369
|
+
if ( true && typeof module.exports === "object") {
|
|
78370
|
+
var v = factory(__webpack_require__("./node_modules/vscode-languageserver-types/lib/umd sync recursive"), exports);
|
|
78371
|
+
if (v !== undefined) module.exports = v;
|
|
78372
|
+
}
|
|
78373
|
+
else if (true) {
|
|
78374
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
78375
|
+
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
78376
|
+
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
78377
|
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
78378
|
+
}
|
|
78379
|
+
})(function (require, exports) {
|
|
78380
|
+
/* --------------------------------------------------------------------------------------------
|
|
78381
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
78382
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
78383
|
+
* ------------------------------------------------------------------------------------------ */
|
|
78384
|
+
'use strict';
|
|
78385
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78386
|
+
exports.TextDocument = exports.EOL = exports.WorkspaceFolder = exports.InlineCompletionContext = exports.SelectedCompletionInfo = exports.InlineCompletionTriggerKind = exports.InlineCompletionList = exports.InlineCompletionItem = exports.StringValue = exports.InlayHint = exports.InlayHintLabelPart = exports.InlayHintKind = exports.InlineValueContext = exports.InlineValueEvaluatableExpression = exports.InlineValueVariableLookup = exports.InlineValueText = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = exports.SelectionRange = exports.DocumentLink = exports.FormattingOptions = exports.CodeLens = exports.CodeAction = exports.CodeActionContext = exports.CodeActionTriggerKind = exports.CodeActionKind = exports.DocumentSymbol = exports.WorkspaceSymbol = exports.SymbolInformation = exports.SymbolTag = exports.SymbolKind = exports.DocumentHighlight = exports.DocumentHighlightKind = exports.SignatureInformation = exports.ParameterInformation = exports.Hover = exports.MarkedString = exports.CompletionList = exports.CompletionItem = exports.CompletionItemLabelDetails = exports.InsertTextMode = exports.InsertReplaceEdit = exports.CompletionItemTag = exports.InsertTextFormat = exports.CompletionItemKind = exports.MarkupContent = exports.MarkupKind = exports.TextDocumentItem = exports.OptionalVersionedTextDocumentIdentifier = exports.VersionedTextDocumentIdentifier = exports.TextDocumentIdentifier = exports.WorkspaceChange = exports.WorkspaceEdit = exports.DeleteFile = exports.RenameFile = exports.CreateFile = exports.TextDocumentEdit = exports.AnnotatedTextEdit = exports.ChangeAnnotationIdentifier = exports.ChangeAnnotation = exports.TextEdit = exports.Command = exports.Diagnostic = exports.CodeDescription = exports.DiagnosticTag = exports.DiagnosticSeverity = exports.DiagnosticRelatedInformation = exports.FoldingRange = exports.FoldingRangeKind = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.LocationLink = exports.Location = exports.Range = exports.Position = exports.uinteger = exports.integer = exports.URI = exports.DocumentUri = void 0;
|
|
78387
|
+
var DocumentUri;
|
|
78388
|
+
(function (DocumentUri) {
|
|
78389
|
+
function is(value) {
|
|
78390
|
+
return typeof value === 'string';
|
|
78391
|
+
}
|
|
78392
|
+
DocumentUri.is = is;
|
|
78393
|
+
})(DocumentUri || (exports.DocumentUri = DocumentUri = {}));
|
|
78394
|
+
var URI;
|
|
78395
|
+
(function (URI) {
|
|
78396
|
+
function is(value) {
|
|
78397
|
+
return typeof value === 'string';
|
|
78398
|
+
}
|
|
78399
|
+
URI.is = is;
|
|
78400
|
+
})(URI || (exports.URI = URI = {}));
|
|
78401
|
+
var integer;
|
|
78402
|
+
(function (integer) {
|
|
78403
|
+
integer.MIN_VALUE = -2147483648;
|
|
78404
|
+
integer.MAX_VALUE = 2147483647;
|
|
78405
|
+
function is(value) {
|
|
78406
|
+
return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;
|
|
78407
|
+
}
|
|
78408
|
+
integer.is = is;
|
|
78409
|
+
})(integer || (exports.integer = integer = {}));
|
|
78410
|
+
var uinteger;
|
|
78411
|
+
(function (uinteger) {
|
|
78412
|
+
uinteger.MIN_VALUE = 0;
|
|
78413
|
+
uinteger.MAX_VALUE = 2147483647;
|
|
78414
|
+
function is(value) {
|
|
78415
|
+
return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;
|
|
78416
|
+
}
|
|
78417
|
+
uinteger.is = is;
|
|
78418
|
+
})(uinteger || (exports.uinteger = uinteger = {}));
|
|
78368
78419
|
/**
|
|
78369
|
-
*
|
|
78370
|
-
* @
|
|
78371
|
-
* @param character The position's character.
|
|
78420
|
+
* The Position namespace provides helper functions to work with
|
|
78421
|
+
* {@link Position} literals.
|
|
78372
78422
|
*/
|
|
78373
|
-
|
|
78374
|
-
|
|
78375
|
-
|
|
78423
|
+
var Position;
|
|
78424
|
+
(function (Position) {
|
|
78425
|
+
/**
|
|
78426
|
+
* Creates a new Position literal from the given line and character.
|
|
78427
|
+
* @param line The position's line.
|
|
78428
|
+
* @param character The position's character.
|
|
78429
|
+
*/
|
|
78430
|
+
function create(line, character) {
|
|
78431
|
+
if (line === Number.MAX_VALUE) {
|
|
78432
|
+
line = uinteger.MAX_VALUE;
|
|
78433
|
+
}
|
|
78434
|
+
if (character === Number.MAX_VALUE) {
|
|
78435
|
+
character = uinteger.MAX_VALUE;
|
|
78436
|
+
}
|
|
78437
|
+
return { line: line, character: character };
|
|
78376
78438
|
}
|
|
78377
|
-
|
|
78378
|
-
|
|
78439
|
+
Position.create = create;
|
|
78440
|
+
/**
|
|
78441
|
+
* Checks whether the given literal conforms to the {@link Position} interface.
|
|
78442
|
+
*/
|
|
78443
|
+
function is(value) {
|
|
78444
|
+
var candidate = value;
|
|
78445
|
+
return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
|
|
78379
78446
|
}
|
|
78380
|
-
|
|
78381
|
-
}
|
|
78382
|
-
Position.create = create;
|
|
78447
|
+
Position.is = is;
|
|
78448
|
+
})(Position || (exports.Position = Position = {}));
|
|
78383
78449
|
/**
|
|
78384
|
-
*
|
|
78450
|
+
* The Range namespace provides helper functions to work with
|
|
78451
|
+
* {@link Range} literals.
|
|
78385
78452
|
*/
|
|
78386
|
-
|
|
78387
|
-
|
|
78388
|
-
|
|
78389
|
-
|
|
78390
|
-
|
|
78391
|
-
}
|
|
78392
|
-
|
|
78393
|
-
|
|
78394
|
-
|
|
78395
|
-
|
|
78396
|
-
|
|
78397
|
-
|
|
78398
|
-
function create(one, two, three, four) {
|
|
78399
|
-
if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
|
|
78400
|
-
return { start: Position.create(one, two), end: Position.create(three, four) };
|
|
78401
|
-
}
|
|
78402
|
-
else if (Position.is(one) && Position.is(two)) {
|
|
78403
|
-
return { start: one, end: two };
|
|
78453
|
+
var Range;
|
|
78454
|
+
(function (Range) {
|
|
78455
|
+
function create(one, two, three, four) {
|
|
78456
|
+
if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {
|
|
78457
|
+
return { start: Position.create(one, two), end: Position.create(three, four) };
|
|
78458
|
+
}
|
|
78459
|
+
else if (Position.is(one) && Position.is(two)) {
|
|
78460
|
+
return { start: one, end: two };
|
|
78461
|
+
}
|
|
78462
|
+
else {
|
|
78463
|
+
throw new Error("Range#create called with invalid arguments[".concat(one, ", ").concat(two, ", ").concat(three, ", ").concat(four, "]"));
|
|
78464
|
+
}
|
|
78404
78465
|
}
|
|
78405
|
-
|
|
78406
|
-
|
|
78466
|
+
Range.create = create;
|
|
78467
|
+
/**
|
|
78468
|
+
* Checks whether the given literal conforms to the {@link Range} interface.
|
|
78469
|
+
*/
|
|
78470
|
+
function is(value) {
|
|
78471
|
+
var candidate = value;
|
|
78472
|
+
return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
|
|
78407
78473
|
}
|
|
78408
|
-
|
|
78409
|
-
Range.
|
|
78474
|
+
Range.is = is;
|
|
78475
|
+
})(Range || (exports.Range = Range = {}));
|
|
78410
78476
|
/**
|
|
78411
|
-
*
|
|
78477
|
+
* The Location namespace provides helper functions to work with
|
|
78478
|
+
* {@link Location} literals.
|
|
78412
78479
|
*/
|
|
78413
|
-
|
|
78414
|
-
|
|
78415
|
-
|
|
78416
|
-
|
|
78417
|
-
|
|
78418
|
-
|
|
78419
|
-
|
|
78420
|
-
|
|
78421
|
-
|
|
78422
|
-
|
|
78423
|
-
|
|
78424
|
-
|
|
78480
|
+
var Location;
|
|
78481
|
+
(function (Location) {
|
|
78482
|
+
/**
|
|
78483
|
+
* Creates a Location literal.
|
|
78484
|
+
* @param uri The location's uri.
|
|
78485
|
+
* @param range The location's range.
|
|
78486
|
+
*/
|
|
78487
|
+
function create(uri, range) {
|
|
78488
|
+
return { uri: uri, range: range };
|
|
78489
|
+
}
|
|
78490
|
+
Location.create = create;
|
|
78491
|
+
/**
|
|
78492
|
+
* Checks whether the given literal conforms to the {@link Location} interface.
|
|
78493
|
+
*/
|
|
78494
|
+
function is(value) {
|
|
78495
|
+
var candidate = value;
|
|
78496
|
+
return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
|
|
78497
|
+
}
|
|
78498
|
+
Location.is = is;
|
|
78499
|
+
})(Location || (exports.Location = Location = {}));
|
|
78425
78500
|
/**
|
|
78426
|
-
*
|
|
78427
|
-
* @
|
|
78428
|
-
* @param range The location's range.
|
|
78501
|
+
* The LocationLink namespace provides helper functions to work with
|
|
78502
|
+
* {@link LocationLink} literals.
|
|
78429
78503
|
*/
|
|
78430
|
-
|
|
78431
|
-
|
|
78432
|
-
|
|
78433
|
-
|
|
78504
|
+
var LocationLink;
|
|
78505
|
+
(function (LocationLink) {
|
|
78506
|
+
/**
|
|
78507
|
+
* Creates a LocationLink literal.
|
|
78508
|
+
* @param targetUri The definition's uri.
|
|
78509
|
+
* @param targetRange The full range of the definition.
|
|
78510
|
+
* @param targetSelectionRange The span of the symbol definition at the target.
|
|
78511
|
+
* @param originSelectionRange The span of the symbol being defined in the originating source file.
|
|
78512
|
+
*/
|
|
78513
|
+
function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
|
|
78514
|
+
return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
|
|
78515
|
+
}
|
|
78516
|
+
LocationLink.create = create;
|
|
78517
|
+
/**
|
|
78518
|
+
* Checks whether the given literal conforms to the {@link LocationLink} interface.
|
|
78519
|
+
*/
|
|
78520
|
+
function is(value) {
|
|
78521
|
+
var candidate = value;
|
|
78522
|
+
return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
|
|
78523
|
+
&& Range.is(candidate.targetSelectionRange)
|
|
78524
|
+
&& (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
|
|
78525
|
+
}
|
|
78526
|
+
LocationLink.is = is;
|
|
78527
|
+
})(LocationLink || (exports.LocationLink = LocationLink = {}));
|
|
78434
78528
|
/**
|
|
78435
|
-
*
|
|
78529
|
+
* The Color namespace provides helper functions to work with
|
|
78530
|
+
* {@link Color} literals.
|
|
78436
78531
|
*/
|
|
78437
|
-
|
|
78438
|
-
|
|
78439
|
-
|
|
78440
|
-
|
|
78441
|
-
|
|
78442
|
-
|
|
78443
|
-
|
|
78444
|
-
|
|
78445
|
-
|
|
78446
|
-
|
|
78447
|
-
|
|
78448
|
-
|
|
78532
|
+
var Color;
|
|
78533
|
+
(function (Color) {
|
|
78534
|
+
/**
|
|
78535
|
+
* Creates a new Color literal.
|
|
78536
|
+
*/
|
|
78537
|
+
function create(red, green, blue, alpha) {
|
|
78538
|
+
return {
|
|
78539
|
+
red: red,
|
|
78540
|
+
green: green,
|
|
78541
|
+
blue: blue,
|
|
78542
|
+
alpha: alpha,
|
|
78543
|
+
};
|
|
78544
|
+
}
|
|
78545
|
+
Color.create = create;
|
|
78546
|
+
/**
|
|
78547
|
+
* Checks whether the given literal conforms to the {@link Color} interface.
|
|
78548
|
+
*/
|
|
78549
|
+
function is(value) {
|
|
78550
|
+
var candidate = value;
|
|
78551
|
+
return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1)
|
|
78552
|
+
&& Is.numberRange(candidate.green, 0, 1)
|
|
78553
|
+
&& Is.numberRange(candidate.blue, 0, 1)
|
|
78554
|
+
&& Is.numberRange(candidate.alpha, 0, 1);
|
|
78555
|
+
}
|
|
78556
|
+
Color.is = is;
|
|
78557
|
+
})(Color || (exports.Color = Color = {}));
|
|
78449
78558
|
/**
|
|
78450
|
-
*
|
|
78451
|
-
* @
|
|
78452
|
-
* @param targetRange The full range of the definition.
|
|
78453
|
-
* @param targetSelectionRange The span of the symbol definition at the target.
|
|
78454
|
-
* @param originSelectionRange The span of the symbol being defined in the originating source file.
|
|
78559
|
+
* The ColorInformation namespace provides helper functions to work with
|
|
78560
|
+
* {@link ColorInformation} literals.
|
|
78455
78561
|
*/
|
|
78456
|
-
|
|
78457
|
-
|
|
78458
|
-
|
|
78459
|
-
|
|
78562
|
+
var ColorInformation;
|
|
78563
|
+
(function (ColorInformation) {
|
|
78564
|
+
/**
|
|
78565
|
+
* Creates a new ColorInformation literal.
|
|
78566
|
+
*/
|
|
78567
|
+
function create(range, color) {
|
|
78568
|
+
return {
|
|
78569
|
+
range: range,
|
|
78570
|
+
color: color,
|
|
78571
|
+
};
|
|
78572
|
+
}
|
|
78573
|
+
ColorInformation.create = create;
|
|
78574
|
+
/**
|
|
78575
|
+
* Checks whether the given literal conforms to the {@link ColorInformation} interface.
|
|
78576
|
+
*/
|
|
78577
|
+
function is(value) {
|
|
78578
|
+
var candidate = value;
|
|
78579
|
+
return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);
|
|
78580
|
+
}
|
|
78581
|
+
ColorInformation.is = is;
|
|
78582
|
+
})(ColorInformation || (exports.ColorInformation = ColorInformation = {}));
|
|
78460
78583
|
/**
|
|
78461
|
-
*
|
|
78584
|
+
* The Color namespace provides helper functions to work with
|
|
78585
|
+
* {@link ColorPresentation} literals.
|
|
78462
78586
|
*/
|
|
78463
|
-
|
|
78464
|
-
|
|
78465
|
-
|
|
78466
|
-
|
|
78467
|
-
|
|
78468
|
-
|
|
78469
|
-
|
|
78470
|
-
|
|
78471
|
-
|
|
78472
|
-
|
|
78473
|
-
|
|
78474
|
-
|
|
78475
|
-
|
|
78476
|
-
|
|
78587
|
+
var ColorPresentation;
|
|
78588
|
+
(function (ColorPresentation) {
|
|
78589
|
+
/**
|
|
78590
|
+
* Creates a new ColorInformation literal.
|
|
78591
|
+
*/
|
|
78592
|
+
function create(label, textEdit, additionalTextEdits) {
|
|
78593
|
+
return {
|
|
78594
|
+
label: label,
|
|
78595
|
+
textEdit: textEdit,
|
|
78596
|
+
additionalTextEdits: additionalTextEdits,
|
|
78597
|
+
};
|
|
78598
|
+
}
|
|
78599
|
+
ColorPresentation.create = create;
|
|
78600
|
+
/**
|
|
78601
|
+
* Checks whether the given literal conforms to the {@link ColorInformation} interface.
|
|
78602
|
+
*/
|
|
78603
|
+
function is(value) {
|
|
78604
|
+
var candidate = value;
|
|
78605
|
+
return Is.objectLiteral(candidate) && Is.string(candidate.label)
|
|
78606
|
+
&& (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
|
|
78607
|
+
&& (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
|
|
78608
|
+
}
|
|
78609
|
+
ColorPresentation.is = is;
|
|
78610
|
+
})(ColorPresentation || (exports.ColorPresentation = ColorPresentation = {}));
|
|
78477
78611
|
/**
|
|
78478
|
-
*
|
|
78612
|
+
* A set of predefined range kinds.
|
|
78479
78613
|
*/
|
|
78480
|
-
|
|
78481
|
-
|
|
78482
|
-
|
|
78483
|
-
|
|
78484
|
-
|
|
78485
|
-
|
|
78486
|
-
|
|
78487
|
-
|
|
78488
|
-
|
|
78614
|
+
var FoldingRangeKind;
|
|
78615
|
+
(function (FoldingRangeKind) {
|
|
78616
|
+
/**
|
|
78617
|
+
* Folding range for a comment
|
|
78618
|
+
*/
|
|
78619
|
+
FoldingRangeKind.Comment = 'comment';
|
|
78620
|
+
/**
|
|
78621
|
+
* Folding range for an import or include
|
|
78622
|
+
*/
|
|
78623
|
+
FoldingRangeKind.Imports = 'imports';
|
|
78624
|
+
/**
|
|
78625
|
+
* Folding range for a region (e.g. `#region`)
|
|
78626
|
+
*/
|
|
78627
|
+
FoldingRangeKind.Region = 'region';
|
|
78628
|
+
})(FoldingRangeKind || (exports.FoldingRangeKind = FoldingRangeKind = {}));
|
|
78489
78629
|
/**
|
|
78490
|
-
*
|
|
78630
|
+
* The folding range namespace provides helper functions to work with
|
|
78631
|
+
* {@link FoldingRange} literals.
|
|
78491
78632
|
*/
|
|
78492
|
-
|
|
78493
|
-
|
|
78494
|
-
|
|
78495
|
-
|
|
78496
|
-
|
|
78497
|
-
|
|
78498
|
-
|
|
78499
|
-
|
|
78500
|
-
|
|
78501
|
-
|
|
78502
|
-
|
|
78503
|
-
|
|
78504
|
-
|
|
78505
|
-
|
|
78506
|
-
|
|
78633
|
+
var FoldingRange;
|
|
78634
|
+
(function (FoldingRange) {
|
|
78635
|
+
/**
|
|
78636
|
+
* Creates a new FoldingRange literal.
|
|
78637
|
+
*/
|
|
78638
|
+
function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {
|
|
78639
|
+
var result = {
|
|
78640
|
+
startLine: startLine,
|
|
78641
|
+
endLine: endLine
|
|
78642
|
+
};
|
|
78643
|
+
if (Is.defined(startCharacter)) {
|
|
78644
|
+
result.startCharacter = startCharacter;
|
|
78645
|
+
}
|
|
78646
|
+
if (Is.defined(endCharacter)) {
|
|
78647
|
+
result.endCharacter = endCharacter;
|
|
78648
|
+
}
|
|
78649
|
+
if (Is.defined(kind)) {
|
|
78650
|
+
result.kind = kind;
|
|
78651
|
+
}
|
|
78652
|
+
if (Is.defined(collapsedText)) {
|
|
78653
|
+
result.collapsedText = collapsedText;
|
|
78654
|
+
}
|
|
78655
|
+
return result;
|
|
78656
|
+
}
|
|
78657
|
+
FoldingRange.create = create;
|
|
78658
|
+
/**
|
|
78659
|
+
* Checks whether the given literal conforms to the {@link FoldingRange} interface.
|
|
78660
|
+
*/
|
|
78661
|
+
function is(value) {
|
|
78662
|
+
var candidate = value;
|
|
78663
|
+
return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)
|
|
78664
|
+
&& (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))
|
|
78665
|
+
&& (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))
|
|
78666
|
+
&& (Is.undefined(candidate.kind) || Is.string(candidate.kind));
|
|
78667
|
+
}
|
|
78668
|
+
FoldingRange.is = is;
|
|
78669
|
+
})(FoldingRange || (exports.FoldingRange = FoldingRange = {}));
|
|
78507
78670
|
/**
|
|
78508
|
-
*
|
|
78671
|
+
* The DiagnosticRelatedInformation namespace provides helper functions to work with
|
|
78672
|
+
* {@link DiagnosticRelatedInformation} literals.
|
|
78509
78673
|
*/
|
|
78510
|
-
|
|
78511
|
-
|
|
78512
|
-
|
|
78513
|
-
|
|
78514
|
-
|
|
78515
|
-
|
|
78516
|
-
|
|
78674
|
+
var DiagnosticRelatedInformation;
|
|
78675
|
+
(function (DiagnosticRelatedInformation) {
|
|
78676
|
+
/**
|
|
78677
|
+
* Creates a new DiagnosticRelatedInformation literal.
|
|
78678
|
+
*/
|
|
78679
|
+
function create(location, message) {
|
|
78680
|
+
return {
|
|
78681
|
+
location: location,
|
|
78682
|
+
message: message
|
|
78683
|
+
};
|
|
78684
|
+
}
|
|
78685
|
+
DiagnosticRelatedInformation.create = create;
|
|
78686
|
+
/**
|
|
78687
|
+
* Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface.
|
|
78688
|
+
*/
|
|
78689
|
+
function is(value) {
|
|
78690
|
+
var candidate = value;
|
|
78691
|
+
return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
|
|
78692
|
+
}
|
|
78693
|
+
DiagnosticRelatedInformation.is = is;
|
|
78694
|
+
})(DiagnosticRelatedInformation || (exports.DiagnosticRelatedInformation = DiagnosticRelatedInformation = {}));
|
|
78517
78695
|
/**
|
|
78518
|
-
*
|
|
78696
|
+
* The diagnostic's severity.
|
|
78519
78697
|
*/
|
|
78520
|
-
|
|
78521
|
-
|
|
78522
|
-
|
|
78523
|
-
|
|
78524
|
-
|
|
78525
|
-
|
|
78526
|
-
/**
|
|
78527
|
-
|
|
78528
|
-
|
|
78529
|
-
|
|
78530
|
-
|
|
78531
|
-
|
|
78698
|
+
var DiagnosticSeverity;
|
|
78699
|
+
(function (DiagnosticSeverity) {
|
|
78700
|
+
/**
|
|
78701
|
+
* Reports an error.
|
|
78702
|
+
*/
|
|
78703
|
+
DiagnosticSeverity.Error = 1;
|
|
78704
|
+
/**
|
|
78705
|
+
* Reports a warning.
|
|
78706
|
+
*/
|
|
78707
|
+
DiagnosticSeverity.Warning = 2;
|
|
78708
|
+
/**
|
|
78709
|
+
* Reports an information.
|
|
78710
|
+
*/
|
|
78711
|
+
DiagnosticSeverity.Information = 3;
|
|
78712
|
+
/**
|
|
78713
|
+
* Reports a hint.
|
|
78714
|
+
*/
|
|
78715
|
+
DiagnosticSeverity.Hint = 4;
|
|
78716
|
+
})(DiagnosticSeverity || (exports.DiagnosticSeverity = DiagnosticSeverity = {}));
|
|
78532
78717
|
/**
|
|
78533
|
-
*
|
|
78718
|
+
* The diagnostic tags.
|
|
78719
|
+
*
|
|
78720
|
+
* @since 3.15.0
|
|
78534
78721
|
*/
|
|
78535
|
-
|
|
78536
|
-
|
|
78537
|
-
|
|
78538
|
-
|
|
78539
|
-
|
|
78540
|
-
|
|
78541
|
-
|
|
78542
|
-
|
|
78722
|
+
var DiagnosticTag;
|
|
78723
|
+
(function (DiagnosticTag) {
|
|
78724
|
+
/**
|
|
78725
|
+
* Unused or unnecessary code.
|
|
78726
|
+
*
|
|
78727
|
+
* Clients are allowed to render diagnostics with this tag faded out instead of having
|
|
78728
|
+
* an error squiggle.
|
|
78729
|
+
*/
|
|
78730
|
+
DiagnosticTag.Unnecessary = 1;
|
|
78731
|
+
/**
|
|
78732
|
+
* Deprecated or obsolete code.
|
|
78733
|
+
*
|
|
78734
|
+
* Clients are allowed to rendered diagnostics with this tag strike through.
|
|
78735
|
+
*/
|
|
78736
|
+
DiagnosticTag.Deprecated = 2;
|
|
78737
|
+
})(DiagnosticTag || (exports.DiagnosticTag = DiagnosticTag = {}));
|
|
78543
78738
|
/**
|
|
78544
|
-
*
|
|
78739
|
+
* The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.
|
|
78740
|
+
*
|
|
78741
|
+
* @since 3.16.0
|
|
78545
78742
|
*/
|
|
78546
|
-
|
|
78547
|
-
|
|
78548
|
-
|
|
78549
|
-
|
|
78550
|
-
|
|
78551
|
-
|
|
78552
|
-
|
|
78553
|
-
})(
|
|
78554
|
-
/**
|
|
78555
|
-
* A set of predefined range kinds.
|
|
78556
|
-
*/
|
|
78557
|
-
var FoldingRangeKind;
|
|
78558
|
-
(function (FoldingRangeKind) {
|
|
78743
|
+
var CodeDescription;
|
|
78744
|
+
(function (CodeDescription) {
|
|
78745
|
+
function is(value) {
|
|
78746
|
+
var candidate = value;
|
|
78747
|
+
return Is.objectLiteral(candidate) && Is.string(candidate.href);
|
|
78748
|
+
}
|
|
78749
|
+
CodeDescription.is = is;
|
|
78750
|
+
})(CodeDescription || (exports.CodeDescription = CodeDescription = {}));
|
|
78559
78751
|
/**
|
|
78560
|
-
*
|
|
78752
|
+
* The Diagnostic namespace provides helper functions to work with
|
|
78753
|
+
* {@link Diagnostic} literals.
|
|
78561
78754
|
*/
|
|
78562
|
-
|
|
78755
|
+
var Diagnostic;
|
|
78756
|
+
(function (Diagnostic) {
|
|
78757
|
+
/**
|
|
78758
|
+
* Creates a new Diagnostic literal.
|
|
78759
|
+
*/
|
|
78760
|
+
function create(range, message, severity, code, source, relatedInformation) {
|
|
78761
|
+
var result = { range: range, message: message };
|
|
78762
|
+
if (Is.defined(severity)) {
|
|
78763
|
+
result.severity = severity;
|
|
78764
|
+
}
|
|
78765
|
+
if (Is.defined(code)) {
|
|
78766
|
+
result.code = code;
|
|
78767
|
+
}
|
|
78768
|
+
if (Is.defined(source)) {
|
|
78769
|
+
result.source = source;
|
|
78770
|
+
}
|
|
78771
|
+
if (Is.defined(relatedInformation)) {
|
|
78772
|
+
result.relatedInformation = relatedInformation;
|
|
78773
|
+
}
|
|
78774
|
+
return result;
|
|
78775
|
+
}
|
|
78776
|
+
Diagnostic.create = create;
|
|
78777
|
+
/**
|
|
78778
|
+
* Checks whether the given literal conforms to the {@link Diagnostic} interface.
|
|
78779
|
+
*/
|
|
78780
|
+
function is(value) {
|
|
78781
|
+
var _a;
|
|
78782
|
+
var candidate = value;
|
|
78783
|
+
return Is.defined(candidate)
|
|
78784
|
+
&& Range.is(candidate.range)
|
|
78785
|
+
&& Is.string(candidate.message)
|
|
78786
|
+
&& (Is.number(candidate.severity) || Is.undefined(candidate.severity))
|
|
78787
|
+
&& (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
|
|
78788
|
+
&& (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))
|
|
78789
|
+
&& (Is.string(candidate.source) || Is.undefined(candidate.source))
|
|
78790
|
+
&& (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
|
|
78791
|
+
}
|
|
78792
|
+
Diagnostic.is = is;
|
|
78793
|
+
})(Diagnostic || (exports.Diagnostic = Diagnostic = {}));
|
|
78563
78794
|
/**
|
|
78564
|
-
*
|
|
78795
|
+
* The Command namespace provides helper functions to work with
|
|
78796
|
+
* {@link Command} literals.
|
|
78565
78797
|
*/
|
|
78566
|
-
|
|
78798
|
+
var Command;
|
|
78799
|
+
(function (Command) {
|
|
78800
|
+
/**
|
|
78801
|
+
* Creates a new Command literal.
|
|
78802
|
+
*/
|
|
78803
|
+
function create(title, command) {
|
|
78804
|
+
var args = [];
|
|
78805
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
78806
|
+
args[_i - 2] = arguments[_i];
|
|
78807
|
+
}
|
|
78808
|
+
var result = { title: title, command: command };
|
|
78809
|
+
if (Is.defined(args) && args.length > 0) {
|
|
78810
|
+
result.arguments = args;
|
|
78811
|
+
}
|
|
78812
|
+
return result;
|
|
78813
|
+
}
|
|
78814
|
+
Command.create = create;
|
|
78815
|
+
/**
|
|
78816
|
+
* Checks whether the given literal conforms to the {@link Command} interface.
|
|
78817
|
+
*/
|
|
78818
|
+
function is(value) {
|
|
78819
|
+
var candidate = value;
|
|
78820
|
+
return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
|
|
78821
|
+
}
|
|
78822
|
+
Command.is = is;
|
|
78823
|
+
})(Command || (exports.Command = Command = {}));
|
|
78567
78824
|
/**
|
|
78568
|
-
*
|
|
78825
|
+
* The TextEdit namespace provides helper function to create replace,
|
|
78826
|
+
* insert and delete edits more easily.
|
|
78569
78827
|
*/
|
|
78570
|
-
|
|
78571
|
-
|
|
78572
|
-
/**
|
|
78573
|
-
|
|
78574
|
-
|
|
78575
|
-
|
|
78576
|
-
|
|
78577
|
-
|
|
78828
|
+
var TextEdit;
|
|
78829
|
+
(function (TextEdit) {
|
|
78830
|
+
/**
|
|
78831
|
+
* Creates a replace text edit.
|
|
78832
|
+
* @param range The range of text to be replaced.
|
|
78833
|
+
* @param newText The new text.
|
|
78834
|
+
*/
|
|
78835
|
+
function replace(range, newText) {
|
|
78836
|
+
return { range: range, newText: newText };
|
|
78837
|
+
}
|
|
78838
|
+
TextEdit.replace = replace;
|
|
78839
|
+
/**
|
|
78840
|
+
* Creates an insert text edit.
|
|
78841
|
+
* @param position The position to insert the text at.
|
|
78842
|
+
* @param newText The text to be inserted.
|
|
78843
|
+
*/
|
|
78844
|
+
function insert(position, newText) {
|
|
78845
|
+
return { range: { start: position, end: position }, newText: newText };
|
|
78846
|
+
}
|
|
78847
|
+
TextEdit.insert = insert;
|
|
78848
|
+
/**
|
|
78849
|
+
* Creates a delete text edit.
|
|
78850
|
+
* @param range The range of text to be deleted.
|
|
78851
|
+
*/
|
|
78852
|
+
function del(range) {
|
|
78853
|
+
return { range: range, newText: '' };
|
|
78854
|
+
}
|
|
78855
|
+
TextEdit.del = del;
|
|
78856
|
+
function is(value) {
|
|
78857
|
+
var candidate = value;
|
|
78858
|
+
return Is.objectLiteral(candidate)
|
|
78859
|
+
&& Is.string(candidate.newText)
|
|
78860
|
+
&& Range.is(candidate.range);
|
|
78861
|
+
}
|
|
78862
|
+
TextEdit.is = is;
|
|
78863
|
+
})(TextEdit || (exports.TextEdit = TextEdit = {}));
|
|
78864
|
+
var ChangeAnnotation;
|
|
78865
|
+
(function (ChangeAnnotation) {
|
|
78866
|
+
function create(label, needsConfirmation, description) {
|
|
78867
|
+
var result = { label: label };
|
|
78868
|
+
if (needsConfirmation !== undefined) {
|
|
78869
|
+
result.needsConfirmation = needsConfirmation;
|
|
78870
|
+
}
|
|
78871
|
+
if (description !== undefined) {
|
|
78872
|
+
result.description = description;
|
|
78873
|
+
}
|
|
78874
|
+
return result;
|
|
78875
|
+
}
|
|
78876
|
+
ChangeAnnotation.create = create;
|
|
78877
|
+
function is(value) {
|
|
78878
|
+
var candidate = value;
|
|
78879
|
+
return Is.objectLiteral(candidate) && Is.string(candidate.label) &&
|
|
78880
|
+
(Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
|
|
78881
|
+
(Is.string(candidate.description) || candidate.description === undefined);
|
|
78882
|
+
}
|
|
78883
|
+
ChangeAnnotation.is = is;
|
|
78884
|
+
})(ChangeAnnotation || (exports.ChangeAnnotation = ChangeAnnotation = {}));
|
|
78885
|
+
var ChangeAnnotationIdentifier;
|
|
78886
|
+
(function (ChangeAnnotationIdentifier) {
|
|
78887
|
+
function is(value) {
|
|
78888
|
+
var candidate = value;
|
|
78889
|
+
return Is.string(candidate);
|
|
78890
|
+
}
|
|
78891
|
+
ChangeAnnotationIdentifier.is = is;
|
|
78892
|
+
})(ChangeAnnotationIdentifier || (exports.ChangeAnnotationIdentifier = ChangeAnnotationIdentifier = {}));
|
|
78893
|
+
var AnnotatedTextEdit;
|
|
78894
|
+
(function (AnnotatedTextEdit) {
|
|
78895
|
+
/**
|
|
78896
|
+
* Creates an annotated replace text edit.
|
|
78897
|
+
*
|
|
78898
|
+
* @param range The range of text to be replaced.
|
|
78899
|
+
* @param newText The new text.
|
|
78900
|
+
* @param annotation The annotation.
|
|
78901
|
+
*/
|
|
78902
|
+
function replace(range, newText, annotation) {
|
|
78903
|
+
return { range: range, newText: newText, annotationId: annotation };
|
|
78904
|
+
}
|
|
78905
|
+
AnnotatedTextEdit.replace = replace;
|
|
78906
|
+
/**
|
|
78907
|
+
* Creates an annotated insert text edit.
|
|
78908
|
+
*
|
|
78909
|
+
* @param position The position to insert the text at.
|
|
78910
|
+
* @param newText The text to be inserted.
|
|
78911
|
+
* @param annotation The annotation.
|
|
78912
|
+
*/
|
|
78913
|
+
function insert(position, newText, annotation) {
|
|
78914
|
+
return { range: { start: position, end: position }, newText: newText, annotationId: annotation };
|
|
78915
|
+
}
|
|
78916
|
+
AnnotatedTextEdit.insert = insert;
|
|
78917
|
+
/**
|
|
78918
|
+
* Creates an annotated delete text edit.
|
|
78919
|
+
*
|
|
78920
|
+
* @param range The range of text to be deleted.
|
|
78921
|
+
* @param annotation The annotation.
|
|
78922
|
+
*/
|
|
78923
|
+
function del(range, annotation) {
|
|
78924
|
+
return { range: range, newText: '', annotationId: annotation };
|
|
78925
|
+
}
|
|
78926
|
+
AnnotatedTextEdit.del = del;
|
|
78927
|
+
function is(value) {
|
|
78928
|
+
var candidate = value;
|
|
78929
|
+
return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78930
|
+
}
|
|
78931
|
+
AnnotatedTextEdit.is = is;
|
|
78932
|
+
})(AnnotatedTextEdit || (exports.AnnotatedTextEdit = AnnotatedTextEdit = {}));
|
|
78578
78933
|
/**
|
|
78579
|
-
*
|
|
78934
|
+
* The TextDocumentEdit namespace provides helper function to create
|
|
78935
|
+
* an edit that manipulates a text document.
|
|
78580
78936
|
*/
|
|
78581
|
-
|
|
78582
|
-
|
|
78583
|
-
|
|
78584
|
-
|
|
78585
|
-
|
|
78586
|
-
|
|
78587
|
-
|
|
78937
|
+
var TextDocumentEdit;
|
|
78938
|
+
(function (TextDocumentEdit) {
|
|
78939
|
+
/**
|
|
78940
|
+
* Creates a new `TextDocumentEdit`
|
|
78941
|
+
*/
|
|
78942
|
+
function create(textDocument, edits) {
|
|
78943
|
+
return { textDocument: textDocument, edits: edits };
|
|
78944
|
+
}
|
|
78945
|
+
TextDocumentEdit.create = create;
|
|
78946
|
+
function is(value) {
|
|
78947
|
+
var candidate = value;
|
|
78948
|
+
return Is.defined(candidate)
|
|
78949
|
+
&& OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)
|
|
78950
|
+
&& Array.isArray(candidate.edits);
|
|
78951
|
+
}
|
|
78952
|
+
TextDocumentEdit.is = is;
|
|
78953
|
+
})(TextDocumentEdit || (exports.TextDocumentEdit = TextDocumentEdit = {}));
|
|
78954
|
+
var CreateFile;
|
|
78955
|
+
(function (CreateFile) {
|
|
78956
|
+
function create(uri, options, annotation) {
|
|
78957
|
+
var result = {
|
|
78958
|
+
kind: 'create',
|
|
78959
|
+
uri: uri
|
|
78960
|
+
};
|
|
78961
|
+
if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
|
|
78962
|
+
result.options = options;
|
|
78963
|
+
}
|
|
78964
|
+
if (annotation !== undefined) {
|
|
78965
|
+
result.annotationId = annotation;
|
|
78966
|
+
}
|
|
78967
|
+
return result;
|
|
78968
|
+
}
|
|
78969
|
+
CreateFile.create = create;
|
|
78970
|
+
function is(value) {
|
|
78971
|
+
var candidate = value;
|
|
78972
|
+
return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
|
|
78973
|
+
((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78974
|
+
}
|
|
78975
|
+
CreateFile.is = is;
|
|
78976
|
+
})(CreateFile || (exports.CreateFile = CreateFile = {}));
|
|
78977
|
+
var RenameFile;
|
|
78978
|
+
(function (RenameFile) {
|
|
78979
|
+
function create(oldUri, newUri, options, annotation) {
|
|
78980
|
+
var result = {
|
|
78981
|
+
kind: 'rename',
|
|
78982
|
+
oldUri: oldUri,
|
|
78983
|
+
newUri: newUri
|
|
78984
|
+
};
|
|
78985
|
+
if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
|
|
78986
|
+
result.options = options;
|
|
78987
|
+
}
|
|
78988
|
+
if (annotation !== undefined) {
|
|
78989
|
+
result.annotationId = annotation;
|
|
78990
|
+
}
|
|
78991
|
+
return result;
|
|
78588
78992
|
}
|
|
78589
|
-
|
|
78590
|
-
|
|
78993
|
+
RenameFile.create = create;
|
|
78994
|
+
function is(value) {
|
|
78995
|
+
var candidate = value;
|
|
78996
|
+
return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
|
|
78997
|
+
((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78998
|
+
}
|
|
78999
|
+
RenameFile.is = is;
|
|
79000
|
+
})(RenameFile || (exports.RenameFile = RenameFile = {}));
|
|
79001
|
+
var DeleteFile;
|
|
79002
|
+
(function (DeleteFile) {
|
|
79003
|
+
function create(uri, options, annotation) {
|
|
79004
|
+
var result = {
|
|
79005
|
+
kind: 'delete',
|
|
79006
|
+
uri: uri
|
|
79007
|
+
};
|
|
79008
|
+
if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
|
|
79009
|
+
result.options = options;
|
|
79010
|
+
}
|
|
79011
|
+
if (annotation !== undefined) {
|
|
79012
|
+
result.annotationId = annotation;
|
|
79013
|
+
}
|
|
79014
|
+
return result;
|
|
78591
79015
|
}
|
|
78592
|
-
|
|
78593
|
-
|
|
79016
|
+
DeleteFile.create = create;
|
|
79017
|
+
function is(value) {
|
|
79018
|
+
var candidate = value;
|
|
79019
|
+
return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
|
|
79020
|
+
((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
79021
|
+
}
|
|
79022
|
+
DeleteFile.is = is;
|
|
79023
|
+
})(DeleteFile || (exports.DeleteFile = DeleteFile = {}));
|
|
79024
|
+
var WorkspaceEdit;
|
|
79025
|
+
(function (WorkspaceEdit) {
|
|
79026
|
+
function is(value) {
|
|
79027
|
+
var candidate = value;
|
|
79028
|
+
return candidate &&
|
|
79029
|
+
(candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
|
|
79030
|
+
(candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {
|
|
79031
|
+
if (Is.string(change.kind)) {
|
|
79032
|
+
return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
|
|
79033
|
+
}
|
|
79034
|
+
else {
|
|
79035
|
+
return TextDocumentEdit.is(change);
|
|
79036
|
+
}
|
|
79037
|
+
}));
|
|
78594
79038
|
}
|
|
78595
|
-
|
|
78596
|
-
|
|
79039
|
+
WorkspaceEdit.is = is;
|
|
79040
|
+
})(WorkspaceEdit || (exports.WorkspaceEdit = WorkspaceEdit = {}));
|
|
79041
|
+
var TextEditChangeImpl = /** @class */ (function () {
|
|
79042
|
+
function TextEditChangeImpl(edits, changeAnnotations) {
|
|
79043
|
+
this.edits = edits;
|
|
79044
|
+
this.changeAnnotations = changeAnnotations;
|
|
78597
79045
|
}
|
|
78598
|
-
|
|
78599
|
-
|
|
78600
|
-
|
|
79046
|
+
TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {
|
|
79047
|
+
var edit;
|
|
79048
|
+
var id;
|
|
79049
|
+
if (annotation === undefined) {
|
|
79050
|
+
edit = TextEdit.insert(position, newText);
|
|
79051
|
+
}
|
|
79052
|
+
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
79053
|
+
id = annotation;
|
|
79054
|
+
edit = AnnotatedTextEdit.insert(position, newText, annotation);
|
|
79055
|
+
}
|
|
79056
|
+
else {
|
|
79057
|
+
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79058
|
+
id = this.changeAnnotations.manage(annotation);
|
|
79059
|
+
edit = AnnotatedTextEdit.insert(position, newText, id);
|
|
79060
|
+
}
|
|
79061
|
+
this.edits.push(edit);
|
|
79062
|
+
if (id !== undefined) {
|
|
79063
|
+
return id;
|
|
79064
|
+
}
|
|
79065
|
+
};
|
|
79066
|
+
TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {
|
|
79067
|
+
var edit;
|
|
79068
|
+
var id;
|
|
79069
|
+
if (annotation === undefined) {
|
|
79070
|
+
edit = TextEdit.replace(range, newText);
|
|
79071
|
+
}
|
|
79072
|
+
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
79073
|
+
id = annotation;
|
|
79074
|
+
edit = AnnotatedTextEdit.replace(range, newText, annotation);
|
|
79075
|
+
}
|
|
79076
|
+
else {
|
|
79077
|
+
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79078
|
+
id = this.changeAnnotations.manage(annotation);
|
|
79079
|
+
edit = AnnotatedTextEdit.replace(range, newText, id);
|
|
79080
|
+
}
|
|
79081
|
+
this.edits.push(edit);
|
|
79082
|
+
if (id !== undefined) {
|
|
79083
|
+
return id;
|
|
79084
|
+
}
|
|
79085
|
+
};
|
|
79086
|
+
TextEditChangeImpl.prototype.delete = function (range, annotation) {
|
|
79087
|
+
var edit;
|
|
79088
|
+
var id;
|
|
79089
|
+
if (annotation === undefined) {
|
|
79090
|
+
edit = TextEdit.del(range);
|
|
79091
|
+
}
|
|
79092
|
+
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
79093
|
+
id = annotation;
|
|
79094
|
+
edit = AnnotatedTextEdit.del(range, annotation);
|
|
79095
|
+
}
|
|
79096
|
+
else {
|
|
79097
|
+
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79098
|
+
id = this.changeAnnotations.manage(annotation);
|
|
79099
|
+
edit = AnnotatedTextEdit.del(range, id);
|
|
79100
|
+
}
|
|
79101
|
+
this.edits.push(edit);
|
|
79102
|
+
if (id !== undefined) {
|
|
79103
|
+
return id;
|
|
79104
|
+
}
|
|
79105
|
+
};
|
|
79106
|
+
TextEditChangeImpl.prototype.add = function (edit) {
|
|
79107
|
+
this.edits.push(edit);
|
|
79108
|
+
};
|
|
79109
|
+
TextEditChangeImpl.prototype.all = function () {
|
|
79110
|
+
return this.edits;
|
|
79111
|
+
};
|
|
79112
|
+
TextEditChangeImpl.prototype.clear = function () {
|
|
79113
|
+
this.edits.splice(0, this.edits.length);
|
|
79114
|
+
};
|
|
79115
|
+
TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {
|
|
79116
|
+
if (value === undefined) {
|
|
79117
|
+
throw new Error("Text edit change is not configured to manage change annotations.");
|
|
79118
|
+
}
|
|
79119
|
+
};
|
|
79120
|
+
return TextEditChangeImpl;
|
|
79121
|
+
}());
|
|
78601
79122
|
/**
|
|
78602
|
-
*
|
|
79123
|
+
* A helper class
|
|
78603
79124
|
*/
|
|
78604
|
-
function
|
|
78605
|
-
|
|
78606
|
-
|
|
78607
|
-
|
|
78608
|
-
|
|
78609
|
-
|
|
78610
|
-
|
|
78611
|
-
|
|
78612
|
-
}
|
|
78613
|
-
|
|
78614
|
-
|
|
78615
|
-
|
|
78616
|
-
|
|
78617
|
-
|
|
78618
|
-
|
|
79125
|
+
var ChangeAnnotations = /** @class */ (function () {
|
|
79126
|
+
function ChangeAnnotations(annotations) {
|
|
79127
|
+
this._annotations = annotations === undefined ? Object.create(null) : annotations;
|
|
79128
|
+
this._counter = 0;
|
|
79129
|
+
this._size = 0;
|
|
79130
|
+
}
|
|
79131
|
+
ChangeAnnotations.prototype.all = function () {
|
|
79132
|
+
return this._annotations;
|
|
79133
|
+
};
|
|
79134
|
+
Object.defineProperty(ChangeAnnotations.prototype, "size", {
|
|
79135
|
+
get: function () {
|
|
79136
|
+
return this._size;
|
|
79137
|
+
},
|
|
79138
|
+
enumerable: false,
|
|
79139
|
+
configurable: true
|
|
79140
|
+
});
|
|
79141
|
+
ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
|
|
79142
|
+
var id;
|
|
79143
|
+
if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
|
|
79144
|
+
id = idOrAnnotation;
|
|
79145
|
+
}
|
|
79146
|
+
else {
|
|
79147
|
+
id = this.nextId();
|
|
79148
|
+
annotation = idOrAnnotation;
|
|
79149
|
+
}
|
|
79150
|
+
if (this._annotations[id] !== undefined) {
|
|
79151
|
+
throw new Error("Id ".concat(id, " is already in use."));
|
|
79152
|
+
}
|
|
79153
|
+
if (annotation === undefined) {
|
|
79154
|
+
throw new Error("No annotation provided for id ".concat(id));
|
|
79155
|
+
}
|
|
79156
|
+
this._annotations[id] = annotation;
|
|
79157
|
+
this._size++;
|
|
79158
|
+
return id;
|
|
79159
|
+
};
|
|
79160
|
+
ChangeAnnotations.prototype.nextId = function () {
|
|
79161
|
+
this._counter++;
|
|
79162
|
+
return this._counter.toString();
|
|
79163
|
+
};
|
|
79164
|
+
return ChangeAnnotations;
|
|
79165
|
+
}());
|
|
78619
79166
|
/**
|
|
78620
|
-
*
|
|
79167
|
+
* A workspace change helps constructing changes to a workspace.
|
|
78621
79168
|
*/
|
|
78622
|
-
function
|
|
78623
|
-
|
|
78624
|
-
|
|
78625
|
-
|
|
79169
|
+
var WorkspaceChange = /** @class */ (function () {
|
|
79170
|
+
function WorkspaceChange(workspaceEdit) {
|
|
79171
|
+
var _this = this;
|
|
79172
|
+
this._textEditChanges = Object.create(null);
|
|
79173
|
+
if (workspaceEdit !== undefined) {
|
|
79174
|
+
this._workspaceEdit = workspaceEdit;
|
|
79175
|
+
if (workspaceEdit.documentChanges) {
|
|
79176
|
+
this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
|
|
79177
|
+
workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
79178
|
+
workspaceEdit.documentChanges.forEach(function (change) {
|
|
79179
|
+
if (TextDocumentEdit.is(change)) {
|
|
79180
|
+
var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
|
|
79181
|
+
_this._textEditChanges[change.textDocument.uri] = textEditChange;
|
|
79182
|
+
}
|
|
79183
|
+
});
|
|
79184
|
+
}
|
|
79185
|
+
else if (workspaceEdit.changes) {
|
|
79186
|
+
Object.keys(workspaceEdit.changes).forEach(function (key) {
|
|
79187
|
+
var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
|
|
79188
|
+
_this._textEditChanges[key] = textEditChange;
|
|
79189
|
+
});
|
|
79190
|
+
}
|
|
79191
|
+
}
|
|
79192
|
+
else {
|
|
79193
|
+
this._workspaceEdit = {};
|
|
79194
|
+
}
|
|
79195
|
+
}
|
|
79196
|
+
Object.defineProperty(WorkspaceChange.prototype, "edit", {
|
|
79197
|
+
/**
|
|
79198
|
+
* Returns the underlying {@link WorkspaceEdit} literal
|
|
79199
|
+
* use to be returned from a workspace edit operation like rename.
|
|
79200
|
+
*/
|
|
79201
|
+
get: function () {
|
|
79202
|
+
this.initDocumentChanges();
|
|
79203
|
+
if (this._changeAnnotations !== undefined) {
|
|
79204
|
+
if (this._changeAnnotations.size === 0) {
|
|
79205
|
+
this._workspaceEdit.changeAnnotations = undefined;
|
|
79206
|
+
}
|
|
79207
|
+
else {
|
|
79208
|
+
this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
79209
|
+
}
|
|
79210
|
+
}
|
|
79211
|
+
return this._workspaceEdit;
|
|
79212
|
+
},
|
|
79213
|
+
enumerable: false,
|
|
79214
|
+
configurable: true
|
|
79215
|
+
});
|
|
79216
|
+
WorkspaceChange.prototype.getTextEditChange = function (key) {
|
|
79217
|
+
if (OptionalVersionedTextDocumentIdentifier.is(key)) {
|
|
79218
|
+
this.initDocumentChanges();
|
|
79219
|
+
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79220
|
+
throw new Error('Workspace edit is not configured for document changes.');
|
|
79221
|
+
}
|
|
79222
|
+
var textDocument = { uri: key.uri, version: key.version };
|
|
79223
|
+
var result = this._textEditChanges[textDocument.uri];
|
|
79224
|
+
if (!result) {
|
|
79225
|
+
var edits = [];
|
|
79226
|
+
var textDocumentEdit = {
|
|
79227
|
+
textDocument: textDocument,
|
|
79228
|
+
edits: edits
|
|
79229
|
+
};
|
|
79230
|
+
this._workspaceEdit.documentChanges.push(textDocumentEdit);
|
|
79231
|
+
result = new TextEditChangeImpl(edits, this._changeAnnotations);
|
|
79232
|
+
this._textEditChanges[textDocument.uri] = result;
|
|
79233
|
+
}
|
|
79234
|
+
return result;
|
|
79235
|
+
}
|
|
79236
|
+
else {
|
|
79237
|
+
this.initChanges();
|
|
79238
|
+
if (this._workspaceEdit.changes === undefined) {
|
|
79239
|
+
throw new Error('Workspace edit is not configured for normal text edit changes.');
|
|
79240
|
+
}
|
|
79241
|
+
var result = this._textEditChanges[key];
|
|
79242
|
+
if (!result) {
|
|
79243
|
+
var edits = [];
|
|
79244
|
+
this._workspaceEdit.changes[key] = edits;
|
|
79245
|
+
result = new TextEditChangeImpl(edits);
|
|
79246
|
+
this._textEditChanges[key] = result;
|
|
79247
|
+
}
|
|
79248
|
+
return result;
|
|
79249
|
+
}
|
|
78626
79250
|
};
|
|
78627
|
-
|
|
78628
|
-
|
|
79251
|
+
WorkspaceChange.prototype.initDocumentChanges = function () {
|
|
79252
|
+
if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
|
|
79253
|
+
this._changeAnnotations = new ChangeAnnotations();
|
|
79254
|
+
this._workspaceEdit.documentChanges = [];
|
|
79255
|
+
this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
79256
|
+
}
|
|
79257
|
+
};
|
|
79258
|
+
WorkspaceChange.prototype.initChanges = function () {
|
|
79259
|
+
if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
|
|
79260
|
+
this._workspaceEdit.changes = Object.create(null);
|
|
79261
|
+
}
|
|
79262
|
+
};
|
|
79263
|
+
WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {
|
|
79264
|
+
this.initDocumentChanges();
|
|
79265
|
+
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79266
|
+
throw new Error('Workspace edit is not configured for document changes.');
|
|
79267
|
+
}
|
|
79268
|
+
var annotation;
|
|
79269
|
+
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79270
|
+
annotation = optionsOrAnnotation;
|
|
79271
|
+
}
|
|
79272
|
+
else {
|
|
79273
|
+
options = optionsOrAnnotation;
|
|
79274
|
+
}
|
|
79275
|
+
var operation;
|
|
79276
|
+
var id;
|
|
79277
|
+
if (annotation === undefined) {
|
|
79278
|
+
operation = CreateFile.create(uri, options);
|
|
79279
|
+
}
|
|
79280
|
+
else {
|
|
79281
|
+
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79282
|
+
operation = CreateFile.create(uri, options, id);
|
|
79283
|
+
}
|
|
79284
|
+
this._workspaceEdit.documentChanges.push(operation);
|
|
79285
|
+
if (id !== undefined) {
|
|
79286
|
+
return id;
|
|
79287
|
+
}
|
|
79288
|
+
};
|
|
79289
|
+
WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {
|
|
79290
|
+
this.initDocumentChanges();
|
|
79291
|
+
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79292
|
+
throw new Error('Workspace edit is not configured for document changes.');
|
|
79293
|
+
}
|
|
79294
|
+
var annotation;
|
|
79295
|
+
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79296
|
+
annotation = optionsOrAnnotation;
|
|
79297
|
+
}
|
|
79298
|
+
else {
|
|
79299
|
+
options = optionsOrAnnotation;
|
|
79300
|
+
}
|
|
79301
|
+
var operation;
|
|
79302
|
+
var id;
|
|
79303
|
+
if (annotation === undefined) {
|
|
79304
|
+
operation = RenameFile.create(oldUri, newUri, options);
|
|
79305
|
+
}
|
|
79306
|
+
else {
|
|
79307
|
+
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79308
|
+
operation = RenameFile.create(oldUri, newUri, options, id);
|
|
79309
|
+
}
|
|
79310
|
+
this._workspaceEdit.documentChanges.push(operation);
|
|
79311
|
+
if (id !== undefined) {
|
|
79312
|
+
return id;
|
|
79313
|
+
}
|
|
79314
|
+
};
|
|
79315
|
+
WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {
|
|
79316
|
+
this.initDocumentChanges();
|
|
79317
|
+
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79318
|
+
throw new Error('Workspace edit is not configured for document changes.');
|
|
79319
|
+
}
|
|
79320
|
+
var annotation;
|
|
79321
|
+
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79322
|
+
annotation = optionsOrAnnotation;
|
|
79323
|
+
}
|
|
79324
|
+
else {
|
|
79325
|
+
options = optionsOrAnnotation;
|
|
79326
|
+
}
|
|
79327
|
+
var operation;
|
|
79328
|
+
var id;
|
|
79329
|
+
if (annotation === undefined) {
|
|
79330
|
+
operation = DeleteFile.create(uri, options);
|
|
79331
|
+
}
|
|
79332
|
+
else {
|
|
79333
|
+
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79334
|
+
operation = DeleteFile.create(uri, options, id);
|
|
79335
|
+
}
|
|
79336
|
+
this._workspaceEdit.documentChanges.push(operation);
|
|
79337
|
+
if (id !== undefined) {
|
|
79338
|
+
return id;
|
|
79339
|
+
}
|
|
79340
|
+
};
|
|
79341
|
+
return WorkspaceChange;
|
|
79342
|
+
}());
|
|
79343
|
+
exports.WorkspaceChange = WorkspaceChange;
|
|
78629
79344
|
/**
|
|
78630
|
-
*
|
|
79345
|
+
* The TextDocumentIdentifier namespace provides helper functions to work with
|
|
79346
|
+
* {@link TextDocumentIdentifier} literals.
|
|
78631
79347
|
*/
|
|
78632
|
-
|
|
78633
|
-
|
|
78634
|
-
|
|
78635
|
-
|
|
78636
|
-
|
|
78637
|
-
|
|
78638
|
-
|
|
78639
|
-
|
|
78640
|
-
|
|
78641
|
-
|
|
78642
|
-
|
|
79348
|
+
var TextDocumentIdentifier;
|
|
79349
|
+
(function (TextDocumentIdentifier) {
|
|
79350
|
+
/**
|
|
79351
|
+
* Creates a new TextDocumentIdentifier literal.
|
|
79352
|
+
* @param uri The document's uri.
|
|
79353
|
+
*/
|
|
79354
|
+
function create(uri) {
|
|
79355
|
+
return { uri: uri };
|
|
79356
|
+
}
|
|
79357
|
+
TextDocumentIdentifier.create = create;
|
|
79358
|
+
/**
|
|
79359
|
+
* Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.
|
|
79360
|
+
*/
|
|
79361
|
+
function is(value) {
|
|
79362
|
+
var candidate = value;
|
|
79363
|
+
return Is.defined(candidate) && Is.string(candidate.uri);
|
|
79364
|
+
}
|
|
79365
|
+
TextDocumentIdentifier.is = is;
|
|
79366
|
+
})(TextDocumentIdentifier || (exports.TextDocumentIdentifier = TextDocumentIdentifier = {}));
|
|
78643
79367
|
/**
|
|
78644
|
-
*
|
|
79368
|
+
* The VersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
79369
|
+
* {@link VersionedTextDocumentIdentifier} literals.
|
|
78645
79370
|
*/
|
|
78646
|
-
|
|
79371
|
+
var VersionedTextDocumentIdentifier;
|
|
79372
|
+
(function (VersionedTextDocumentIdentifier) {
|
|
79373
|
+
/**
|
|
79374
|
+
* Creates a new VersionedTextDocumentIdentifier literal.
|
|
79375
|
+
* @param uri The document's uri.
|
|
79376
|
+
* @param version The document's version.
|
|
79377
|
+
*/
|
|
79378
|
+
function create(uri, version) {
|
|
79379
|
+
return { uri: uri, version: version };
|
|
79380
|
+
}
|
|
79381
|
+
VersionedTextDocumentIdentifier.create = create;
|
|
79382
|
+
/**
|
|
79383
|
+
* Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface.
|
|
79384
|
+
*/
|
|
79385
|
+
function is(value) {
|
|
79386
|
+
var candidate = value;
|
|
79387
|
+
return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
|
|
79388
|
+
}
|
|
79389
|
+
VersionedTextDocumentIdentifier.is = is;
|
|
79390
|
+
})(VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = VersionedTextDocumentIdentifier = {}));
|
|
78647
79391
|
/**
|
|
78648
|
-
*
|
|
79392
|
+
* The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
79393
|
+
* {@link OptionalVersionedTextDocumentIdentifier} literals.
|
|
78649
79394
|
*/
|
|
78650
|
-
|
|
79395
|
+
var OptionalVersionedTextDocumentIdentifier;
|
|
79396
|
+
(function (OptionalVersionedTextDocumentIdentifier) {
|
|
79397
|
+
/**
|
|
79398
|
+
* Creates a new OptionalVersionedTextDocumentIdentifier literal.
|
|
79399
|
+
* @param uri The document's uri.
|
|
79400
|
+
* @param version The document's version.
|
|
79401
|
+
*/
|
|
79402
|
+
function create(uri, version) {
|
|
79403
|
+
return { uri: uri, version: version };
|
|
79404
|
+
}
|
|
79405
|
+
OptionalVersionedTextDocumentIdentifier.create = create;
|
|
79406
|
+
/**
|
|
79407
|
+
* Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.
|
|
79408
|
+
*/
|
|
79409
|
+
function is(value) {
|
|
79410
|
+
var candidate = value;
|
|
79411
|
+
return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
|
|
79412
|
+
}
|
|
79413
|
+
OptionalVersionedTextDocumentIdentifier.is = is;
|
|
79414
|
+
})(OptionalVersionedTextDocumentIdentifier || (exports.OptionalVersionedTextDocumentIdentifier = OptionalVersionedTextDocumentIdentifier = {}));
|
|
78651
79415
|
/**
|
|
78652
|
-
*
|
|
79416
|
+
* The TextDocumentItem namespace provides helper functions to work with
|
|
79417
|
+
* {@link TextDocumentItem} literals.
|
|
78653
79418
|
*/
|
|
78654
|
-
|
|
79419
|
+
var TextDocumentItem;
|
|
79420
|
+
(function (TextDocumentItem) {
|
|
79421
|
+
/**
|
|
79422
|
+
* Creates a new TextDocumentItem literal.
|
|
79423
|
+
* @param uri The document's uri.
|
|
79424
|
+
* @param languageId The document's language identifier.
|
|
79425
|
+
* @param version The document's version number.
|
|
79426
|
+
* @param text The document's text.
|
|
79427
|
+
*/
|
|
79428
|
+
function create(uri, languageId, version, text) {
|
|
79429
|
+
return { uri: uri, languageId: languageId, version: version, text: text };
|
|
79430
|
+
}
|
|
79431
|
+
TextDocumentItem.create = create;
|
|
79432
|
+
/**
|
|
79433
|
+
* Checks whether the given literal conforms to the {@link TextDocumentItem} interface.
|
|
79434
|
+
*/
|
|
79435
|
+
function is(value) {
|
|
79436
|
+
var candidate = value;
|
|
79437
|
+
return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
|
|
79438
|
+
}
|
|
79439
|
+
TextDocumentItem.is = is;
|
|
79440
|
+
})(TextDocumentItem || (exports.TextDocumentItem = TextDocumentItem = {}));
|
|
78655
79441
|
/**
|
|
78656
|
-
*
|
|
79442
|
+
* Describes the content type that a client supports in various
|
|
79443
|
+
* result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
|
|
79444
|
+
*
|
|
79445
|
+
* Please note that `MarkupKinds` must not start with a `$`. This kinds
|
|
79446
|
+
* are reserved for internal usage.
|
|
78657
79447
|
*/
|
|
78658
|
-
|
|
78659
|
-
|
|
78660
|
-
/**
|
|
78661
|
-
|
|
78662
|
-
|
|
78663
|
-
|
|
78664
|
-
|
|
78665
|
-
|
|
78666
|
-
|
|
79448
|
+
var MarkupKind;
|
|
79449
|
+
(function (MarkupKind) {
|
|
79450
|
+
/**
|
|
79451
|
+
* Plain text is supported as a content format
|
|
79452
|
+
*/
|
|
79453
|
+
MarkupKind.PlainText = 'plaintext';
|
|
79454
|
+
/**
|
|
79455
|
+
* Markdown is supported as a content format
|
|
79456
|
+
*/
|
|
79457
|
+
MarkupKind.Markdown = 'markdown';
|
|
79458
|
+
/**
|
|
79459
|
+
* Checks whether the given value is a value of the {@link MarkupKind} type.
|
|
79460
|
+
*/
|
|
79461
|
+
function is(value) {
|
|
79462
|
+
var candidate = value;
|
|
79463
|
+
return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
|
|
79464
|
+
}
|
|
79465
|
+
MarkupKind.is = is;
|
|
79466
|
+
})(MarkupKind || (exports.MarkupKind = MarkupKind = {}));
|
|
79467
|
+
var MarkupContent;
|
|
79468
|
+
(function (MarkupContent) {
|
|
79469
|
+
/**
|
|
79470
|
+
* Checks whether the given value conforms to the {@link MarkupContent} interface.
|
|
79471
|
+
*/
|
|
79472
|
+
function is(value) {
|
|
79473
|
+
var candidate = value;
|
|
79474
|
+
return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
|
|
79475
|
+
}
|
|
79476
|
+
MarkupContent.is = is;
|
|
79477
|
+
})(MarkupContent || (exports.MarkupContent = MarkupContent = {}));
|
|
78667
79478
|
/**
|
|
78668
|
-
*
|
|
78669
|
-
|
|
78670
|
-
|
|
78671
|
-
|
|
79479
|
+
* The kind of a completion entry.
|
|
79480
|
+
*/
|
|
79481
|
+
var CompletionItemKind;
|
|
79482
|
+
(function (CompletionItemKind) {
|
|
79483
|
+
CompletionItemKind.Text = 1;
|
|
79484
|
+
CompletionItemKind.Method = 2;
|
|
79485
|
+
CompletionItemKind.Function = 3;
|
|
79486
|
+
CompletionItemKind.Constructor = 4;
|
|
79487
|
+
CompletionItemKind.Field = 5;
|
|
79488
|
+
CompletionItemKind.Variable = 6;
|
|
79489
|
+
CompletionItemKind.Class = 7;
|
|
79490
|
+
CompletionItemKind.Interface = 8;
|
|
79491
|
+
CompletionItemKind.Module = 9;
|
|
79492
|
+
CompletionItemKind.Property = 10;
|
|
79493
|
+
CompletionItemKind.Unit = 11;
|
|
79494
|
+
CompletionItemKind.Value = 12;
|
|
79495
|
+
CompletionItemKind.Enum = 13;
|
|
79496
|
+
CompletionItemKind.Keyword = 14;
|
|
79497
|
+
CompletionItemKind.Snippet = 15;
|
|
79498
|
+
CompletionItemKind.Color = 16;
|
|
79499
|
+
CompletionItemKind.File = 17;
|
|
79500
|
+
CompletionItemKind.Reference = 18;
|
|
79501
|
+
CompletionItemKind.Folder = 19;
|
|
79502
|
+
CompletionItemKind.EnumMember = 20;
|
|
79503
|
+
CompletionItemKind.Constant = 21;
|
|
79504
|
+
CompletionItemKind.Struct = 22;
|
|
79505
|
+
CompletionItemKind.Event = 23;
|
|
79506
|
+
CompletionItemKind.Operator = 24;
|
|
79507
|
+
CompletionItemKind.TypeParameter = 25;
|
|
79508
|
+
})(CompletionItemKind || (exports.CompletionItemKind = CompletionItemKind = {}));
|
|
79509
|
+
/**
|
|
79510
|
+
* Defines whether the insert text in a completion item should be interpreted as
|
|
79511
|
+
* plain text or a snippet.
|
|
78672
79512
|
*/
|
|
78673
|
-
|
|
79513
|
+
var InsertTextFormat;
|
|
79514
|
+
(function (InsertTextFormat) {
|
|
79515
|
+
/**
|
|
79516
|
+
* The primary text to be inserted is treated as a plain string.
|
|
79517
|
+
*/
|
|
79518
|
+
InsertTextFormat.PlainText = 1;
|
|
79519
|
+
/**
|
|
79520
|
+
* The primary text to be inserted is treated as a snippet.
|
|
79521
|
+
*
|
|
79522
|
+
* A snippet can define tab stops and placeholders with `$1`, `$2`
|
|
79523
|
+
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
|
|
79524
|
+
* the end of the snippet. Placeholders with equal identifiers are linked,
|
|
79525
|
+
* that is typing in one will update others too.
|
|
79526
|
+
*
|
|
79527
|
+
* See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
|
|
79528
|
+
*/
|
|
79529
|
+
InsertTextFormat.Snippet = 2;
|
|
79530
|
+
})(InsertTextFormat || (exports.InsertTextFormat = InsertTextFormat = {}));
|
|
78674
79531
|
/**
|
|
78675
|
-
*
|
|
79532
|
+
* Completion item tags are extra annotations that tweak the rendering of a completion
|
|
79533
|
+
* item.
|
|
78676
79534
|
*
|
|
78677
|
-
*
|
|
79535
|
+
* @since 3.15.0
|
|
78678
79536
|
*/
|
|
78679
|
-
|
|
78680
|
-
|
|
78681
|
-
/**
|
|
78682
|
-
|
|
78683
|
-
|
|
78684
|
-
|
|
78685
|
-
|
|
78686
|
-
var CodeDescription;
|
|
78687
|
-
(function (CodeDescription) {
|
|
78688
|
-
function is(value) {
|
|
78689
|
-
var candidate = value;
|
|
78690
|
-
return Is.objectLiteral(candidate) && Is.string(candidate.href);
|
|
78691
|
-
}
|
|
78692
|
-
CodeDescription.is = is;
|
|
78693
|
-
})(CodeDescription || (CodeDescription = {}));
|
|
78694
|
-
/**
|
|
78695
|
-
* The Diagnostic namespace provides helper functions to work with
|
|
78696
|
-
* {@link Diagnostic} literals.
|
|
78697
|
-
*/
|
|
78698
|
-
var Diagnostic;
|
|
78699
|
-
(function (Diagnostic) {
|
|
79537
|
+
var CompletionItemTag;
|
|
79538
|
+
(function (CompletionItemTag) {
|
|
79539
|
+
/**
|
|
79540
|
+
* Render a completion as obsolete, usually using a strike-out.
|
|
79541
|
+
*/
|
|
79542
|
+
CompletionItemTag.Deprecated = 1;
|
|
79543
|
+
})(CompletionItemTag || (exports.CompletionItemTag = CompletionItemTag = {}));
|
|
78700
79544
|
/**
|
|
78701
|
-
*
|
|
79545
|
+
* The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
|
|
79546
|
+
*
|
|
79547
|
+
* @since 3.16.0
|
|
78702
79548
|
*/
|
|
78703
|
-
|
|
78704
|
-
|
|
78705
|
-
|
|
78706
|
-
|
|
78707
|
-
|
|
78708
|
-
|
|
78709
|
-
|
|
78710
|
-
}
|
|
78711
|
-
if (Is.defined(source)) {
|
|
78712
|
-
result.source = source;
|
|
79549
|
+
var InsertReplaceEdit;
|
|
79550
|
+
(function (InsertReplaceEdit) {
|
|
79551
|
+
/**
|
|
79552
|
+
* Creates a new insert / replace edit
|
|
79553
|
+
*/
|
|
79554
|
+
function create(newText, insert, replace) {
|
|
79555
|
+
return { newText: newText, insert: insert, replace: replace };
|
|
78713
79556
|
}
|
|
78714
|
-
|
|
78715
|
-
|
|
79557
|
+
InsertReplaceEdit.create = create;
|
|
79558
|
+
/**
|
|
79559
|
+
* Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface.
|
|
79560
|
+
*/
|
|
79561
|
+
function is(value) {
|
|
79562
|
+
var candidate = value;
|
|
79563
|
+
return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
|
|
78716
79564
|
}
|
|
78717
|
-
|
|
78718
|
-
}
|
|
78719
|
-
Diagnostic.create = create;
|
|
79565
|
+
InsertReplaceEdit.is = is;
|
|
79566
|
+
})(InsertReplaceEdit || (exports.InsertReplaceEdit = InsertReplaceEdit = {}));
|
|
78720
79567
|
/**
|
|
78721
|
-
*
|
|
79568
|
+
* How whitespace and indentation is handled during completion
|
|
79569
|
+
* item insertion.
|
|
79570
|
+
*
|
|
79571
|
+
* @since 3.16.0
|
|
78722
79572
|
*/
|
|
78723
|
-
|
|
78724
|
-
|
|
78725
|
-
|
|
78726
|
-
|
|
78727
|
-
|
|
78728
|
-
|
|
78729
|
-
|
|
78730
|
-
|
|
78731
|
-
|
|
78732
|
-
|
|
78733
|
-
|
|
78734
|
-
|
|
78735
|
-
|
|
78736
|
-
|
|
78737
|
-
|
|
78738
|
-
|
|
78739
|
-
|
|
78740
|
-
|
|
78741
|
-
|
|
78742
|
-
|
|
79573
|
+
var InsertTextMode;
|
|
79574
|
+
(function (InsertTextMode) {
|
|
79575
|
+
/**
|
|
79576
|
+
* The insertion or replace strings is taken as it is. If the
|
|
79577
|
+
* value is multi line the lines below the cursor will be
|
|
79578
|
+
* inserted using the indentation defined in the string value.
|
|
79579
|
+
* The client will not apply any kind of adjustments to the
|
|
79580
|
+
* string.
|
|
79581
|
+
*/
|
|
79582
|
+
InsertTextMode.asIs = 1;
|
|
79583
|
+
/**
|
|
79584
|
+
* The editor adjusts leading whitespace of new lines so that
|
|
79585
|
+
* they match the indentation up to the cursor of the line for
|
|
79586
|
+
* which the item is accepted.
|
|
79587
|
+
*
|
|
79588
|
+
* Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
|
|
79589
|
+
* multi line completion item is indented using 2 tabs and all
|
|
79590
|
+
* following lines inserted will be indented using 2 tabs as well.
|
|
79591
|
+
*/
|
|
79592
|
+
InsertTextMode.adjustIndentation = 2;
|
|
79593
|
+
})(InsertTextMode || (exports.InsertTextMode = InsertTextMode = {}));
|
|
79594
|
+
var CompletionItemLabelDetails;
|
|
79595
|
+
(function (CompletionItemLabelDetails) {
|
|
79596
|
+
function is(value) {
|
|
79597
|
+
var candidate = value;
|
|
79598
|
+
return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&
|
|
79599
|
+
(Is.string(candidate.description) || candidate.description === undefined);
|
|
79600
|
+
}
|
|
79601
|
+
CompletionItemLabelDetails.is = is;
|
|
79602
|
+
})(CompletionItemLabelDetails || (exports.CompletionItemLabelDetails = CompletionItemLabelDetails = {}));
|
|
78743
79603
|
/**
|
|
78744
|
-
*
|
|
79604
|
+
* The CompletionItem namespace provides functions to deal with
|
|
79605
|
+
* completion items.
|
|
78745
79606
|
*/
|
|
78746
|
-
|
|
78747
|
-
|
|
78748
|
-
|
|
78749
|
-
|
|
78750
|
-
|
|
78751
|
-
|
|
78752
|
-
|
|
78753
|
-
|
|
79607
|
+
var CompletionItem;
|
|
79608
|
+
(function (CompletionItem) {
|
|
79609
|
+
/**
|
|
79610
|
+
* Create a completion item and seed it with a label.
|
|
79611
|
+
* @param label The completion item's label
|
|
79612
|
+
*/
|
|
79613
|
+
function create(label) {
|
|
79614
|
+
return { label: label };
|
|
78754
79615
|
}
|
|
78755
|
-
|
|
78756
|
-
}
|
|
78757
|
-
Command.create = create;
|
|
79616
|
+
CompletionItem.create = create;
|
|
79617
|
+
})(CompletionItem || (exports.CompletionItem = CompletionItem = {}));
|
|
78758
79618
|
/**
|
|
78759
|
-
*
|
|
79619
|
+
* The CompletionList namespace provides functions to deal with
|
|
79620
|
+
* completion lists.
|
|
78760
79621
|
*/
|
|
78761
|
-
|
|
78762
|
-
|
|
78763
|
-
|
|
78764
|
-
|
|
78765
|
-
|
|
78766
|
-
|
|
78767
|
-
|
|
78768
|
-
|
|
78769
|
-
|
|
78770
|
-
|
|
78771
|
-
|
|
78772
|
-
|
|
78773
|
-
|
|
78774
|
-
|
|
78775
|
-
|
|
78776
|
-
|
|
78777
|
-
|
|
78778
|
-
|
|
78779
|
-
|
|
78780
|
-
|
|
78781
|
-
|
|
79622
|
+
var CompletionList;
|
|
79623
|
+
(function (CompletionList) {
|
|
79624
|
+
/**
|
|
79625
|
+
* Creates a new completion list.
|
|
79626
|
+
*
|
|
79627
|
+
* @param items The completion items.
|
|
79628
|
+
* @param isIncomplete The list is not complete.
|
|
79629
|
+
*/
|
|
79630
|
+
function create(items, isIncomplete) {
|
|
79631
|
+
return { items: items ? items : [], isIncomplete: !!isIncomplete };
|
|
79632
|
+
}
|
|
79633
|
+
CompletionList.create = create;
|
|
79634
|
+
})(CompletionList || (exports.CompletionList = CompletionList = {}));
|
|
79635
|
+
var MarkedString;
|
|
79636
|
+
(function (MarkedString) {
|
|
79637
|
+
/**
|
|
79638
|
+
* Creates a marked string from plain text.
|
|
79639
|
+
*
|
|
79640
|
+
* @param plainText The plain text.
|
|
79641
|
+
*/
|
|
79642
|
+
function fromPlainText(plainText) {
|
|
79643
|
+
return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
|
|
79644
|
+
}
|
|
79645
|
+
MarkedString.fromPlainText = fromPlainText;
|
|
79646
|
+
/**
|
|
79647
|
+
* Checks whether the given value conforms to the {@link MarkedString} type.
|
|
79648
|
+
*/
|
|
79649
|
+
function is(value) {
|
|
79650
|
+
var candidate = value;
|
|
79651
|
+
return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
|
|
79652
|
+
}
|
|
79653
|
+
MarkedString.is = is;
|
|
79654
|
+
})(MarkedString || (exports.MarkedString = MarkedString = {}));
|
|
79655
|
+
var Hover;
|
|
79656
|
+
(function (Hover) {
|
|
79657
|
+
/**
|
|
79658
|
+
* Checks whether the given value conforms to the {@link Hover} interface.
|
|
79659
|
+
*/
|
|
79660
|
+
function is(value) {
|
|
79661
|
+
var candidate = value;
|
|
79662
|
+
return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
|
|
79663
|
+
MarkedString.is(candidate.contents) ||
|
|
79664
|
+
Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
|
|
79665
|
+
}
|
|
79666
|
+
Hover.is = is;
|
|
79667
|
+
})(Hover || (exports.Hover = Hover = {}));
|
|
78782
79668
|
/**
|
|
78783
|
-
*
|
|
78784
|
-
* @
|
|
78785
|
-
* @param newText The text to be inserted.
|
|
79669
|
+
* The ParameterInformation namespace provides helper functions to work with
|
|
79670
|
+
* {@link ParameterInformation} literals.
|
|
78786
79671
|
*/
|
|
78787
|
-
|
|
78788
|
-
|
|
78789
|
-
|
|
78790
|
-
|
|
79672
|
+
var ParameterInformation;
|
|
79673
|
+
(function (ParameterInformation) {
|
|
79674
|
+
/**
|
|
79675
|
+
* Creates a new parameter information literal.
|
|
79676
|
+
*
|
|
79677
|
+
* @param label A label string.
|
|
79678
|
+
* @param documentation A doc string.
|
|
79679
|
+
*/
|
|
79680
|
+
function create(label, documentation) {
|
|
79681
|
+
return documentation ? { label: label, documentation: documentation } : { label: label };
|
|
79682
|
+
}
|
|
79683
|
+
ParameterInformation.create = create;
|
|
79684
|
+
})(ParameterInformation || (exports.ParameterInformation = ParameterInformation = {}));
|
|
78791
79685
|
/**
|
|
78792
|
-
*
|
|
78793
|
-
* @
|
|
79686
|
+
* The SignatureInformation namespace provides helper functions to work with
|
|
79687
|
+
* {@link SignatureInformation} literals.
|
|
78794
79688
|
*/
|
|
78795
|
-
|
|
78796
|
-
|
|
78797
|
-
|
|
78798
|
-
|
|
78799
|
-
|
|
78800
|
-
|
|
78801
|
-
|
|
78802
|
-
|
|
78803
|
-
|
|
78804
|
-
|
|
78805
|
-
|
|
78806
|
-
|
|
78807
|
-
|
|
78808
|
-
|
|
78809
|
-
|
|
78810
|
-
|
|
78811
|
-
|
|
78812
|
-
result
|
|
78813
|
-
}
|
|
78814
|
-
if (description !== undefined) {
|
|
78815
|
-
result.description = description;
|
|
79689
|
+
var SignatureInformation;
|
|
79690
|
+
(function (SignatureInformation) {
|
|
79691
|
+
function create(label, documentation) {
|
|
79692
|
+
var parameters = [];
|
|
79693
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
79694
|
+
parameters[_i - 2] = arguments[_i];
|
|
79695
|
+
}
|
|
79696
|
+
var result = { label: label };
|
|
79697
|
+
if (Is.defined(documentation)) {
|
|
79698
|
+
result.documentation = documentation;
|
|
79699
|
+
}
|
|
79700
|
+
if (Is.defined(parameters)) {
|
|
79701
|
+
result.parameters = parameters;
|
|
79702
|
+
}
|
|
79703
|
+
else {
|
|
79704
|
+
result.parameters = [];
|
|
79705
|
+
}
|
|
79706
|
+
return result;
|
|
78816
79707
|
}
|
|
78817
|
-
|
|
78818
|
-
}
|
|
78819
|
-
ChangeAnnotation.create = create;
|
|
78820
|
-
function is(value) {
|
|
78821
|
-
var candidate = value;
|
|
78822
|
-
return Is.objectLiteral(candidate) && Is.string(candidate.label) &&
|
|
78823
|
-
(Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
|
|
78824
|
-
(Is.string(candidate.description) || candidate.description === undefined);
|
|
78825
|
-
}
|
|
78826
|
-
ChangeAnnotation.is = is;
|
|
78827
|
-
})(ChangeAnnotation || (ChangeAnnotation = {}));
|
|
78828
|
-
var ChangeAnnotationIdentifier;
|
|
78829
|
-
(function (ChangeAnnotationIdentifier) {
|
|
78830
|
-
function is(value) {
|
|
78831
|
-
var candidate = value;
|
|
78832
|
-
return Is.string(candidate);
|
|
78833
|
-
}
|
|
78834
|
-
ChangeAnnotationIdentifier.is = is;
|
|
78835
|
-
})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));
|
|
78836
|
-
var AnnotatedTextEdit;
|
|
78837
|
-
(function (AnnotatedTextEdit) {
|
|
79708
|
+
SignatureInformation.create = create;
|
|
79709
|
+
})(SignatureInformation || (exports.SignatureInformation = SignatureInformation = {}));
|
|
78838
79710
|
/**
|
|
78839
|
-
*
|
|
78840
|
-
*
|
|
78841
|
-
* @param range The range of text to be replaced.
|
|
78842
|
-
* @param newText The new text.
|
|
78843
|
-
* @param annotation The annotation.
|
|
79711
|
+
* A document highlight kind.
|
|
78844
79712
|
*/
|
|
78845
|
-
|
|
78846
|
-
|
|
78847
|
-
|
|
78848
|
-
|
|
79713
|
+
var DocumentHighlightKind;
|
|
79714
|
+
(function (DocumentHighlightKind) {
|
|
79715
|
+
/**
|
|
79716
|
+
* A textual occurrence.
|
|
79717
|
+
*/
|
|
79718
|
+
DocumentHighlightKind.Text = 1;
|
|
79719
|
+
/**
|
|
79720
|
+
* Read-access of a symbol, like reading a variable.
|
|
79721
|
+
*/
|
|
79722
|
+
DocumentHighlightKind.Read = 2;
|
|
79723
|
+
/**
|
|
79724
|
+
* Write-access of a symbol, like writing to a variable.
|
|
79725
|
+
*/
|
|
79726
|
+
DocumentHighlightKind.Write = 3;
|
|
79727
|
+
})(DocumentHighlightKind || (exports.DocumentHighlightKind = DocumentHighlightKind = {}));
|
|
78849
79728
|
/**
|
|
78850
|
-
*
|
|
78851
|
-
*
|
|
78852
|
-
* @param position The position to insert the text at.
|
|
78853
|
-
* @param newText The text to be inserted.
|
|
78854
|
-
* @param annotation The annotation.
|
|
79729
|
+
* DocumentHighlight namespace to provide helper functions to work with
|
|
79730
|
+
* {@link DocumentHighlight} literals.
|
|
78855
79731
|
*/
|
|
78856
|
-
|
|
78857
|
-
|
|
78858
|
-
|
|
78859
|
-
|
|
79732
|
+
var DocumentHighlight;
|
|
79733
|
+
(function (DocumentHighlight) {
|
|
79734
|
+
/**
|
|
79735
|
+
* Create a DocumentHighlight object.
|
|
79736
|
+
* @param range The range the highlight applies to.
|
|
79737
|
+
* @param kind The highlight kind
|
|
79738
|
+
*/
|
|
79739
|
+
function create(range, kind) {
|
|
79740
|
+
var result = { range: range };
|
|
79741
|
+
if (Is.number(kind)) {
|
|
79742
|
+
result.kind = kind;
|
|
79743
|
+
}
|
|
79744
|
+
return result;
|
|
79745
|
+
}
|
|
79746
|
+
DocumentHighlight.create = create;
|
|
79747
|
+
})(DocumentHighlight || (exports.DocumentHighlight = DocumentHighlight = {}));
|
|
78860
79748
|
/**
|
|
78861
|
-
*
|
|
78862
|
-
*
|
|
78863
|
-
* @param range The range of text to be deleted.
|
|
78864
|
-
* @param annotation The annotation.
|
|
79749
|
+
* A symbol kind.
|
|
78865
79750
|
*/
|
|
78866
|
-
|
|
78867
|
-
|
|
78868
|
-
|
|
78869
|
-
|
|
78870
|
-
|
|
78871
|
-
|
|
78872
|
-
|
|
78873
|
-
|
|
78874
|
-
|
|
78875
|
-
|
|
78876
|
-
|
|
78877
|
-
|
|
78878
|
-
|
|
78879
|
-
|
|
78880
|
-
|
|
78881
|
-
|
|
79751
|
+
var SymbolKind;
|
|
79752
|
+
(function (SymbolKind) {
|
|
79753
|
+
SymbolKind.File = 1;
|
|
79754
|
+
SymbolKind.Module = 2;
|
|
79755
|
+
SymbolKind.Namespace = 3;
|
|
79756
|
+
SymbolKind.Package = 4;
|
|
79757
|
+
SymbolKind.Class = 5;
|
|
79758
|
+
SymbolKind.Method = 6;
|
|
79759
|
+
SymbolKind.Property = 7;
|
|
79760
|
+
SymbolKind.Field = 8;
|
|
79761
|
+
SymbolKind.Constructor = 9;
|
|
79762
|
+
SymbolKind.Enum = 10;
|
|
79763
|
+
SymbolKind.Interface = 11;
|
|
79764
|
+
SymbolKind.Function = 12;
|
|
79765
|
+
SymbolKind.Variable = 13;
|
|
79766
|
+
SymbolKind.Constant = 14;
|
|
79767
|
+
SymbolKind.String = 15;
|
|
79768
|
+
SymbolKind.Number = 16;
|
|
79769
|
+
SymbolKind.Boolean = 17;
|
|
79770
|
+
SymbolKind.Array = 18;
|
|
79771
|
+
SymbolKind.Object = 19;
|
|
79772
|
+
SymbolKind.Key = 20;
|
|
79773
|
+
SymbolKind.Null = 21;
|
|
79774
|
+
SymbolKind.EnumMember = 22;
|
|
79775
|
+
SymbolKind.Struct = 23;
|
|
79776
|
+
SymbolKind.Event = 24;
|
|
79777
|
+
SymbolKind.Operator = 25;
|
|
79778
|
+
SymbolKind.TypeParameter = 26;
|
|
79779
|
+
})(SymbolKind || (exports.SymbolKind = SymbolKind = {}));
|
|
78882
79780
|
/**
|
|
78883
|
-
*
|
|
79781
|
+
* Symbol tags are extra annotations that tweak the rendering of a symbol.
|
|
79782
|
+
*
|
|
79783
|
+
* @since 3.16
|
|
78884
79784
|
*/
|
|
78885
|
-
|
|
78886
|
-
|
|
78887
|
-
}
|
|
78888
|
-
TextDocumentEdit.create = create;
|
|
78889
|
-
function is(value) {
|
|
78890
|
-
var candidate = value;
|
|
78891
|
-
return Is.defined(candidate)
|
|
78892
|
-
&& OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)
|
|
78893
|
-
&& Array.isArray(candidate.edits);
|
|
78894
|
-
}
|
|
78895
|
-
TextDocumentEdit.is = is;
|
|
78896
|
-
})(TextDocumentEdit || (TextDocumentEdit = {}));
|
|
78897
|
-
var CreateFile;
|
|
78898
|
-
(function (CreateFile) {
|
|
78899
|
-
function create(uri, options, annotation) {
|
|
78900
|
-
var result = {
|
|
78901
|
-
kind: 'create',
|
|
78902
|
-
uri: uri
|
|
78903
|
-
};
|
|
78904
|
-
if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
|
|
78905
|
-
result.options = options;
|
|
78906
|
-
}
|
|
78907
|
-
if (annotation !== undefined) {
|
|
78908
|
-
result.annotationId = annotation;
|
|
78909
|
-
}
|
|
78910
|
-
return result;
|
|
78911
|
-
}
|
|
78912
|
-
CreateFile.create = create;
|
|
78913
|
-
function is(value) {
|
|
78914
|
-
var candidate = value;
|
|
78915
|
-
return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
|
|
78916
|
-
((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78917
|
-
}
|
|
78918
|
-
CreateFile.is = is;
|
|
78919
|
-
})(CreateFile || (CreateFile = {}));
|
|
78920
|
-
var RenameFile;
|
|
78921
|
-
(function (RenameFile) {
|
|
78922
|
-
function create(oldUri, newUri, options, annotation) {
|
|
78923
|
-
var result = {
|
|
78924
|
-
kind: 'rename',
|
|
78925
|
-
oldUri: oldUri,
|
|
78926
|
-
newUri: newUri
|
|
78927
|
-
};
|
|
78928
|
-
if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
|
|
78929
|
-
result.options = options;
|
|
78930
|
-
}
|
|
78931
|
-
if (annotation !== undefined) {
|
|
78932
|
-
result.annotationId = annotation;
|
|
78933
|
-
}
|
|
78934
|
-
return result;
|
|
78935
|
-
}
|
|
78936
|
-
RenameFile.create = create;
|
|
78937
|
-
function is(value) {
|
|
78938
|
-
var candidate = value;
|
|
78939
|
-
return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
|
|
78940
|
-
((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78941
|
-
}
|
|
78942
|
-
RenameFile.is = is;
|
|
78943
|
-
})(RenameFile || (RenameFile = {}));
|
|
78944
|
-
var DeleteFile;
|
|
78945
|
-
(function (DeleteFile) {
|
|
78946
|
-
function create(uri, options, annotation) {
|
|
78947
|
-
var result = {
|
|
78948
|
-
kind: 'delete',
|
|
78949
|
-
uri: uri
|
|
78950
|
-
};
|
|
78951
|
-
if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
|
|
78952
|
-
result.options = options;
|
|
78953
|
-
}
|
|
78954
|
-
if (annotation !== undefined) {
|
|
78955
|
-
result.annotationId = annotation;
|
|
78956
|
-
}
|
|
78957
|
-
return result;
|
|
78958
|
-
}
|
|
78959
|
-
DeleteFile.create = create;
|
|
78960
|
-
function is(value) {
|
|
78961
|
-
var candidate = value;
|
|
78962
|
-
return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
|
|
78963
|
-
((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
78964
|
-
}
|
|
78965
|
-
DeleteFile.is = is;
|
|
78966
|
-
})(DeleteFile || (DeleteFile = {}));
|
|
78967
|
-
var WorkspaceEdit;
|
|
78968
|
-
(function (WorkspaceEdit) {
|
|
78969
|
-
function is(value) {
|
|
78970
|
-
var candidate = value;
|
|
78971
|
-
return candidate &&
|
|
78972
|
-
(candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
|
|
78973
|
-
(candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {
|
|
78974
|
-
if (Is.string(change.kind)) {
|
|
78975
|
-
return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
|
|
78976
|
-
}
|
|
78977
|
-
else {
|
|
78978
|
-
return TextDocumentEdit.is(change);
|
|
78979
|
-
}
|
|
78980
|
-
}));
|
|
78981
|
-
}
|
|
78982
|
-
WorkspaceEdit.is = is;
|
|
78983
|
-
})(WorkspaceEdit || (WorkspaceEdit = {}));
|
|
78984
|
-
var TextEditChangeImpl = /** @class */ (function () {
|
|
78985
|
-
function TextEditChangeImpl(edits, changeAnnotations) {
|
|
78986
|
-
this.edits = edits;
|
|
78987
|
-
this.changeAnnotations = changeAnnotations;
|
|
78988
|
-
}
|
|
78989
|
-
TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {
|
|
78990
|
-
var edit;
|
|
78991
|
-
var id;
|
|
78992
|
-
if (annotation === undefined) {
|
|
78993
|
-
edit = TextEdit.insert(position, newText);
|
|
78994
|
-
}
|
|
78995
|
-
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
78996
|
-
id = annotation;
|
|
78997
|
-
edit = AnnotatedTextEdit.insert(position, newText, annotation);
|
|
78998
|
-
}
|
|
78999
|
-
else {
|
|
79000
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79001
|
-
id = this.changeAnnotations.manage(annotation);
|
|
79002
|
-
edit = AnnotatedTextEdit.insert(position, newText, id);
|
|
79003
|
-
}
|
|
79004
|
-
this.edits.push(edit);
|
|
79005
|
-
if (id !== undefined) {
|
|
79006
|
-
return id;
|
|
79007
|
-
}
|
|
79008
|
-
};
|
|
79009
|
-
TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {
|
|
79010
|
-
var edit;
|
|
79011
|
-
var id;
|
|
79012
|
-
if (annotation === undefined) {
|
|
79013
|
-
edit = TextEdit.replace(range, newText);
|
|
79014
|
-
}
|
|
79015
|
-
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
79016
|
-
id = annotation;
|
|
79017
|
-
edit = AnnotatedTextEdit.replace(range, newText, annotation);
|
|
79018
|
-
}
|
|
79019
|
-
else {
|
|
79020
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79021
|
-
id = this.changeAnnotations.manage(annotation);
|
|
79022
|
-
edit = AnnotatedTextEdit.replace(range, newText, id);
|
|
79023
|
-
}
|
|
79024
|
-
this.edits.push(edit);
|
|
79025
|
-
if (id !== undefined) {
|
|
79026
|
-
return id;
|
|
79027
|
-
}
|
|
79028
|
-
};
|
|
79029
|
-
TextEditChangeImpl.prototype.delete = function (range, annotation) {
|
|
79030
|
-
var edit;
|
|
79031
|
-
var id;
|
|
79032
|
-
if (annotation === undefined) {
|
|
79033
|
-
edit = TextEdit.del(range);
|
|
79034
|
-
}
|
|
79035
|
-
else if (ChangeAnnotationIdentifier.is(annotation)) {
|
|
79036
|
-
id = annotation;
|
|
79037
|
-
edit = AnnotatedTextEdit.del(range, annotation);
|
|
79038
|
-
}
|
|
79039
|
-
else {
|
|
79040
|
-
this.assertChangeAnnotations(this.changeAnnotations);
|
|
79041
|
-
id = this.changeAnnotations.manage(annotation);
|
|
79042
|
-
edit = AnnotatedTextEdit.del(range, id);
|
|
79043
|
-
}
|
|
79044
|
-
this.edits.push(edit);
|
|
79045
|
-
if (id !== undefined) {
|
|
79046
|
-
return id;
|
|
79047
|
-
}
|
|
79048
|
-
};
|
|
79049
|
-
TextEditChangeImpl.prototype.add = function (edit) {
|
|
79050
|
-
this.edits.push(edit);
|
|
79051
|
-
};
|
|
79052
|
-
TextEditChangeImpl.prototype.all = function () {
|
|
79053
|
-
return this.edits;
|
|
79054
|
-
};
|
|
79055
|
-
TextEditChangeImpl.prototype.clear = function () {
|
|
79056
|
-
this.edits.splice(0, this.edits.length);
|
|
79057
|
-
};
|
|
79058
|
-
TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {
|
|
79059
|
-
if (value === undefined) {
|
|
79060
|
-
throw new Error("Text edit change is not configured to manage change annotations.");
|
|
79061
|
-
}
|
|
79062
|
-
};
|
|
79063
|
-
return TextEditChangeImpl;
|
|
79064
|
-
}());
|
|
79065
|
-
/**
|
|
79066
|
-
* A helper class
|
|
79067
|
-
*/
|
|
79068
|
-
var ChangeAnnotations = /** @class */ (function () {
|
|
79069
|
-
function ChangeAnnotations(annotations) {
|
|
79070
|
-
this._annotations = annotations === undefined ? Object.create(null) : annotations;
|
|
79071
|
-
this._counter = 0;
|
|
79072
|
-
this._size = 0;
|
|
79073
|
-
}
|
|
79074
|
-
ChangeAnnotations.prototype.all = function () {
|
|
79075
|
-
return this._annotations;
|
|
79076
|
-
};
|
|
79077
|
-
Object.defineProperty(ChangeAnnotations.prototype, "size", {
|
|
79078
|
-
get: function () {
|
|
79079
|
-
return this._size;
|
|
79080
|
-
},
|
|
79081
|
-
enumerable: false,
|
|
79082
|
-
configurable: true
|
|
79083
|
-
});
|
|
79084
|
-
ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
|
|
79085
|
-
var id;
|
|
79086
|
-
if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
|
|
79087
|
-
id = idOrAnnotation;
|
|
79088
|
-
}
|
|
79089
|
-
else {
|
|
79090
|
-
id = this.nextId();
|
|
79091
|
-
annotation = idOrAnnotation;
|
|
79092
|
-
}
|
|
79093
|
-
if (this._annotations[id] !== undefined) {
|
|
79094
|
-
throw new Error("Id ".concat(id, " is already in use."));
|
|
79095
|
-
}
|
|
79096
|
-
if (annotation === undefined) {
|
|
79097
|
-
throw new Error("No annotation provided for id ".concat(id));
|
|
79098
|
-
}
|
|
79099
|
-
this._annotations[id] = annotation;
|
|
79100
|
-
this._size++;
|
|
79101
|
-
return id;
|
|
79102
|
-
};
|
|
79103
|
-
ChangeAnnotations.prototype.nextId = function () {
|
|
79104
|
-
this._counter++;
|
|
79105
|
-
return this._counter.toString();
|
|
79106
|
-
};
|
|
79107
|
-
return ChangeAnnotations;
|
|
79108
|
-
}());
|
|
79109
|
-
/**
|
|
79110
|
-
* A workspace change helps constructing changes to a workspace.
|
|
79111
|
-
*/
|
|
79112
|
-
var WorkspaceChange = /** @class */ (function () {
|
|
79113
|
-
function WorkspaceChange(workspaceEdit) {
|
|
79114
|
-
var _this = this;
|
|
79115
|
-
this._textEditChanges = Object.create(null);
|
|
79116
|
-
if (workspaceEdit !== undefined) {
|
|
79117
|
-
this._workspaceEdit = workspaceEdit;
|
|
79118
|
-
if (workspaceEdit.documentChanges) {
|
|
79119
|
-
this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
|
|
79120
|
-
workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
79121
|
-
workspaceEdit.documentChanges.forEach(function (change) {
|
|
79122
|
-
if (TextDocumentEdit.is(change)) {
|
|
79123
|
-
var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);
|
|
79124
|
-
_this._textEditChanges[change.textDocument.uri] = textEditChange;
|
|
79125
|
-
}
|
|
79126
|
-
});
|
|
79127
|
-
}
|
|
79128
|
-
else if (workspaceEdit.changes) {
|
|
79129
|
-
Object.keys(workspaceEdit.changes).forEach(function (key) {
|
|
79130
|
-
var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
|
|
79131
|
-
_this._textEditChanges[key] = textEditChange;
|
|
79132
|
-
});
|
|
79133
|
-
}
|
|
79134
|
-
}
|
|
79135
|
-
else {
|
|
79136
|
-
this._workspaceEdit = {};
|
|
79137
|
-
}
|
|
79138
|
-
}
|
|
79139
|
-
Object.defineProperty(WorkspaceChange.prototype, "edit", {
|
|
79785
|
+
var SymbolTag;
|
|
79786
|
+
(function (SymbolTag) {
|
|
79140
79787
|
/**
|
|
79141
|
-
*
|
|
79142
|
-
* use to be returned from a workspace edit operation like rename.
|
|
79788
|
+
* Render a symbol as obsolete, usually using a strike-out.
|
|
79143
79789
|
*/
|
|
79144
|
-
|
|
79145
|
-
|
|
79146
|
-
|
|
79147
|
-
|
|
79148
|
-
|
|
79149
|
-
|
|
79150
|
-
|
|
79151
|
-
|
|
79152
|
-
|
|
79153
|
-
|
|
79154
|
-
|
|
79155
|
-
|
|
79156
|
-
|
|
79157
|
-
|
|
79158
|
-
|
|
79159
|
-
|
|
79160
|
-
|
|
79161
|
-
|
|
79162
|
-
|
|
79163
|
-
|
|
79164
|
-
|
|
79165
|
-
var textDocument = { uri: key.uri, version: key.version };
|
|
79166
|
-
var result = this._textEditChanges[textDocument.uri];
|
|
79167
|
-
if (!result) {
|
|
79168
|
-
var edits = [];
|
|
79169
|
-
var textDocumentEdit = {
|
|
79170
|
-
textDocument: textDocument,
|
|
79171
|
-
edits: edits
|
|
79172
|
-
};
|
|
79173
|
-
this._workspaceEdit.documentChanges.push(textDocumentEdit);
|
|
79174
|
-
result = new TextEditChangeImpl(edits, this._changeAnnotations);
|
|
79175
|
-
this._textEditChanges[textDocument.uri] = result;
|
|
79790
|
+
SymbolTag.Deprecated = 1;
|
|
79791
|
+
})(SymbolTag || (exports.SymbolTag = SymbolTag = {}));
|
|
79792
|
+
var SymbolInformation;
|
|
79793
|
+
(function (SymbolInformation) {
|
|
79794
|
+
/**
|
|
79795
|
+
* Creates a new symbol information literal.
|
|
79796
|
+
*
|
|
79797
|
+
* @param name The name of the symbol.
|
|
79798
|
+
* @param kind The kind of the symbol.
|
|
79799
|
+
* @param range The range of the location of the symbol.
|
|
79800
|
+
* @param uri The resource of the location of symbol.
|
|
79801
|
+
* @param containerName The name of the symbol containing the symbol.
|
|
79802
|
+
*/
|
|
79803
|
+
function create(name, kind, range, uri, containerName) {
|
|
79804
|
+
var result = {
|
|
79805
|
+
name: name,
|
|
79806
|
+
kind: kind,
|
|
79807
|
+
location: { uri: uri, range: range }
|
|
79808
|
+
};
|
|
79809
|
+
if (containerName) {
|
|
79810
|
+
result.containerName = containerName;
|
|
79176
79811
|
}
|
|
79177
79812
|
return result;
|
|
79178
79813
|
}
|
|
79179
|
-
|
|
79180
|
-
|
|
79181
|
-
|
|
79182
|
-
|
|
79183
|
-
|
|
79184
|
-
|
|
79185
|
-
|
|
79186
|
-
|
|
79187
|
-
|
|
79188
|
-
|
|
79189
|
-
|
|
79814
|
+
SymbolInformation.create = create;
|
|
79815
|
+
})(SymbolInformation || (exports.SymbolInformation = SymbolInformation = {}));
|
|
79816
|
+
var WorkspaceSymbol;
|
|
79817
|
+
(function (WorkspaceSymbol) {
|
|
79818
|
+
/**
|
|
79819
|
+
* Create a new workspace symbol.
|
|
79820
|
+
*
|
|
79821
|
+
* @param name The name of the symbol.
|
|
79822
|
+
* @param kind The kind of the symbol.
|
|
79823
|
+
* @param uri The resource of the location of the symbol.
|
|
79824
|
+
* @param range An options range of the location.
|
|
79825
|
+
* @returns A WorkspaceSymbol.
|
|
79826
|
+
*/
|
|
79827
|
+
function create(name, kind, uri, range) {
|
|
79828
|
+
return range !== undefined
|
|
79829
|
+
? { name: name, kind: kind, location: { uri: uri, range: range } }
|
|
79830
|
+
: { name: name, kind: kind, location: { uri: uri } };
|
|
79831
|
+
}
|
|
79832
|
+
WorkspaceSymbol.create = create;
|
|
79833
|
+
})(WorkspaceSymbol || (exports.WorkspaceSymbol = WorkspaceSymbol = {}));
|
|
79834
|
+
var DocumentSymbol;
|
|
79835
|
+
(function (DocumentSymbol) {
|
|
79836
|
+
/**
|
|
79837
|
+
* Creates a new symbol information literal.
|
|
79838
|
+
*
|
|
79839
|
+
* @param name The name of the symbol.
|
|
79840
|
+
* @param detail The detail of the symbol.
|
|
79841
|
+
* @param kind The kind of the symbol.
|
|
79842
|
+
* @param range The range of the symbol.
|
|
79843
|
+
* @param selectionRange The selectionRange of the symbol.
|
|
79844
|
+
* @param children Children of the symbol.
|
|
79845
|
+
*/
|
|
79846
|
+
function create(name, detail, kind, range, selectionRange, children) {
|
|
79847
|
+
var result = {
|
|
79848
|
+
name: name,
|
|
79849
|
+
detail: detail,
|
|
79850
|
+
kind: kind,
|
|
79851
|
+
range: range,
|
|
79852
|
+
selectionRange: selectionRange
|
|
79853
|
+
};
|
|
79854
|
+
if (children !== undefined) {
|
|
79855
|
+
result.children = children;
|
|
79190
79856
|
}
|
|
79191
79857
|
return result;
|
|
79192
79858
|
}
|
|
79193
|
-
|
|
79194
|
-
|
|
79195
|
-
|
|
79196
|
-
|
|
79197
|
-
|
|
79198
|
-
|
|
79199
|
-
|
|
79200
|
-
|
|
79201
|
-
|
|
79202
|
-
|
|
79203
|
-
|
|
79204
|
-
|
|
79205
|
-
|
|
79206
|
-
|
|
79207
|
-
|
|
79208
|
-
|
|
79209
|
-
throw new Error('Workspace edit is not configured for document changes.');
|
|
79210
|
-
}
|
|
79211
|
-
var annotation;
|
|
79212
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79213
|
-
annotation = optionsOrAnnotation;
|
|
79214
|
-
}
|
|
79215
|
-
else {
|
|
79216
|
-
options = optionsOrAnnotation;
|
|
79217
|
-
}
|
|
79218
|
-
var operation;
|
|
79219
|
-
var id;
|
|
79220
|
-
if (annotation === undefined) {
|
|
79221
|
-
operation = CreateFile.create(uri, options);
|
|
79222
|
-
}
|
|
79223
|
-
else {
|
|
79224
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79225
|
-
operation = CreateFile.create(uri, options, id);
|
|
79226
|
-
}
|
|
79227
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
79228
|
-
if (id !== undefined) {
|
|
79229
|
-
return id;
|
|
79230
|
-
}
|
|
79231
|
-
};
|
|
79232
|
-
WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {
|
|
79233
|
-
this.initDocumentChanges();
|
|
79234
|
-
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79235
|
-
throw new Error('Workspace edit is not configured for document changes.');
|
|
79236
|
-
}
|
|
79237
|
-
var annotation;
|
|
79238
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79239
|
-
annotation = optionsOrAnnotation;
|
|
79240
|
-
}
|
|
79241
|
-
else {
|
|
79242
|
-
options = optionsOrAnnotation;
|
|
79243
|
-
}
|
|
79244
|
-
var operation;
|
|
79245
|
-
var id;
|
|
79246
|
-
if (annotation === undefined) {
|
|
79247
|
-
operation = RenameFile.create(oldUri, newUri, options);
|
|
79248
|
-
}
|
|
79249
|
-
else {
|
|
79250
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79251
|
-
operation = RenameFile.create(oldUri, newUri, options, id);
|
|
79252
|
-
}
|
|
79253
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
79254
|
-
if (id !== undefined) {
|
|
79255
|
-
return id;
|
|
79256
|
-
}
|
|
79257
|
-
};
|
|
79258
|
-
WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {
|
|
79259
|
-
this.initDocumentChanges();
|
|
79260
|
-
if (this._workspaceEdit.documentChanges === undefined) {
|
|
79261
|
-
throw new Error('Workspace edit is not configured for document changes.');
|
|
79262
|
-
}
|
|
79263
|
-
var annotation;
|
|
79264
|
-
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
79265
|
-
annotation = optionsOrAnnotation;
|
|
79266
|
-
}
|
|
79267
|
-
else {
|
|
79268
|
-
options = optionsOrAnnotation;
|
|
79269
|
-
}
|
|
79270
|
-
var operation;
|
|
79271
|
-
var id;
|
|
79272
|
-
if (annotation === undefined) {
|
|
79273
|
-
operation = DeleteFile.create(uri, options);
|
|
79274
|
-
}
|
|
79275
|
-
else {
|
|
79276
|
-
id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);
|
|
79277
|
-
operation = DeleteFile.create(uri, options, id);
|
|
79278
|
-
}
|
|
79279
|
-
this._workspaceEdit.documentChanges.push(operation);
|
|
79280
|
-
if (id !== undefined) {
|
|
79281
|
-
return id;
|
|
79282
|
-
}
|
|
79283
|
-
};
|
|
79284
|
-
return WorkspaceChange;
|
|
79285
|
-
}());
|
|
79286
|
-
|
|
79287
|
-
/**
|
|
79288
|
-
* The TextDocumentIdentifier namespace provides helper functions to work with
|
|
79289
|
-
* {@link TextDocumentIdentifier} literals.
|
|
79290
|
-
*/
|
|
79291
|
-
var TextDocumentIdentifier;
|
|
79292
|
-
(function (TextDocumentIdentifier) {
|
|
79293
|
-
/**
|
|
79294
|
-
* Creates a new TextDocumentIdentifier literal.
|
|
79295
|
-
* @param uri The document's uri.
|
|
79296
|
-
*/
|
|
79297
|
-
function create(uri) {
|
|
79298
|
-
return { uri: uri };
|
|
79299
|
-
}
|
|
79300
|
-
TextDocumentIdentifier.create = create;
|
|
79301
|
-
/**
|
|
79302
|
-
* Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.
|
|
79303
|
-
*/
|
|
79304
|
-
function is(value) {
|
|
79305
|
-
var candidate = value;
|
|
79306
|
-
return Is.defined(candidate) && Is.string(candidate.uri);
|
|
79307
|
-
}
|
|
79308
|
-
TextDocumentIdentifier.is = is;
|
|
79309
|
-
})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
|
|
79310
|
-
/**
|
|
79311
|
-
* The VersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
79312
|
-
* {@link VersionedTextDocumentIdentifier} literals.
|
|
79313
|
-
*/
|
|
79314
|
-
var VersionedTextDocumentIdentifier;
|
|
79315
|
-
(function (VersionedTextDocumentIdentifier) {
|
|
79316
|
-
/**
|
|
79317
|
-
* Creates a new VersionedTextDocumentIdentifier literal.
|
|
79318
|
-
* @param uri The document's uri.
|
|
79319
|
-
* @param version The document's version.
|
|
79320
|
-
*/
|
|
79321
|
-
function create(uri, version) {
|
|
79322
|
-
return { uri: uri, version: version };
|
|
79323
|
-
}
|
|
79324
|
-
VersionedTextDocumentIdentifier.create = create;
|
|
79325
|
-
/**
|
|
79326
|
-
* Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface.
|
|
79327
|
-
*/
|
|
79328
|
-
function is(value) {
|
|
79329
|
-
var candidate = value;
|
|
79330
|
-
return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
|
|
79331
|
-
}
|
|
79332
|
-
VersionedTextDocumentIdentifier.is = is;
|
|
79333
|
-
})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
|
|
79334
|
-
/**
|
|
79335
|
-
* The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with
|
|
79336
|
-
* {@link OptionalVersionedTextDocumentIdentifier} literals.
|
|
79337
|
-
*/
|
|
79338
|
-
var OptionalVersionedTextDocumentIdentifier;
|
|
79339
|
-
(function (OptionalVersionedTextDocumentIdentifier) {
|
|
79340
|
-
/**
|
|
79341
|
-
* Creates a new OptionalVersionedTextDocumentIdentifier literal.
|
|
79342
|
-
* @param uri The document's uri.
|
|
79343
|
-
* @param version The document's version.
|
|
79344
|
-
*/
|
|
79345
|
-
function create(uri, version) {
|
|
79346
|
-
return { uri: uri, version: version };
|
|
79347
|
-
}
|
|
79348
|
-
OptionalVersionedTextDocumentIdentifier.create = create;
|
|
79349
|
-
/**
|
|
79350
|
-
* Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.
|
|
79351
|
-
*/
|
|
79352
|
-
function is(value) {
|
|
79353
|
-
var candidate = value;
|
|
79354
|
-
return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
|
|
79355
|
-
}
|
|
79356
|
-
OptionalVersionedTextDocumentIdentifier.is = is;
|
|
79357
|
-
})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));
|
|
79358
|
-
/**
|
|
79359
|
-
* The TextDocumentItem namespace provides helper functions to work with
|
|
79360
|
-
* {@link TextDocumentItem} literals.
|
|
79361
|
-
*/
|
|
79362
|
-
var TextDocumentItem;
|
|
79363
|
-
(function (TextDocumentItem) {
|
|
79364
|
-
/**
|
|
79365
|
-
* Creates a new TextDocumentItem literal.
|
|
79366
|
-
* @param uri The document's uri.
|
|
79367
|
-
* @param languageId The document's language identifier.
|
|
79368
|
-
* @param version The document's version number.
|
|
79369
|
-
* @param text The document's text.
|
|
79370
|
-
*/
|
|
79371
|
-
function create(uri, languageId, version, text) {
|
|
79372
|
-
return { uri: uri, languageId: languageId, version: version, text: text };
|
|
79373
|
-
}
|
|
79374
|
-
TextDocumentItem.create = create;
|
|
79375
|
-
/**
|
|
79376
|
-
* Checks whether the given literal conforms to the {@link TextDocumentItem} interface.
|
|
79377
|
-
*/
|
|
79378
|
-
function is(value) {
|
|
79379
|
-
var candidate = value;
|
|
79380
|
-
return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
|
|
79381
|
-
}
|
|
79382
|
-
TextDocumentItem.is = is;
|
|
79383
|
-
})(TextDocumentItem || (TextDocumentItem = {}));
|
|
79384
|
-
/**
|
|
79385
|
-
* Describes the content type that a client supports in various
|
|
79386
|
-
* result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
|
|
79387
|
-
*
|
|
79388
|
-
* Please note that `MarkupKinds` must not start with a `$`. This kinds
|
|
79389
|
-
* are reserved for internal usage.
|
|
79390
|
-
*/
|
|
79391
|
-
var MarkupKind;
|
|
79392
|
-
(function (MarkupKind) {
|
|
79393
|
-
/**
|
|
79394
|
-
* Plain text is supported as a content format
|
|
79395
|
-
*/
|
|
79396
|
-
MarkupKind.PlainText = 'plaintext';
|
|
79397
|
-
/**
|
|
79398
|
-
* Markdown is supported as a content format
|
|
79399
|
-
*/
|
|
79400
|
-
MarkupKind.Markdown = 'markdown';
|
|
79401
|
-
/**
|
|
79402
|
-
* Checks whether the given value is a value of the {@link MarkupKind} type.
|
|
79403
|
-
*/
|
|
79404
|
-
function is(value) {
|
|
79405
|
-
var candidate = value;
|
|
79406
|
-
return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
|
|
79407
|
-
}
|
|
79408
|
-
MarkupKind.is = is;
|
|
79409
|
-
})(MarkupKind || (MarkupKind = {}));
|
|
79410
|
-
var MarkupContent;
|
|
79411
|
-
(function (MarkupContent) {
|
|
79412
|
-
/**
|
|
79413
|
-
* Checks whether the given value conforms to the {@link MarkupContent} interface.
|
|
79414
|
-
*/
|
|
79415
|
-
function is(value) {
|
|
79416
|
-
var candidate = value;
|
|
79417
|
-
return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
|
|
79418
|
-
}
|
|
79419
|
-
MarkupContent.is = is;
|
|
79420
|
-
})(MarkupContent || (MarkupContent = {}));
|
|
79421
|
-
/**
|
|
79422
|
-
* The kind of a completion entry.
|
|
79423
|
-
*/
|
|
79424
|
-
var CompletionItemKind;
|
|
79425
|
-
(function (CompletionItemKind) {
|
|
79426
|
-
CompletionItemKind.Text = 1;
|
|
79427
|
-
CompletionItemKind.Method = 2;
|
|
79428
|
-
CompletionItemKind.Function = 3;
|
|
79429
|
-
CompletionItemKind.Constructor = 4;
|
|
79430
|
-
CompletionItemKind.Field = 5;
|
|
79431
|
-
CompletionItemKind.Variable = 6;
|
|
79432
|
-
CompletionItemKind.Class = 7;
|
|
79433
|
-
CompletionItemKind.Interface = 8;
|
|
79434
|
-
CompletionItemKind.Module = 9;
|
|
79435
|
-
CompletionItemKind.Property = 10;
|
|
79436
|
-
CompletionItemKind.Unit = 11;
|
|
79437
|
-
CompletionItemKind.Value = 12;
|
|
79438
|
-
CompletionItemKind.Enum = 13;
|
|
79439
|
-
CompletionItemKind.Keyword = 14;
|
|
79440
|
-
CompletionItemKind.Snippet = 15;
|
|
79441
|
-
CompletionItemKind.Color = 16;
|
|
79442
|
-
CompletionItemKind.File = 17;
|
|
79443
|
-
CompletionItemKind.Reference = 18;
|
|
79444
|
-
CompletionItemKind.Folder = 19;
|
|
79445
|
-
CompletionItemKind.EnumMember = 20;
|
|
79446
|
-
CompletionItemKind.Constant = 21;
|
|
79447
|
-
CompletionItemKind.Struct = 22;
|
|
79448
|
-
CompletionItemKind.Event = 23;
|
|
79449
|
-
CompletionItemKind.Operator = 24;
|
|
79450
|
-
CompletionItemKind.TypeParameter = 25;
|
|
79451
|
-
})(CompletionItemKind || (CompletionItemKind = {}));
|
|
79452
|
-
/**
|
|
79453
|
-
* Defines whether the insert text in a completion item should be interpreted as
|
|
79454
|
-
* plain text or a snippet.
|
|
79455
|
-
*/
|
|
79456
|
-
var InsertTextFormat;
|
|
79457
|
-
(function (InsertTextFormat) {
|
|
79458
|
-
/**
|
|
79459
|
-
* The primary text to be inserted is treated as a plain string.
|
|
79460
|
-
*/
|
|
79461
|
-
InsertTextFormat.PlainText = 1;
|
|
79462
|
-
/**
|
|
79463
|
-
* The primary text to be inserted is treated as a snippet.
|
|
79464
|
-
*
|
|
79465
|
-
* A snippet can define tab stops and placeholders with `$1`, `$2`
|
|
79466
|
-
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
|
|
79467
|
-
* the end of the snippet. Placeholders with equal identifiers are linked,
|
|
79468
|
-
* that is typing in one will update others too.
|
|
79469
|
-
*
|
|
79470
|
-
* See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
|
|
79471
|
-
*/
|
|
79472
|
-
InsertTextFormat.Snippet = 2;
|
|
79473
|
-
})(InsertTextFormat || (InsertTextFormat = {}));
|
|
79474
|
-
/**
|
|
79475
|
-
* Completion item tags are extra annotations that tweak the rendering of a completion
|
|
79476
|
-
* item.
|
|
79477
|
-
*
|
|
79478
|
-
* @since 3.15.0
|
|
79479
|
-
*/
|
|
79480
|
-
var CompletionItemTag;
|
|
79481
|
-
(function (CompletionItemTag) {
|
|
79482
|
-
/**
|
|
79483
|
-
* Render a completion as obsolete, usually using a strike-out.
|
|
79484
|
-
*/
|
|
79485
|
-
CompletionItemTag.Deprecated = 1;
|
|
79486
|
-
})(CompletionItemTag || (CompletionItemTag = {}));
|
|
79487
|
-
/**
|
|
79488
|
-
* The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.
|
|
79489
|
-
*
|
|
79490
|
-
* @since 3.16.0
|
|
79491
|
-
*/
|
|
79492
|
-
var InsertReplaceEdit;
|
|
79493
|
-
(function (InsertReplaceEdit) {
|
|
79494
|
-
/**
|
|
79495
|
-
* Creates a new insert / replace edit
|
|
79496
|
-
*/
|
|
79497
|
-
function create(newText, insert, replace) {
|
|
79498
|
-
return { newText: newText, insert: insert, replace: replace };
|
|
79499
|
-
}
|
|
79500
|
-
InsertReplaceEdit.create = create;
|
|
79501
|
-
/**
|
|
79502
|
-
* Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface.
|
|
79503
|
-
*/
|
|
79504
|
-
function is(value) {
|
|
79505
|
-
var candidate = value;
|
|
79506
|
-
return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
|
|
79507
|
-
}
|
|
79508
|
-
InsertReplaceEdit.is = is;
|
|
79509
|
-
})(InsertReplaceEdit || (InsertReplaceEdit = {}));
|
|
79510
|
-
/**
|
|
79511
|
-
* How whitespace and indentation is handled during completion
|
|
79512
|
-
* item insertion.
|
|
79513
|
-
*
|
|
79514
|
-
* @since 3.16.0
|
|
79515
|
-
*/
|
|
79516
|
-
var InsertTextMode;
|
|
79517
|
-
(function (InsertTextMode) {
|
|
79518
|
-
/**
|
|
79519
|
-
* The insertion or replace strings is taken as it is. If the
|
|
79520
|
-
* value is multi line the lines below the cursor will be
|
|
79521
|
-
* inserted using the indentation defined in the string value.
|
|
79522
|
-
* The client will not apply any kind of adjustments to the
|
|
79523
|
-
* string.
|
|
79524
|
-
*/
|
|
79525
|
-
InsertTextMode.asIs = 1;
|
|
79526
|
-
/**
|
|
79527
|
-
* The editor adjusts leading whitespace of new lines so that
|
|
79528
|
-
* they match the indentation up to the cursor of the line for
|
|
79529
|
-
* which the item is accepted.
|
|
79530
|
-
*
|
|
79531
|
-
* Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
|
|
79532
|
-
* multi line completion item is indented using 2 tabs and all
|
|
79533
|
-
* following lines inserted will be indented using 2 tabs as well.
|
|
79534
|
-
*/
|
|
79535
|
-
InsertTextMode.adjustIndentation = 2;
|
|
79536
|
-
})(InsertTextMode || (InsertTextMode = {}));
|
|
79537
|
-
var CompletionItemLabelDetails;
|
|
79538
|
-
(function (CompletionItemLabelDetails) {
|
|
79539
|
-
function is(value) {
|
|
79540
|
-
var candidate = value;
|
|
79541
|
-
return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&
|
|
79542
|
-
(Is.string(candidate.description) || candidate.description === undefined);
|
|
79543
|
-
}
|
|
79544
|
-
CompletionItemLabelDetails.is = is;
|
|
79545
|
-
})(CompletionItemLabelDetails || (CompletionItemLabelDetails = {}));
|
|
79546
|
-
/**
|
|
79547
|
-
* The CompletionItem namespace provides functions to deal with
|
|
79548
|
-
* completion items.
|
|
79549
|
-
*/
|
|
79550
|
-
var CompletionItem;
|
|
79551
|
-
(function (CompletionItem) {
|
|
79552
|
-
/**
|
|
79553
|
-
* Create a completion item and seed it with a label.
|
|
79554
|
-
* @param label The completion item's label
|
|
79555
|
-
*/
|
|
79556
|
-
function create(label) {
|
|
79557
|
-
return { label: label };
|
|
79558
|
-
}
|
|
79559
|
-
CompletionItem.create = create;
|
|
79560
|
-
})(CompletionItem || (CompletionItem = {}));
|
|
79561
|
-
/**
|
|
79562
|
-
* The CompletionList namespace provides functions to deal with
|
|
79563
|
-
* completion lists.
|
|
79564
|
-
*/
|
|
79565
|
-
var CompletionList;
|
|
79566
|
-
(function (CompletionList) {
|
|
79859
|
+
DocumentSymbol.create = create;
|
|
79860
|
+
/**
|
|
79861
|
+
* Checks whether the given literal conforms to the {@link DocumentSymbol} interface.
|
|
79862
|
+
*/
|
|
79863
|
+
function is(value) {
|
|
79864
|
+
var candidate = value;
|
|
79865
|
+
return candidate &&
|
|
79866
|
+
Is.string(candidate.name) && Is.number(candidate.kind) &&
|
|
79867
|
+
Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
|
|
79868
|
+
(candidate.detail === undefined || Is.string(candidate.detail)) &&
|
|
79869
|
+
(candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&
|
|
79870
|
+
(candidate.children === undefined || Array.isArray(candidate.children)) &&
|
|
79871
|
+
(candidate.tags === undefined || Array.isArray(candidate.tags));
|
|
79872
|
+
}
|
|
79873
|
+
DocumentSymbol.is = is;
|
|
79874
|
+
})(DocumentSymbol || (exports.DocumentSymbol = DocumentSymbol = {}));
|
|
79567
79875
|
/**
|
|
79568
|
-
*
|
|
79569
|
-
*
|
|
79570
|
-
* @param items The completion items.
|
|
79571
|
-
* @param isIncomplete The list is not complete.
|
|
79876
|
+
* A set of predefined code action kinds
|
|
79572
79877
|
*/
|
|
79573
|
-
|
|
79574
|
-
|
|
79575
|
-
|
|
79576
|
-
|
|
79577
|
-
|
|
79578
|
-
|
|
79579
|
-
|
|
79878
|
+
var CodeActionKind;
|
|
79879
|
+
(function (CodeActionKind) {
|
|
79880
|
+
/**
|
|
79881
|
+
* Empty kind.
|
|
79882
|
+
*/
|
|
79883
|
+
CodeActionKind.Empty = '';
|
|
79884
|
+
/**
|
|
79885
|
+
* Base kind for quickfix actions: 'quickfix'
|
|
79886
|
+
*/
|
|
79887
|
+
CodeActionKind.QuickFix = 'quickfix';
|
|
79888
|
+
/**
|
|
79889
|
+
* Base kind for refactoring actions: 'refactor'
|
|
79890
|
+
*/
|
|
79891
|
+
CodeActionKind.Refactor = 'refactor';
|
|
79892
|
+
/**
|
|
79893
|
+
* Base kind for refactoring extraction actions: 'refactor.extract'
|
|
79894
|
+
*
|
|
79895
|
+
* Example extract actions:
|
|
79896
|
+
*
|
|
79897
|
+
* - Extract method
|
|
79898
|
+
* - Extract function
|
|
79899
|
+
* - Extract variable
|
|
79900
|
+
* - Extract interface from class
|
|
79901
|
+
* - ...
|
|
79902
|
+
*/
|
|
79903
|
+
CodeActionKind.RefactorExtract = 'refactor.extract';
|
|
79904
|
+
/**
|
|
79905
|
+
* Base kind for refactoring inline actions: 'refactor.inline'
|
|
79906
|
+
*
|
|
79907
|
+
* Example inline actions:
|
|
79908
|
+
*
|
|
79909
|
+
* - Inline function
|
|
79910
|
+
* - Inline variable
|
|
79911
|
+
* - Inline constant
|
|
79912
|
+
* - ...
|
|
79913
|
+
*/
|
|
79914
|
+
CodeActionKind.RefactorInline = 'refactor.inline';
|
|
79915
|
+
/**
|
|
79916
|
+
* Base kind for refactoring rewrite actions: 'refactor.rewrite'
|
|
79917
|
+
*
|
|
79918
|
+
* Example rewrite actions:
|
|
79919
|
+
*
|
|
79920
|
+
* - Convert JavaScript function to class
|
|
79921
|
+
* - Add or remove parameter
|
|
79922
|
+
* - Encapsulate field
|
|
79923
|
+
* - Make method static
|
|
79924
|
+
* - Move method to base class
|
|
79925
|
+
* - ...
|
|
79926
|
+
*/
|
|
79927
|
+
CodeActionKind.RefactorRewrite = 'refactor.rewrite';
|
|
79928
|
+
/**
|
|
79929
|
+
* Base kind for source actions: `source`
|
|
79930
|
+
*
|
|
79931
|
+
* Source code actions apply to the entire file.
|
|
79932
|
+
*/
|
|
79933
|
+
CodeActionKind.Source = 'source';
|
|
79934
|
+
/**
|
|
79935
|
+
* Base kind for an organize imports source action: `source.organizeImports`
|
|
79936
|
+
*/
|
|
79937
|
+
CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
|
|
79938
|
+
/**
|
|
79939
|
+
* Base kind for auto-fix source actions: `source.fixAll`.
|
|
79940
|
+
*
|
|
79941
|
+
* Fix all actions automatically fix errors that have a clear fix that do not require user input.
|
|
79942
|
+
* They should not suppress errors or perform unsafe fixes such as generating new types or classes.
|
|
79943
|
+
*
|
|
79944
|
+
* @since 3.15.0
|
|
79945
|
+
*/
|
|
79946
|
+
CodeActionKind.SourceFixAll = 'source.fixAll';
|
|
79947
|
+
})(CodeActionKind || (exports.CodeActionKind = CodeActionKind = {}));
|
|
79580
79948
|
/**
|
|
79581
|
-
*
|
|
79949
|
+
* The reason why code actions were requested.
|
|
79582
79950
|
*
|
|
79583
|
-
* @
|
|
79584
|
-
*/
|
|
79585
|
-
function fromPlainText(plainText) {
|
|
79586
|
-
return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
|
|
79587
|
-
}
|
|
79588
|
-
MarkedString.fromPlainText = fromPlainText;
|
|
79589
|
-
/**
|
|
79590
|
-
* Checks whether the given value conforms to the {@link MarkedString} type.
|
|
79591
|
-
*/
|
|
79592
|
-
function is(value) {
|
|
79593
|
-
var candidate = value;
|
|
79594
|
-
return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
|
|
79595
|
-
}
|
|
79596
|
-
MarkedString.is = is;
|
|
79597
|
-
})(MarkedString || (MarkedString = {}));
|
|
79598
|
-
var Hover;
|
|
79599
|
-
(function (Hover) {
|
|
79600
|
-
/**
|
|
79601
|
-
* Checks whether the given value conforms to the {@link Hover} interface.
|
|
79951
|
+
* @since 3.17.0
|
|
79602
79952
|
*/
|
|
79603
|
-
|
|
79604
|
-
|
|
79605
|
-
|
|
79606
|
-
|
|
79607
|
-
|
|
79608
|
-
|
|
79609
|
-
|
|
79610
|
-
|
|
79611
|
-
|
|
79612
|
-
|
|
79613
|
-
|
|
79614
|
-
|
|
79615
|
-
|
|
79616
|
-
(
|
|
79953
|
+
var CodeActionTriggerKind;
|
|
79954
|
+
(function (CodeActionTriggerKind) {
|
|
79955
|
+
/**
|
|
79956
|
+
* Code actions were explicitly requested by the user or by an extension.
|
|
79957
|
+
*/
|
|
79958
|
+
CodeActionTriggerKind.Invoked = 1;
|
|
79959
|
+
/**
|
|
79960
|
+
* Code actions were requested automatically.
|
|
79961
|
+
*
|
|
79962
|
+
* This typically happens when current selection in a file changes, but can
|
|
79963
|
+
* also be triggered when file content changes.
|
|
79964
|
+
*/
|
|
79965
|
+
CodeActionTriggerKind.Automatic = 2;
|
|
79966
|
+
})(CodeActionTriggerKind || (exports.CodeActionTriggerKind = CodeActionTriggerKind = {}));
|
|
79617
79967
|
/**
|
|
79618
|
-
*
|
|
79619
|
-
*
|
|
79620
|
-
* @param label A label string.
|
|
79621
|
-
* @param documentation A doc string.
|
|
79968
|
+
* The CodeActionContext namespace provides helper functions to work with
|
|
79969
|
+
* {@link CodeActionContext} literals.
|
|
79622
79970
|
*/
|
|
79623
|
-
|
|
79624
|
-
|
|
79625
|
-
|
|
79626
|
-
|
|
79627
|
-
|
|
79628
|
-
|
|
79629
|
-
|
|
79630
|
-
|
|
79631
|
-
|
|
79632
|
-
|
|
79633
|
-
(
|
|
79634
|
-
|
|
79635
|
-
|
|
79636
|
-
|
|
79637
|
-
parameters[_i - 2] = arguments[_i];
|
|
79638
|
-
}
|
|
79639
|
-
var result = { label: label };
|
|
79640
|
-
if (Is.defined(documentation)) {
|
|
79641
|
-
result.documentation = documentation;
|
|
79642
|
-
}
|
|
79643
|
-
if (Is.defined(parameters)) {
|
|
79644
|
-
result.parameters = parameters;
|
|
79971
|
+
var CodeActionContext;
|
|
79972
|
+
(function (CodeActionContext) {
|
|
79973
|
+
/**
|
|
79974
|
+
* Creates a new CodeActionContext literal.
|
|
79975
|
+
*/
|
|
79976
|
+
function create(diagnostics, only, triggerKind) {
|
|
79977
|
+
var result = { diagnostics: diagnostics };
|
|
79978
|
+
if (only !== undefined && only !== null) {
|
|
79979
|
+
result.only = only;
|
|
79980
|
+
}
|
|
79981
|
+
if (triggerKind !== undefined && triggerKind !== null) {
|
|
79982
|
+
result.triggerKind = triggerKind;
|
|
79983
|
+
}
|
|
79984
|
+
return result;
|
|
79645
79985
|
}
|
|
79646
|
-
|
|
79647
|
-
|
|
79986
|
+
CodeActionContext.create = create;
|
|
79987
|
+
/**
|
|
79988
|
+
* Checks whether the given literal conforms to the {@link CodeActionContext} interface.
|
|
79989
|
+
*/
|
|
79990
|
+
function is(value) {
|
|
79991
|
+
var candidate = value;
|
|
79992
|
+
return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is)
|
|
79993
|
+
&& (candidate.only === undefined || Is.typedArray(candidate.only, Is.string))
|
|
79994
|
+
&& (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);
|
|
79995
|
+
}
|
|
79996
|
+
CodeActionContext.is = is;
|
|
79997
|
+
})(CodeActionContext || (exports.CodeActionContext = CodeActionContext = {}));
|
|
79998
|
+
var CodeAction;
|
|
79999
|
+
(function (CodeAction) {
|
|
80000
|
+
function create(title, kindOrCommandOrEdit, kind) {
|
|
80001
|
+
var result = { title: title };
|
|
80002
|
+
var checkKind = true;
|
|
80003
|
+
if (typeof kindOrCommandOrEdit === 'string') {
|
|
80004
|
+
checkKind = false;
|
|
80005
|
+
result.kind = kindOrCommandOrEdit;
|
|
80006
|
+
}
|
|
80007
|
+
else if (Command.is(kindOrCommandOrEdit)) {
|
|
80008
|
+
result.command = kindOrCommandOrEdit;
|
|
80009
|
+
}
|
|
80010
|
+
else {
|
|
80011
|
+
result.edit = kindOrCommandOrEdit;
|
|
80012
|
+
}
|
|
80013
|
+
if (checkKind && kind !== undefined) {
|
|
80014
|
+
result.kind = kind;
|
|
80015
|
+
}
|
|
80016
|
+
return result;
|
|
79648
80017
|
}
|
|
79649
|
-
|
|
79650
|
-
|
|
79651
|
-
|
|
79652
|
-
|
|
79653
|
-
|
|
79654
|
-
|
|
79655
|
-
|
|
79656
|
-
|
|
79657
|
-
(
|
|
79658
|
-
|
|
79659
|
-
|
|
79660
|
-
|
|
79661
|
-
|
|
79662
|
-
/**
|
|
79663
|
-
* Read-access of a symbol, like reading a variable.
|
|
79664
|
-
*/
|
|
79665
|
-
DocumentHighlightKind.Read = 2;
|
|
80018
|
+
CodeAction.create = create;
|
|
80019
|
+
function is(value) {
|
|
80020
|
+
var candidate = value;
|
|
80021
|
+
return candidate && Is.string(candidate.title) &&
|
|
80022
|
+
(candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
|
|
80023
|
+
(candidate.kind === undefined || Is.string(candidate.kind)) &&
|
|
80024
|
+
(candidate.edit !== undefined || candidate.command !== undefined) &&
|
|
80025
|
+
(candidate.command === undefined || Command.is(candidate.command)) &&
|
|
80026
|
+
(candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&
|
|
80027
|
+
(candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
|
|
80028
|
+
}
|
|
80029
|
+
CodeAction.is = is;
|
|
80030
|
+
})(CodeAction || (exports.CodeAction = CodeAction = {}));
|
|
79666
80031
|
/**
|
|
79667
|
-
*
|
|
80032
|
+
* The CodeLens namespace provides helper functions to work with
|
|
80033
|
+
* {@link CodeLens} literals.
|
|
79668
80034
|
*/
|
|
79669
|
-
|
|
79670
|
-
|
|
79671
|
-
/**
|
|
79672
|
-
|
|
79673
|
-
|
|
79674
|
-
|
|
79675
|
-
var
|
|
79676
|
-
|
|
79677
|
-
|
|
79678
|
-
|
|
79679
|
-
|
|
79680
|
-
* @param kind The highlight kind
|
|
79681
|
-
*/
|
|
79682
|
-
function create(range, kind) {
|
|
79683
|
-
var result = { range: range };
|
|
79684
|
-
if (Is.number(kind)) {
|
|
79685
|
-
result.kind = kind;
|
|
80035
|
+
var CodeLens;
|
|
80036
|
+
(function (CodeLens) {
|
|
80037
|
+
/**
|
|
80038
|
+
* Creates a new CodeLens literal.
|
|
80039
|
+
*/
|
|
80040
|
+
function create(range, data) {
|
|
80041
|
+
var result = { range: range };
|
|
80042
|
+
if (Is.defined(data)) {
|
|
80043
|
+
result.data = data;
|
|
80044
|
+
}
|
|
80045
|
+
return result;
|
|
79686
80046
|
}
|
|
79687
|
-
|
|
79688
|
-
|
|
79689
|
-
|
|
79690
|
-
|
|
79691
|
-
|
|
79692
|
-
|
|
79693
|
-
|
|
79694
|
-
var SymbolKind;
|
|
79695
|
-
(function (SymbolKind) {
|
|
79696
|
-
SymbolKind.File = 1;
|
|
79697
|
-
SymbolKind.Module = 2;
|
|
79698
|
-
SymbolKind.Namespace = 3;
|
|
79699
|
-
SymbolKind.Package = 4;
|
|
79700
|
-
SymbolKind.Class = 5;
|
|
79701
|
-
SymbolKind.Method = 6;
|
|
79702
|
-
SymbolKind.Property = 7;
|
|
79703
|
-
SymbolKind.Field = 8;
|
|
79704
|
-
SymbolKind.Constructor = 9;
|
|
79705
|
-
SymbolKind.Enum = 10;
|
|
79706
|
-
SymbolKind.Interface = 11;
|
|
79707
|
-
SymbolKind.Function = 12;
|
|
79708
|
-
SymbolKind.Variable = 13;
|
|
79709
|
-
SymbolKind.Constant = 14;
|
|
79710
|
-
SymbolKind.String = 15;
|
|
79711
|
-
SymbolKind.Number = 16;
|
|
79712
|
-
SymbolKind.Boolean = 17;
|
|
79713
|
-
SymbolKind.Array = 18;
|
|
79714
|
-
SymbolKind.Object = 19;
|
|
79715
|
-
SymbolKind.Key = 20;
|
|
79716
|
-
SymbolKind.Null = 21;
|
|
79717
|
-
SymbolKind.EnumMember = 22;
|
|
79718
|
-
SymbolKind.Struct = 23;
|
|
79719
|
-
SymbolKind.Event = 24;
|
|
79720
|
-
SymbolKind.Operator = 25;
|
|
79721
|
-
SymbolKind.TypeParameter = 26;
|
|
79722
|
-
})(SymbolKind || (SymbolKind = {}));
|
|
79723
|
-
/**
|
|
79724
|
-
* Symbol tags are extra annotations that tweak the rendering of a symbol.
|
|
79725
|
-
*
|
|
79726
|
-
* @since 3.16
|
|
79727
|
-
*/
|
|
79728
|
-
var SymbolTag;
|
|
79729
|
-
(function (SymbolTag) {
|
|
79730
|
-
/**
|
|
79731
|
-
* Render a symbol as obsolete, usually using a strike-out.
|
|
79732
|
-
*/
|
|
79733
|
-
SymbolTag.Deprecated = 1;
|
|
79734
|
-
})(SymbolTag || (SymbolTag = {}));
|
|
79735
|
-
var SymbolInformation;
|
|
79736
|
-
(function (SymbolInformation) {
|
|
79737
|
-
/**
|
|
79738
|
-
* Creates a new symbol information literal.
|
|
79739
|
-
*
|
|
79740
|
-
* @param name The name of the symbol.
|
|
79741
|
-
* @param kind The kind of the symbol.
|
|
79742
|
-
* @param range The range of the location of the symbol.
|
|
79743
|
-
* @param uri The resource of the location of symbol.
|
|
79744
|
-
* @param containerName The name of the symbol containing the symbol.
|
|
79745
|
-
*/
|
|
79746
|
-
function create(name, kind, range, uri, containerName) {
|
|
79747
|
-
var result = {
|
|
79748
|
-
name: name,
|
|
79749
|
-
kind: kind,
|
|
79750
|
-
location: { uri: uri, range: range }
|
|
79751
|
-
};
|
|
79752
|
-
if (containerName) {
|
|
79753
|
-
result.containerName = containerName;
|
|
80047
|
+
CodeLens.create = create;
|
|
80048
|
+
/**
|
|
80049
|
+
* Checks whether the given literal conforms to the {@link CodeLens} interface.
|
|
80050
|
+
*/
|
|
80051
|
+
function is(value) {
|
|
80052
|
+
var candidate = value;
|
|
80053
|
+
return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
|
|
79754
80054
|
}
|
|
79755
|
-
|
|
79756
|
-
}
|
|
79757
|
-
SymbolInformation.create = create;
|
|
79758
|
-
})(SymbolInformation || (SymbolInformation = {}));
|
|
79759
|
-
var WorkspaceSymbol;
|
|
79760
|
-
(function (WorkspaceSymbol) {
|
|
80055
|
+
CodeLens.is = is;
|
|
80056
|
+
})(CodeLens || (exports.CodeLens = CodeLens = {}));
|
|
79761
80057
|
/**
|
|
79762
|
-
*
|
|
79763
|
-
*
|
|
79764
|
-
* @param name The name of the symbol.
|
|
79765
|
-
* @param kind The kind of the symbol.
|
|
79766
|
-
* @param uri The resource of the location of the symbol.
|
|
79767
|
-
* @param range An options range of the location.
|
|
79768
|
-
* @returns A WorkspaceSymbol.
|
|
80058
|
+
* The FormattingOptions namespace provides helper functions to work with
|
|
80059
|
+
* {@link FormattingOptions} literals.
|
|
79769
80060
|
*/
|
|
79770
|
-
|
|
79771
|
-
|
|
79772
|
-
|
|
79773
|
-
|
|
79774
|
-
|
|
79775
|
-
|
|
79776
|
-
|
|
79777
|
-
var DocumentSymbol;
|
|
79778
|
-
(function (DocumentSymbol) {
|
|
79779
|
-
/**
|
|
79780
|
-
* Creates a new symbol information literal.
|
|
79781
|
-
*
|
|
79782
|
-
* @param name The name of the symbol.
|
|
79783
|
-
* @param detail The detail of the symbol.
|
|
79784
|
-
* @param kind The kind of the symbol.
|
|
79785
|
-
* @param range The range of the symbol.
|
|
79786
|
-
* @param selectionRange The selectionRange of the symbol.
|
|
79787
|
-
* @param children Children of the symbol.
|
|
79788
|
-
*/
|
|
79789
|
-
function create(name, detail, kind, range, selectionRange, children) {
|
|
79790
|
-
var result = {
|
|
79791
|
-
name: name,
|
|
79792
|
-
detail: detail,
|
|
79793
|
-
kind: kind,
|
|
79794
|
-
range: range,
|
|
79795
|
-
selectionRange: selectionRange
|
|
79796
|
-
};
|
|
79797
|
-
if (children !== undefined) {
|
|
79798
|
-
result.children = children;
|
|
80061
|
+
var FormattingOptions;
|
|
80062
|
+
(function (FormattingOptions) {
|
|
80063
|
+
/**
|
|
80064
|
+
* Creates a new FormattingOptions literal.
|
|
80065
|
+
*/
|
|
80066
|
+
function create(tabSize, insertSpaces) {
|
|
80067
|
+
return { tabSize: tabSize, insertSpaces: insertSpaces };
|
|
79799
80068
|
}
|
|
79800
|
-
|
|
79801
|
-
|
|
79802
|
-
|
|
79803
|
-
|
|
79804
|
-
|
|
79805
|
-
|
|
79806
|
-
|
|
79807
|
-
|
|
79808
|
-
|
|
79809
|
-
|
|
79810
|
-
Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
|
|
79811
|
-
(candidate.detail === undefined || Is.string(candidate.detail)) &&
|
|
79812
|
-
(candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&
|
|
79813
|
-
(candidate.children === undefined || Array.isArray(candidate.children)) &&
|
|
79814
|
-
(candidate.tags === undefined || Array.isArray(candidate.tags));
|
|
79815
|
-
}
|
|
79816
|
-
DocumentSymbol.is = is;
|
|
79817
|
-
})(DocumentSymbol || (DocumentSymbol = {}));
|
|
79818
|
-
/**
|
|
79819
|
-
* A set of predefined code action kinds
|
|
79820
|
-
*/
|
|
79821
|
-
var CodeActionKind;
|
|
79822
|
-
(function (CodeActionKind) {
|
|
79823
|
-
/**
|
|
79824
|
-
* Empty kind.
|
|
79825
|
-
*/
|
|
79826
|
-
CodeActionKind.Empty = '';
|
|
79827
|
-
/**
|
|
79828
|
-
* Base kind for quickfix actions: 'quickfix'
|
|
79829
|
-
*/
|
|
79830
|
-
CodeActionKind.QuickFix = 'quickfix';
|
|
80069
|
+
FormattingOptions.create = create;
|
|
80070
|
+
/**
|
|
80071
|
+
* Checks whether the given literal conforms to the {@link FormattingOptions} interface.
|
|
80072
|
+
*/
|
|
80073
|
+
function is(value) {
|
|
80074
|
+
var candidate = value;
|
|
80075
|
+
return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
|
|
80076
|
+
}
|
|
80077
|
+
FormattingOptions.is = is;
|
|
80078
|
+
})(FormattingOptions || (exports.FormattingOptions = FormattingOptions = {}));
|
|
79831
80079
|
/**
|
|
79832
|
-
*
|
|
80080
|
+
* The DocumentLink namespace provides helper functions to work with
|
|
80081
|
+
* {@link DocumentLink} literals.
|
|
79833
80082
|
*/
|
|
79834
|
-
|
|
79835
|
-
|
|
79836
|
-
|
|
79837
|
-
|
|
79838
|
-
|
|
79839
|
-
|
|
79840
|
-
|
|
79841
|
-
|
|
79842
|
-
|
|
79843
|
-
|
|
79844
|
-
|
|
79845
|
-
|
|
79846
|
-
|
|
80083
|
+
var DocumentLink;
|
|
80084
|
+
(function (DocumentLink) {
|
|
80085
|
+
/**
|
|
80086
|
+
* Creates a new DocumentLink literal.
|
|
80087
|
+
*/
|
|
80088
|
+
function create(range, target, data) {
|
|
80089
|
+
return { range: range, target: target, data: data };
|
|
80090
|
+
}
|
|
80091
|
+
DocumentLink.create = create;
|
|
80092
|
+
/**
|
|
80093
|
+
* Checks whether the given literal conforms to the {@link DocumentLink} interface.
|
|
80094
|
+
*/
|
|
80095
|
+
function is(value) {
|
|
80096
|
+
var candidate = value;
|
|
80097
|
+
return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
|
|
80098
|
+
}
|
|
80099
|
+
DocumentLink.is = is;
|
|
80100
|
+
})(DocumentLink || (exports.DocumentLink = DocumentLink = {}));
|
|
79847
80101
|
/**
|
|
79848
|
-
*
|
|
79849
|
-
*
|
|
79850
|
-
* Example inline actions:
|
|
79851
|
-
*
|
|
79852
|
-
* - Inline function
|
|
79853
|
-
* - Inline variable
|
|
79854
|
-
* - Inline constant
|
|
79855
|
-
* - ...
|
|
80102
|
+
* The SelectionRange namespace provides helper function to work with
|
|
80103
|
+
* SelectionRange literals.
|
|
79856
80104
|
*/
|
|
79857
|
-
|
|
80105
|
+
var SelectionRange;
|
|
80106
|
+
(function (SelectionRange) {
|
|
80107
|
+
/**
|
|
80108
|
+
* Creates a new SelectionRange
|
|
80109
|
+
* @param range the range.
|
|
80110
|
+
* @param parent an optional parent.
|
|
80111
|
+
*/
|
|
80112
|
+
function create(range, parent) {
|
|
80113
|
+
return { range: range, parent: parent };
|
|
80114
|
+
}
|
|
80115
|
+
SelectionRange.create = create;
|
|
80116
|
+
function is(value) {
|
|
80117
|
+
var candidate = value;
|
|
80118
|
+
return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
|
|
80119
|
+
}
|
|
80120
|
+
SelectionRange.is = is;
|
|
80121
|
+
})(SelectionRange || (exports.SelectionRange = SelectionRange = {}));
|
|
79858
80122
|
/**
|
|
79859
|
-
*
|
|
80123
|
+
* A set of predefined token types. This set is not fixed
|
|
80124
|
+
* an clients can specify additional token types via the
|
|
80125
|
+
* corresponding client capabilities.
|
|
79860
80126
|
*
|
|
79861
|
-
*
|
|
79862
|
-
*
|
|
79863
|
-
* - Convert JavaScript function to class
|
|
79864
|
-
* - Add or remove parameter
|
|
79865
|
-
* - Encapsulate field
|
|
79866
|
-
* - Make method static
|
|
79867
|
-
* - Move method to base class
|
|
79868
|
-
* - ...
|
|
80127
|
+
* @since 3.16.0
|
|
79869
80128
|
*/
|
|
79870
|
-
|
|
80129
|
+
var SemanticTokenTypes;
|
|
80130
|
+
(function (SemanticTokenTypes) {
|
|
80131
|
+
SemanticTokenTypes["namespace"] = "namespace";
|
|
80132
|
+
/**
|
|
80133
|
+
* Represents a generic type. Acts as a fallback for types which can't be mapped to
|
|
80134
|
+
* a specific type like class or enum.
|
|
80135
|
+
*/
|
|
80136
|
+
SemanticTokenTypes["type"] = "type";
|
|
80137
|
+
SemanticTokenTypes["class"] = "class";
|
|
80138
|
+
SemanticTokenTypes["enum"] = "enum";
|
|
80139
|
+
SemanticTokenTypes["interface"] = "interface";
|
|
80140
|
+
SemanticTokenTypes["struct"] = "struct";
|
|
80141
|
+
SemanticTokenTypes["typeParameter"] = "typeParameter";
|
|
80142
|
+
SemanticTokenTypes["parameter"] = "parameter";
|
|
80143
|
+
SemanticTokenTypes["variable"] = "variable";
|
|
80144
|
+
SemanticTokenTypes["property"] = "property";
|
|
80145
|
+
SemanticTokenTypes["enumMember"] = "enumMember";
|
|
80146
|
+
SemanticTokenTypes["event"] = "event";
|
|
80147
|
+
SemanticTokenTypes["function"] = "function";
|
|
80148
|
+
SemanticTokenTypes["method"] = "method";
|
|
80149
|
+
SemanticTokenTypes["macro"] = "macro";
|
|
80150
|
+
SemanticTokenTypes["keyword"] = "keyword";
|
|
80151
|
+
SemanticTokenTypes["modifier"] = "modifier";
|
|
80152
|
+
SemanticTokenTypes["comment"] = "comment";
|
|
80153
|
+
SemanticTokenTypes["string"] = "string";
|
|
80154
|
+
SemanticTokenTypes["number"] = "number";
|
|
80155
|
+
SemanticTokenTypes["regexp"] = "regexp";
|
|
80156
|
+
SemanticTokenTypes["operator"] = "operator";
|
|
80157
|
+
/**
|
|
80158
|
+
* @since 3.17.0
|
|
80159
|
+
*/
|
|
80160
|
+
SemanticTokenTypes["decorator"] = "decorator";
|
|
80161
|
+
})(SemanticTokenTypes || (exports.SemanticTokenTypes = SemanticTokenTypes = {}));
|
|
79871
80162
|
/**
|
|
79872
|
-
*
|
|
80163
|
+
* A set of predefined token modifiers. This set is not fixed
|
|
80164
|
+
* an clients can specify additional token types via the
|
|
80165
|
+
* corresponding client capabilities.
|
|
79873
80166
|
*
|
|
79874
|
-
*
|
|
80167
|
+
* @since 3.16.0
|
|
79875
80168
|
*/
|
|
79876
|
-
|
|
80169
|
+
var SemanticTokenModifiers;
|
|
80170
|
+
(function (SemanticTokenModifiers) {
|
|
80171
|
+
SemanticTokenModifiers["declaration"] = "declaration";
|
|
80172
|
+
SemanticTokenModifiers["definition"] = "definition";
|
|
80173
|
+
SemanticTokenModifiers["readonly"] = "readonly";
|
|
80174
|
+
SemanticTokenModifiers["static"] = "static";
|
|
80175
|
+
SemanticTokenModifiers["deprecated"] = "deprecated";
|
|
80176
|
+
SemanticTokenModifiers["abstract"] = "abstract";
|
|
80177
|
+
SemanticTokenModifiers["async"] = "async";
|
|
80178
|
+
SemanticTokenModifiers["modification"] = "modification";
|
|
80179
|
+
SemanticTokenModifiers["documentation"] = "documentation";
|
|
80180
|
+
SemanticTokenModifiers["defaultLibrary"] = "defaultLibrary";
|
|
80181
|
+
})(SemanticTokenModifiers || (exports.SemanticTokenModifiers = SemanticTokenModifiers = {}));
|
|
79877
80182
|
/**
|
|
79878
|
-
*
|
|
80183
|
+
* @since 3.16.0
|
|
79879
80184
|
*/
|
|
79880
|
-
|
|
80185
|
+
var SemanticTokens;
|
|
80186
|
+
(function (SemanticTokens) {
|
|
80187
|
+
function is(value) {
|
|
80188
|
+
var candidate = value;
|
|
80189
|
+
return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
|
|
80190
|
+
Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
|
|
80191
|
+
}
|
|
80192
|
+
SemanticTokens.is = is;
|
|
80193
|
+
})(SemanticTokens || (exports.SemanticTokens = SemanticTokens = {}));
|
|
79881
80194
|
/**
|
|
79882
|
-
*
|
|
79883
|
-
*
|
|
79884
|
-
* Fix all actions automatically fix errors that have a clear fix that do not require user input.
|
|
79885
|
-
* They should not suppress errors or perform unsafe fixes such as generating new types or classes.
|
|
80195
|
+
* The InlineValueText namespace provides functions to deal with InlineValueTexts.
|
|
79886
80196
|
*
|
|
79887
|
-
* @since 3.
|
|
79888
|
-
*/
|
|
79889
|
-
CodeActionKind.SourceFixAll = 'source.fixAll';
|
|
79890
|
-
})(CodeActionKind || (CodeActionKind = {}));
|
|
79891
|
-
/**
|
|
79892
|
-
* The reason why code actions were requested.
|
|
79893
|
-
*
|
|
79894
|
-
* @since 3.17.0
|
|
79895
|
-
*/
|
|
79896
|
-
var CodeActionTriggerKind;
|
|
79897
|
-
(function (CodeActionTriggerKind) {
|
|
79898
|
-
/**
|
|
79899
|
-
* Code actions were explicitly requested by the user or by an extension.
|
|
80197
|
+
* @since 3.17.0
|
|
79900
80198
|
*/
|
|
79901
|
-
|
|
80199
|
+
var InlineValueText;
|
|
80200
|
+
(function (InlineValueText) {
|
|
80201
|
+
/**
|
|
80202
|
+
* Creates a new InlineValueText literal.
|
|
80203
|
+
*/
|
|
80204
|
+
function create(range, text) {
|
|
80205
|
+
return { range: range, text: text };
|
|
80206
|
+
}
|
|
80207
|
+
InlineValueText.create = create;
|
|
80208
|
+
function is(value) {
|
|
80209
|
+
var candidate = value;
|
|
80210
|
+
return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);
|
|
80211
|
+
}
|
|
80212
|
+
InlineValueText.is = is;
|
|
80213
|
+
})(InlineValueText || (exports.InlineValueText = InlineValueText = {}));
|
|
79902
80214
|
/**
|
|
79903
|
-
*
|
|
80215
|
+
* The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.
|
|
79904
80216
|
*
|
|
79905
|
-
*
|
|
79906
|
-
* also be triggered when file content changes.
|
|
79907
|
-
*/
|
|
79908
|
-
CodeActionTriggerKind.Automatic = 2;
|
|
79909
|
-
})(CodeActionTriggerKind || (CodeActionTriggerKind = {}));
|
|
79910
|
-
/**
|
|
79911
|
-
* The CodeActionContext namespace provides helper functions to work with
|
|
79912
|
-
* {@link CodeActionContext} literals.
|
|
79913
|
-
*/
|
|
79914
|
-
var CodeActionContext;
|
|
79915
|
-
(function (CodeActionContext) {
|
|
79916
|
-
/**
|
|
79917
|
-
* Creates a new CodeActionContext literal.
|
|
80217
|
+
* @since 3.17.0
|
|
79918
80218
|
*/
|
|
79919
|
-
|
|
79920
|
-
|
|
79921
|
-
|
|
79922
|
-
|
|
80219
|
+
var InlineValueVariableLookup;
|
|
80220
|
+
(function (InlineValueVariableLookup) {
|
|
80221
|
+
/**
|
|
80222
|
+
* Creates a new InlineValueText literal.
|
|
80223
|
+
*/
|
|
80224
|
+
function create(range, variableName, caseSensitiveLookup) {
|
|
80225
|
+
return { range: range, variableName: variableName, caseSensitiveLookup: caseSensitiveLookup };
|
|
79923
80226
|
}
|
|
79924
|
-
|
|
79925
|
-
|
|
80227
|
+
InlineValueVariableLookup.create = create;
|
|
80228
|
+
function is(value) {
|
|
80229
|
+
var candidate = value;
|
|
80230
|
+
return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)
|
|
80231
|
+
&& (Is.string(candidate.variableName) || candidate.variableName === undefined);
|
|
79926
80232
|
}
|
|
79927
|
-
|
|
79928
|
-
}
|
|
79929
|
-
CodeActionContext.create = create;
|
|
80233
|
+
InlineValueVariableLookup.is = is;
|
|
80234
|
+
})(InlineValueVariableLookup || (exports.InlineValueVariableLookup = InlineValueVariableLookup = {}));
|
|
79930
80235
|
/**
|
|
79931
|
-
*
|
|
80236
|
+
* The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.
|
|
80237
|
+
*
|
|
80238
|
+
* @since 3.17.0
|
|
79932
80239
|
*/
|
|
79933
|
-
|
|
79934
|
-
|
|
79935
|
-
|
|
79936
|
-
|
|
79937
|
-
|
|
79938
|
-
|
|
79939
|
-
|
|
79940
|
-
})(CodeActionContext || (CodeActionContext = {}));
|
|
79941
|
-
var CodeAction;
|
|
79942
|
-
(function (CodeAction) {
|
|
79943
|
-
function create(title, kindOrCommandOrEdit, kind) {
|
|
79944
|
-
var result = { title: title };
|
|
79945
|
-
var checkKind = true;
|
|
79946
|
-
if (typeof kindOrCommandOrEdit === 'string') {
|
|
79947
|
-
checkKind = false;
|
|
79948
|
-
result.kind = kindOrCommandOrEdit;
|
|
79949
|
-
}
|
|
79950
|
-
else if (Command.is(kindOrCommandOrEdit)) {
|
|
79951
|
-
result.command = kindOrCommandOrEdit;
|
|
79952
|
-
}
|
|
79953
|
-
else {
|
|
79954
|
-
result.edit = kindOrCommandOrEdit;
|
|
80240
|
+
var InlineValueEvaluatableExpression;
|
|
80241
|
+
(function (InlineValueEvaluatableExpression) {
|
|
80242
|
+
/**
|
|
80243
|
+
* Creates a new InlineValueEvaluatableExpression literal.
|
|
80244
|
+
*/
|
|
80245
|
+
function create(range, expression) {
|
|
80246
|
+
return { range: range, expression: expression };
|
|
79955
80247
|
}
|
|
79956
|
-
|
|
79957
|
-
|
|
80248
|
+
InlineValueEvaluatableExpression.create = create;
|
|
80249
|
+
function is(value) {
|
|
80250
|
+
var candidate = value;
|
|
80251
|
+
return candidate !== undefined && candidate !== null && Range.is(candidate.range)
|
|
80252
|
+
&& (Is.string(candidate.expression) || candidate.expression === undefined);
|
|
79958
80253
|
}
|
|
79959
|
-
|
|
79960
|
-
}
|
|
79961
|
-
CodeAction.create = create;
|
|
79962
|
-
function is(value) {
|
|
79963
|
-
var candidate = value;
|
|
79964
|
-
return candidate && Is.string(candidate.title) &&
|
|
79965
|
-
(candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
|
|
79966
|
-
(candidate.kind === undefined || Is.string(candidate.kind)) &&
|
|
79967
|
-
(candidate.edit !== undefined || candidate.command !== undefined) &&
|
|
79968
|
-
(candidate.command === undefined || Command.is(candidate.command)) &&
|
|
79969
|
-
(candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&
|
|
79970
|
-
(candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));
|
|
79971
|
-
}
|
|
79972
|
-
CodeAction.is = is;
|
|
79973
|
-
})(CodeAction || (CodeAction = {}));
|
|
79974
|
-
/**
|
|
79975
|
-
* The CodeLens namespace provides helper functions to work with
|
|
79976
|
-
* {@link CodeLens} literals.
|
|
79977
|
-
*/
|
|
79978
|
-
var CodeLens;
|
|
79979
|
-
(function (CodeLens) {
|
|
80254
|
+
InlineValueEvaluatableExpression.is = is;
|
|
80255
|
+
})(InlineValueEvaluatableExpression || (exports.InlineValueEvaluatableExpression = InlineValueEvaluatableExpression = {}));
|
|
79980
80256
|
/**
|
|
79981
|
-
*
|
|
80257
|
+
* The InlineValueContext namespace provides helper functions to work with
|
|
80258
|
+
* {@link InlineValueContext} literals.
|
|
80259
|
+
*
|
|
80260
|
+
* @since 3.17.0
|
|
79982
80261
|
*/
|
|
79983
|
-
|
|
79984
|
-
|
|
79985
|
-
|
|
79986
|
-
|
|
80262
|
+
var InlineValueContext;
|
|
80263
|
+
(function (InlineValueContext) {
|
|
80264
|
+
/**
|
|
80265
|
+
* Creates a new InlineValueContext literal.
|
|
80266
|
+
*/
|
|
80267
|
+
function create(frameId, stoppedLocation) {
|
|
80268
|
+
return { frameId: frameId, stoppedLocation: stoppedLocation };
|
|
79987
80269
|
}
|
|
79988
|
-
|
|
79989
|
-
|
|
79990
|
-
|
|
79991
|
-
|
|
79992
|
-
|
|
79993
|
-
|
|
79994
|
-
|
|
79995
|
-
|
|
79996
|
-
|
|
79997
|
-
}
|
|
79998
|
-
CodeLens.is = is;
|
|
79999
|
-
})(CodeLens || (CodeLens = {}));
|
|
80000
|
-
/**
|
|
80001
|
-
* The FormattingOptions namespace provides helper functions to work with
|
|
80002
|
-
* {@link FormattingOptions} literals.
|
|
80003
|
-
*/
|
|
80004
|
-
var FormattingOptions;
|
|
80005
|
-
(function (FormattingOptions) {
|
|
80006
|
-
/**
|
|
80007
|
-
* Creates a new FormattingOptions literal.
|
|
80008
|
-
*/
|
|
80009
|
-
function create(tabSize, insertSpaces) {
|
|
80010
|
-
return { tabSize: tabSize, insertSpaces: insertSpaces };
|
|
80011
|
-
}
|
|
80012
|
-
FormattingOptions.create = create;
|
|
80013
|
-
/**
|
|
80014
|
-
* Checks whether the given literal conforms to the {@link FormattingOptions} interface.
|
|
80015
|
-
*/
|
|
80016
|
-
function is(value) {
|
|
80017
|
-
var candidate = value;
|
|
80018
|
-
return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
|
|
80019
|
-
}
|
|
80020
|
-
FormattingOptions.is = is;
|
|
80021
|
-
})(FormattingOptions || (FormattingOptions = {}));
|
|
80022
|
-
/**
|
|
80023
|
-
* The DocumentLink namespace provides helper functions to work with
|
|
80024
|
-
* {@link DocumentLink} literals.
|
|
80025
|
-
*/
|
|
80026
|
-
var DocumentLink;
|
|
80027
|
-
(function (DocumentLink) {
|
|
80028
|
-
/**
|
|
80029
|
-
* Creates a new DocumentLink literal.
|
|
80030
|
-
*/
|
|
80031
|
-
function create(range, target, data) {
|
|
80032
|
-
return { range: range, target: target, data: data };
|
|
80033
|
-
}
|
|
80034
|
-
DocumentLink.create = create;
|
|
80035
|
-
/**
|
|
80036
|
-
* Checks whether the given literal conforms to the {@link DocumentLink} interface.
|
|
80037
|
-
*/
|
|
80038
|
-
function is(value) {
|
|
80039
|
-
var candidate = value;
|
|
80040
|
-
return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
|
|
80041
|
-
}
|
|
80042
|
-
DocumentLink.is = is;
|
|
80043
|
-
})(DocumentLink || (DocumentLink = {}));
|
|
80044
|
-
/**
|
|
80045
|
-
* The SelectionRange namespace provides helper function to work with
|
|
80046
|
-
* SelectionRange literals.
|
|
80047
|
-
*/
|
|
80048
|
-
var SelectionRange;
|
|
80049
|
-
(function (SelectionRange) {
|
|
80050
|
-
/**
|
|
80051
|
-
* Creates a new SelectionRange
|
|
80052
|
-
* @param range the range.
|
|
80053
|
-
* @param parent an optional parent.
|
|
80054
|
-
*/
|
|
80055
|
-
function create(range, parent) {
|
|
80056
|
-
return { range: range, parent: parent };
|
|
80057
|
-
}
|
|
80058
|
-
SelectionRange.create = create;
|
|
80059
|
-
function is(value) {
|
|
80060
|
-
var candidate = value;
|
|
80061
|
-
return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
|
|
80062
|
-
}
|
|
80063
|
-
SelectionRange.is = is;
|
|
80064
|
-
})(SelectionRange || (SelectionRange = {}));
|
|
80065
|
-
/**
|
|
80066
|
-
* A set of predefined token types. This set is not fixed
|
|
80067
|
-
* an clients can specify additional token types via the
|
|
80068
|
-
* corresponding client capabilities.
|
|
80069
|
-
*
|
|
80070
|
-
* @since 3.16.0
|
|
80071
|
-
*/
|
|
80072
|
-
var SemanticTokenTypes;
|
|
80073
|
-
(function (SemanticTokenTypes) {
|
|
80074
|
-
SemanticTokenTypes["namespace"] = "namespace";
|
|
80075
|
-
/**
|
|
80076
|
-
* Represents a generic type. Acts as a fallback for types which can't be mapped to
|
|
80077
|
-
* a specific type like class or enum.
|
|
80078
|
-
*/
|
|
80079
|
-
SemanticTokenTypes["type"] = "type";
|
|
80080
|
-
SemanticTokenTypes["class"] = "class";
|
|
80081
|
-
SemanticTokenTypes["enum"] = "enum";
|
|
80082
|
-
SemanticTokenTypes["interface"] = "interface";
|
|
80083
|
-
SemanticTokenTypes["struct"] = "struct";
|
|
80084
|
-
SemanticTokenTypes["typeParameter"] = "typeParameter";
|
|
80085
|
-
SemanticTokenTypes["parameter"] = "parameter";
|
|
80086
|
-
SemanticTokenTypes["variable"] = "variable";
|
|
80087
|
-
SemanticTokenTypes["property"] = "property";
|
|
80088
|
-
SemanticTokenTypes["enumMember"] = "enumMember";
|
|
80089
|
-
SemanticTokenTypes["event"] = "event";
|
|
80090
|
-
SemanticTokenTypes["function"] = "function";
|
|
80091
|
-
SemanticTokenTypes["method"] = "method";
|
|
80092
|
-
SemanticTokenTypes["macro"] = "macro";
|
|
80093
|
-
SemanticTokenTypes["keyword"] = "keyword";
|
|
80094
|
-
SemanticTokenTypes["modifier"] = "modifier";
|
|
80095
|
-
SemanticTokenTypes["comment"] = "comment";
|
|
80096
|
-
SemanticTokenTypes["string"] = "string";
|
|
80097
|
-
SemanticTokenTypes["number"] = "number";
|
|
80098
|
-
SemanticTokenTypes["regexp"] = "regexp";
|
|
80099
|
-
SemanticTokenTypes["operator"] = "operator";
|
|
80270
|
+
InlineValueContext.create = create;
|
|
80271
|
+
/**
|
|
80272
|
+
* Checks whether the given literal conforms to the {@link InlineValueContext} interface.
|
|
80273
|
+
*/
|
|
80274
|
+
function is(value) {
|
|
80275
|
+
var candidate = value;
|
|
80276
|
+
return Is.defined(candidate) && Range.is(value.stoppedLocation);
|
|
80277
|
+
}
|
|
80278
|
+
InlineValueContext.is = is;
|
|
80279
|
+
})(InlineValueContext || (exports.InlineValueContext = InlineValueContext = {}));
|
|
80100
80280
|
/**
|
|
80281
|
+
* Inlay hint kinds.
|
|
80282
|
+
*
|
|
80101
80283
|
* @since 3.17.0
|
|
80102
80284
|
*/
|
|
80103
|
-
|
|
80104
|
-
|
|
80105
|
-
/**
|
|
80106
|
-
|
|
80107
|
-
|
|
80108
|
-
|
|
80109
|
-
|
|
80110
|
-
|
|
80111
|
-
|
|
80112
|
-
|
|
80113
|
-
|
|
80114
|
-
|
|
80115
|
-
|
|
80116
|
-
|
|
80117
|
-
|
|
80118
|
-
|
|
80119
|
-
|
|
80120
|
-
|
|
80121
|
-
|
|
80122
|
-
|
|
80123
|
-
|
|
80124
|
-
|
|
80125
|
-
|
|
80126
|
-
|
|
80127
|
-
|
|
80128
|
-
|
|
80129
|
-
(
|
|
80130
|
-
|
|
80131
|
-
|
|
80132
|
-
|
|
80133
|
-
|
|
80134
|
-
|
|
80135
|
-
|
|
80136
|
-
|
|
80137
|
-
|
|
80138
|
-
|
|
80139
|
-
|
|
80140
|
-
|
|
80141
|
-
*/
|
|
80142
|
-
var InlineValueText;
|
|
80143
|
-
(function (InlineValueText) {
|
|
80144
|
-
/**
|
|
80145
|
-
* Creates a new InlineValueText literal.
|
|
80146
|
-
*/
|
|
80147
|
-
function create(range, text) {
|
|
80148
|
-
return { range: range, text: text };
|
|
80149
|
-
}
|
|
80150
|
-
InlineValueText.create = create;
|
|
80151
|
-
function is(value) {
|
|
80152
|
-
var candidate = value;
|
|
80153
|
-
return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);
|
|
80154
|
-
}
|
|
80155
|
-
InlineValueText.is = is;
|
|
80156
|
-
})(InlineValueText || (InlineValueText = {}));
|
|
80157
|
-
/**
|
|
80158
|
-
* The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.
|
|
80159
|
-
*
|
|
80160
|
-
* @since 3.17.0
|
|
80161
|
-
*/
|
|
80162
|
-
var InlineValueVariableLookup;
|
|
80163
|
-
(function (InlineValueVariableLookup) {
|
|
80164
|
-
/**
|
|
80165
|
-
* Creates a new InlineValueText literal.
|
|
80166
|
-
*/
|
|
80167
|
-
function create(range, variableName, caseSensitiveLookup) {
|
|
80168
|
-
return { range: range, variableName: variableName, caseSensitiveLookup: caseSensitiveLookup };
|
|
80169
|
-
}
|
|
80170
|
-
InlineValueVariableLookup.create = create;
|
|
80171
|
-
function is(value) {
|
|
80172
|
-
var candidate = value;
|
|
80173
|
-
return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)
|
|
80174
|
-
&& (Is.string(candidate.variableName) || candidate.variableName === undefined);
|
|
80175
|
-
}
|
|
80176
|
-
InlineValueVariableLookup.is = is;
|
|
80177
|
-
})(InlineValueVariableLookup || (InlineValueVariableLookup = {}));
|
|
80178
|
-
/**
|
|
80179
|
-
* The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.
|
|
80180
|
-
*
|
|
80181
|
-
* @since 3.17.0
|
|
80182
|
-
*/
|
|
80183
|
-
var InlineValueEvaluatableExpression;
|
|
80184
|
-
(function (InlineValueEvaluatableExpression) {
|
|
80185
|
-
/**
|
|
80186
|
-
* Creates a new InlineValueEvaluatableExpression literal.
|
|
80187
|
-
*/
|
|
80188
|
-
function create(range, expression) {
|
|
80189
|
-
return { range: range, expression: expression };
|
|
80190
|
-
}
|
|
80191
|
-
InlineValueEvaluatableExpression.create = create;
|
|
80192
|
-
function is(value) {
|
|
80193
|
-
var candidate = value;
|
|
80194
|
-
return candidate !== undefined && candidate !== null && Range.is(candidate.range)
|
|
80195
|
-
&& (Is.string(candidate.expression) || candidate.expression === undefined);
|
|
80196
|
-
}
|
|
80197
|
-
InlineValueEvaluatableExpression.is = is;
|
|
80198
|
-
})(InlineValueEvaluatableExpression || (InlineValueEvaluatableExpression = {}));
|
|
80199
|
-
/**
|
|
80200
|
-
* The InlineValueContext namespace provides helper functions to work with
|
|
80201
|
-
* {@link InlineValueContext} literals.
|
|
80202
|
-
*
|
|
80203
|
-
* @since 3.17.0
|
|
80204
|
-
*/
|
|
80205
|
-
var InlineValueContext;
|
|
80206
|
-
(function (InlineValueContext) {
|
|
80207
|
-
/**
|
|
80208
|
-
* Creates a new InlineValueContext literal.
|
|
80209
|
-
*/
|
|
80210
|
-
function create(frameId, stoppedLocation) {
|
|
80211
|
-
return { frameId: frameId, stoppedLocation: stoppedLocation };
|
|
80212
|
-
}
|
|
80213
|
-
InlineValueContext.create = create;
|
|
80214
|
-
/**
|
|
80215
|
-
* Checks whether the given literal conforms to the {@link InlineValueContext} interface.
|
|
80216
|
-
*/
|
|
80217
|
-
function is(value) {
|
|
80218
|
-
var candidate = value;
|
|
80219
|
-
return Is.defined(candidate) && Range.is(value.stoppedLocation);
|
|
80220
|
-
}
|
|
80221
|
-
InlineValueContext.is = is;
|
|
80222
|
-
})(InlineValueContext || (InlineValueContext = {}));
|
|
80223
|
-
/**
|
|
80224
|
-
* Inlay hint kinds.
|
|
80225
|
-
*
|
|
80226
|
-
* @since 3.17.0
|
|
80227
|
-
*/
|
|
80228
|
-
var InlayHintKind;
|
|
80229
|
-
(function (InlayHintKind) {
|
|
80230
|
-
/**
|
|
80231
|
-
* An inlay hint that for a type annotation.
|
|
80232
|
-
*/
|
|
80233
|
-
InlayHintKind.Type = 1;
|
|
80234
|
-
/**
|
|
80235
|
-
* An inlay hint that is for a parameter.
|
|
80236
|
-
*/
|
|
80237
|
-
InlayHintKind.Parameter = 2;
|
|
80238
|
-
function is(value) {
|
|
80239
|
-
return value === 1 || value === 2;
|
|
80240
|
-
}
|
|
80241
|
-
InlayHintKind.is = is;
|
|
80242
|
-
})(InlayHintKind || (InlayHintKind = {}));
|
|
80243
|
-
var InlayHintLabelPart;
|
|
80244
|
-
(function (InlayHintLabelPart) {
|
|
80245
|
-
function create(value) {
|
|
80246
|
-
return { value: value };
|
|
80247
|
-
}
|
|
80248
|
-
InlayHintLabelPart.create = create;
|
|
80249
|
-
function is(value) {
|
|
80250
|
-
var candidate = value;
|
|
80251
|
-
return Is.objectLiteral(candidate)
|
|
80252
|
-
&& (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
|
|
80253
|
-
&& (candidate.location === undefined || Location.is(candidate.location))
|
|
80254
|
-
&& (candidate.command === undefined || Command.is(candidate.command));
|
|
80255
|
-
}
|
|
80256
|
-
InlayHintLabelPart.is = is;
|
|
80257
|
-
})(InlayHintLabelPart || (InlayHintLabelPart = {}));
|
|
80258
|
-
var InlayHint;
|
|
80259
|
-
(function (InlayHint) {
|
|
80260
|
-
function create(position, label, kind) {
|
|
80261
|
-
var result = { position: position, label: label };
|
|
80262
|
-
if (kind !== undefined) {
|
|
80263
|
-
result.kind = kind;
|
|
80285
|
+
var InlayHintKind;
|
|
80286
|
+
(function (InlayHintKind) {
|
|
80287
|
+
/**
|
|
80288
|
+
* An inlay hint that for a type annotation.
|
|
80289
|
+
*/
|
|
80290
|
+
InlayHintKind.Type = 1;
|
|
80291
|
+
/**
|
|
80292
|
+
* An inlay hint that is for a parameter.
|
|
80293
|
+
*/
|
|
80294
|
+
InlayHintKind.Parameter = 2;
|
|
80295
|
+
function is(value) {
|
|
80296
|
+
return value === 1 || value === 2;
|
|
80297
|
+
}
|
|
80298
|
+
InlayHintKind.is = is;
|
|
80299
|
+
})(InlayHintKind || (exports.InlayHintKind = InlayHintKind = {}));
|
|
80300
|
+
var InlayHintLabelPart;
|
|
80301
|
+
(function (InlayHintLabelPart) {
|
|
80302
|
+
function create(value) {
|
|
80303
|
+
return { value: value };
|
|
80304
|
+
}
|
|
80305
|
+
InlayHintLabelPart.create = create;
|
|
80306
|
+
function is(value) {
|
|
80307
|
+
var candidate = value;
|
|
80308
|
+
return Is.objectLiteral(candidate)
|
|
80309
|
+
&& (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
|
|
80310
|
+
&& (candidate.location === undefined || Location.is(candidate.location))
|
|
80311
|
+
&& (candidate.command === undefined || Command.is(candidate.command));
|
|
80312
|
+
}
|
|
80313
|
+
InlayHintLabelPart.is = is;
|
|
80314
|
+
})(InlayHintLabelPart || (exports.InlayHintLabelPart = InlayHintLabelPart = {}));
|
|
80315
|
+
var InlayHint;
|
|
80316
|
+
(function (InlayHint) {
|
|
80317
|
+
function create(position, label, kind) {
|
|
80318
|
+
var result = { position: position, label: label };
|
|
80319
|
+
if (kind !== undefined) {
|
|
80320
|
+
result.kind = kind;
|
|
80321
|
+
}
|
|
80322
|
+
return result;
|
|
80264
80323
|
}
|
|
80265
|
-
|
|
80266
|
-
|
|
80267
|
-
|
|
80268
|
-
|
|
80269
|
-
|
|
80270
|
-
|
|
80271
|
-
|
|
80272
|
-
|
|
80273
|
-
|
|
80274
|
-
|
|
80275
|
-
|
|
80276
|
-
|
|
80277
|
-
}
|
|
80278
|
-
|
|
80279
|
-
|
|
80280
|
-
|
|
80281
|
-
|
|
80282
|
-
|
|
80283
|
-
|
|
80284
|
-
|
|
80285
|
-
|
|
80286
|
-
|
|
80287
|
-
|
|
80288
|
-
|
|
80289
|
-
|
|
80290
|
-
|
|
80291
|
-
|
|
80292
|
-
var
|
|
80293
|
-
(function (
|
|
80324
|
+
InlayHint.create = create;
|
|
80325
|
+
function is(value) {
|
|
80326
|
+
var candidate = value;
|
|
80327
|
+
return Is.objectLiteral(candidate) && Position.is(candidate.position)
|
|
80328
|
+
&& (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is))
|
|
80329
|
+
&& (candidate.kind === undefined || InlayHintKind.is(candidate.kind))
|
|
80330
|
+
&& (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is)
|
|
80331
|
+
&& (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
|
|
80332
|
+
&& (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft))
|
|
80333
|
+
&& (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight));
|
|
80334
|
+
}
|
|
80335
|
+
InlayHint.is = is;
|
|
80336
|
+
})(InlayHint || (exports.InlayHint = InlayHint = {}));
|
|
80337
|
+
var StringValue;
|
|
80338
|
+
(function (StringValue) {
|
|
80339
|
+
function createSnippet(value) {
|
|
80340
|
+
return { kind: 'snippet', value: value };
|
|
80341
|
+
}
|
|
80342
|
+
StringValue.createSnippet = createSnippet;
|
|
80343
|
+
})(StringValue || (exports.StringValue = StringValue = {}));
|
|
80344
|
+
var InlineCompletionItem;
|
|
80345
|
+
(function (InlineCompletionItem) {
|
|
80346
|
+
function create(insertText, filterText, range, command) {
|
|
80347
|
+
return { insertText: insertText, filterText: filterText, range: range, command: command };
|
|
80348
|
+
}
|
|
80349
|
+
InlineCompletionItem.create = create;
|
|
80350
|
+
})(InlineCompletionItem || (exports.InlineCompletionItem = InlineCompletionItem = {}));
|
|
80351
|
+
var InlineCompletionList;
|
|
80352
|
+
(function (InlineCompletionList) {
|
|
80353
|
+
function create(items) {
|
|
80354
|
+
return { items: items };
|
|
80355
|
+
}
|
|
80356
|
+
InlineCompletionList.create = create;
|
|
80357
|
+
})(InlineCompletionList || (exports.InlineCompletionList = InlineCompletionList = {}));
|
|
80294
80358
|
/**
|
|
80295
|
-
*
|
|
80296
|
-
*
|
|
80297
|
-
* @
|
|
80298
|
-
* @
|
|
80299
|
-
* @param content The document's content.
|
|
80359
|
+
* Describes how an {@link InlineCompletionItemProvider inline completion provider} was triggered.
|
|
80360
|
+
*
|
|
80361
|
+
* @since 3.18.0
|
|
80362
|
+
* @proposed
|
|
80300
80363
|
*/
|
|
80301
|
-
|
|
80302
|
-
|
|
80303
|
-
|
|
80304
|
-
|
|
80364
|
+
var InlineCompletionTriggerKind;
|
|
80365
|
+
(function (InlineCompletionTriggerKind) {
|
|
80366
|
+
/**
|
|
80367
|
+
* Completion was triggered explicitly by a user gesture.
|
|
80368
|
+
*/
|
|
80369
|
+
InlineCompletionTriggerKind.Invoked = 0;
|
|
80370
|
+
/**
|
|
80371
|
+
* Completion was triggered automatically while editing.
|
|
80372
|
+
*/
|
|
80373
|
+
InlineCompletionTriggerKind.Automatic = 1;
|
|
80374
|
+
})(InlineCompletionTriggerKind || (exports.InlineCompletionTriggerKind = InlineCompletionTriggerKind = {}));
|
|
80375
|
+
var SelectedCompletionInfo;
|
|
80376
|
+
(function (SelectedCompletionInfo) {
|
|
80377
|
+
function create(range, text) {
|
|
80378
|
+
return { range: range, text: text };
|
|
80379
|
+
}
|
|
80380
|
+
SelectedCompletionInfo.create = create;
|
|
80381
|
+
})(SelectedCompletionInfo || (exports.SelectedCompletionInfo = SelectedCompletionInfo = {}));
|
|
80382
|
+
var InlineCompletionContext;
|
|
80383
|
+
(function (InlineCompletionContext) {
|
|
80384
|
+
function create(triggerKind, selectedCompletionInfo) {
|
|
80385
|
+
return { triggerKind: triggerKind, selectedCompletionInfo: selectedCompletionInfo };
|
|
80386
|
+
}
|
|
80387
|
+
InlineCompletionContext.create = create;
|
|
80388
|
+
})(InlineCompletionContext || (exports.InlineCompletionContext = InlineCompletionContext = {}));
|
|
80389
|
+
var WorkspaceFolder;
|
|
80390
|
+
(function (WorkspaceFolder) {
|
|
80391
|
+
function is(value) {
|
|
80392
|
+
var candidate = value;
|
|
80393
|
+
return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);
|
|
80394
|
+
}
|
|
80395
|
+
WorkspaceFolder.is = is;
|
|
80396
|
+
})(WorkspaceFolder || (exports.WorkspaceFolder = WorkspaceFolder = {}));
|
|
80397
|
+
exports.EOL = ['\n', '\r\n', '\r'];
|
|
80305
80398
|
/**
|
|
80306
|
-
*
|
|
80399
|
+
* @deprecated Use the text document from the new vscode-languageserver-textdocument package.
|
|
80307
80400
|
*/
|
|
80308
|
-
|
|
80309
|
-
|
|
80310
|
-
|
|
80311
|
-
|
|
80312
|
-
|
|
80313
|
-
|
|
80314
|
-
|
|
80315
|
-
|
|
80316
|
-
|
|
80317
|
-
|
|
80318
|
-
|
|
80319
|
-
return a.range.start.character - b.range.start.character;
|
|
80320
|
-
}
|
|
80321
|
-
return diff;
|
|
80322
|
-
});
|
|
80323
|
-
var lastModifiedOffset = text.length;
|
|
80324
|
-
for (var i = sortedEdits.length - 1; i >= 0; i--) {
|
|
80325
|
-
var e = sortedEdits[i];
|
|
80326
|
-
var startOffset = document.offsetAt(e.range.start);
|
|
80327
|
-
var endOffset = document.offsetAt(e.range.end);
|
|
80328
|
-
if (endOffset <= lastModifiedOffset) {
|
|
80329
|
-
text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
|
|
80330
|
-
}
|
|
80331
|
-
else {
|
|
80332
|
-
throw new Error('Overlapping edit');
|
|
80333
|
-
}
|
|
80334
|
-
lastModifiedOffset = startOffset;
|
|
80335
|
-
}
|
|
80336
|
-
return text;
|
|
80337
|
-
}
|
|
80338
|
-
TextDocument.applyEdits = applyEdits;
|
|
80339
|
-
function mergeSort(data, compare) {
|
|
80340
|
-
if (data.length <= 1) {
|
|
80341
|
-
// sorted
|
|
80342
|
-
return data;
|
|
80401
|
+
var TextDocument;
|
|
80402
|
+
(function (TextDocument) {
|
|
80403
|
+
/**
|
|
80404
|
+
* Creates a new ITextDocument literal from the given uri and content.
|
|
80405
|
+
* @param uri The document's uri.
|
|
80406
|
+
* @param languageId The document's language Id.
|
|
80407
|
+
* @param version The document's version.
|
|
80408
|
+
* @param content The document's content.
|
|
80409
|
+
*/
|
|
80410
|
+
function create(uri, languageId, version, content) {
|
|
80411
|
+
return new FullTextDocument(uri, languageId, version, content);
|
|
80343
80412
|
}
|
|
80344
|
-
|
|
80345
|
-
|
|
80346
|
-
|
|
80347
|
-
|
|
80348
|
-
|
|
80349
|
-
|
|
80350
|
-
|
|
80351
|
-
|
|
80352
|
-
|
|
80353
|
-
|
|
80354
|
-
|
|
80355
|
-
|
|
80413
|
+
TextDocument.create = create;
|
|
80414
|
+
/**
|
|
80415
|
+
* Checks whether the given literal conforms to the {@link ITextDocument} interface.
|
|
80416
|
+
*/
|
|
80417
|
+
function is(value) {
|
|
80418
|
+
var candidate = value;
|
|
80419
|
+
return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)
|
|
80420
|
+
&& Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
|
|
80421
|
+
}
|
|
80422
|
+
TextDocument.is = is;
|
|
80423
|
+
function applyEdits(document, edits) {
|
|
80424
|
+
var text = document.getText();
|
|
80425
|
+
var sortedEdits = mergeSort(edits, function (a, b) {
|
|
80426
|
+
var diff = a.range.start.line - b.range.start.line;
|
|
80427
|
+
if (diff === 0) {
|
|
80428
|
+
return a.range.start.character - b.range.start.character;
|
|
80429
|
+
}
|
|
80430
|
+
return diff;
|
|
80431
|
+
});
|
|
80432
|
+
var lastModifiedOffset = text.length;
|
|
80433
|
+
for (var i = sortedEdits.length - 1; i >= 0; i--) {
|
|
80434
|
+
var e = sortedEdits[i];
|
|
80435
|
+
var startOffset = document.offsetAt(e.range.start);
|
|
80436
|
+
var endOffset = document.offsetAt(e.range.end);
|
|
80437
|
+
if (endOffset <= lastModifiedOffset) {
|
|
80438
|
+
text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
|
|
80439
|
+
}
|
|
80440
|
+
else {
|
|
80441
|
+
throw new Error('Overlapping edit');
|
|
80442
|
+
}
|
|
80443
|
+
lastModifiedOffset = startOffset;
|
|
80444
|
+
}
|
|
80445
|
+
return text;
|
|
80446
|
+
}
|
|
80447
|
+
TextDocument.applyEdits = applyEdits;
|
|
80448
|
+
function mergeSort(data, compare) {
|
|
80449
|
+
if (data.length <= 1) {
|
|
80450
|
+
// sorted
|
|
80451
|
+
return data;
|
|
80452
|
+
}
|
|
80453
|
+
var p = (data.length / 2) | 0;
|
|
80454
|
+
var left = data.slice(0, p);
|
|
80455
|
+
var right = data.slice(p);
|
|
80456
|
+
mergeSort(left, compare);
|
|
80457
|
+
mergeSort(right, compare);
|
|
80458
|
+
var leftIdx = 0;
|
|
80459
|
+
var rightIdx = 0;
|
|
80460
|
+
var i = 0;
|
|
80461
|
+
while (leftIdx < left.length && rightIdx < right.length) {
|
|
80462
|
+
var ret = compare(left[leftIdx], right[rightIdx]);
|
|
80463
|
+
if (ret <= 0) {
|
|
80464
|
+
// smaller_equal -> take left to preserve order
|
|
80465
|
+
data[i++] = left[leftIdx++];
|
|
80466
|
+
}
|
|
80467
|
+
else {
|
|
80468
|
+
// greater -> take right
|
|
80469
|
+
data[i++] = right[rightIdx++];
|
|
80470
|
+
}
|
|
80471
|
+
}
|
|
80472
|
+
while (leftIdx < left.length) {
|
|
80356
80473
|
data[i++] = left[leftIdx++];
|
|
80357
80474
|
}
|
|
80358
|
-
|
|
80359
|
-
// greater -> take right
|
|
80475
|
+
while (rightIdx < right.length) {
|
|
80360
80476
|
data[i++] = right[rightIdx++];
|
|
80361
80477
|
}
|
|
80478
|
+
return data;
|
|
80362
80479
|
}
|
|
80363
|
-
|
|
80364
|
-
|
|
80365
|
-
|
|
80366
|
-
|
|
80367
|
-
|
|
80368
|
-
|
|
80369
|
-
|
|
80370
|
-
|
|
80371
|
-
|
|
80372
|
-
|
|
80373
|
-
|
|
80374
|
-
|
|
80375
|
-
|
|
80376
|
-
|
|
80377
|
-
|
|
80378
|
-
|
|
80379
|
-
|
|
80380
|
-
|
|
80381
|
-
|
|
80382
|
-
|
|
80383
|
-
|
|
80384
|
-
|
|
80385
|
-
|
|
80386
|
-
|
|
80387
|
-
|
|
80388
|
-
|
|
80389
|
-
|
|
80390
|
-
|
|
80391
|
-
|
|
80392
|
-
|
|
80393
|
-
|
|
80394
|
-
|
|
80395
|
-
|
|
80396
|
-
|
|
80397
|
-
|
|
80398
|
-
|
|
80399
|
-
|
|
80400
|
-
|
|
80401
|
-
|
|
80402
|
-
|
|
80403
|
-
|
|
80404
|
-
|
|
80405
|
-
|
|
80406
|
-
|
|
80407
|
-
|
|
80408
|
-
|
|
80409
|
-
|
|
80410
|
-
|
|
80411
|
-
|
|
80412
|
-
|
|
80413
|
-
|
|
80414
|
-
|
|
80415
|
-
|
|
80416
|
-
|
|
80417
|
-
|
|
80418
|
-
|
|
80419
|
-
|
|
80420
|
-
|
|
80421
|
-
|
|
80422
|
-
|
|
80423
|
-
|
|
80424
|
-
lineOffsets.push(i);
|
|
80425
|
-
isLineStart = false;
|
|
80480
|
+
})(TextDocument || (exports.TextDocument = TextDocument = {}));
|
|
80481
|
+
/**
|
|
80482
|
+
* @deprecated Use the text document from the new vscode-languageserver-textdocument package.
|
|
80483
|
+
*/
|
|
80484
|
+
var FullTextDocument = /** @class */ (function () {
|
|
80485
|
+
function FullTextDocument(uri, languageId, version, content) {
|
|
80486
|
+
this._uri = uri;
|
|
80487
|
+
this._languageId = languageId;
|
|
80488
|
+
this._version = version;
|
|
80489
|
+
this._content = content;
|
|
80490
|
+
this._lineOffsets = undefined;
|
|
80491
|
+
}
|
|
80492
|
+
Object.defineProperty(FullTextDocument.prototype, "uri", {
|
|
80493
|
+
get: function () {
|
|
80494
|
+
return this._uri;
|
|
80495
|
+
},
|
|
80496
|
+
enumerable: false,
|
|
80497
|
+
configurable: true
|
|
80498
|
+
});
|
|
80499
|
+
Object.defineProperty(FullTextDocument.prototype, "languageId", {
|
|
80500
|
+
get: function () {
|
|
80501
|
+
return this._languageId;
|
|
80502
|
+
},
|
|
80503
|
+
enumerable: false,
|
|
80504
|
+
configurable: true
|
|
80505
|
+
});
|
|
80506
|
+
Object.defineProperty(FullTextDocument.prototype, "version", {
|
|
80507
|
+
get: function () {
|
|
80508
|
+
return this._version;
|
|
80509
|
+
},
|
|
80510
|
+
enumerable: false,
|
|
80511
|
+
configurable: true
|
|
80512
|
+
});
|
|
80513
|
+
FullTextDocument.prototype.getText = function (range) {
|
|
80514
|
+
if (range) {
|
|
80515
|
+
var start = this.offsetAt(range.start);
|
|
80516
|
+
var end = this.offsetAt(range.end);
|
|
80517
|
+
return this._content.substring(start, end);
|
|
80518
|
+
}
|
|
80519
|
+
return this._content;
|
|
80520
|
+
};
|
|
80521
|
+
FullTextDocument.prototype.update = function (event, version) {
|
|
80522
|
+
this._content = event.text;
|
|
80523
|
+
this._version = version;
|
|
80524
|
+
this._lineOffsets = undefined;
|
|
80525
|
+
};
|
|
80526
|
+
FullTextDocument.prototype.getLineOffsets = function () {
|
|
80527
|
+
if (this._lineOffsets === undefined) {
|
|
80528
|
+
var lineOffsets = [];
|
|
80529
|
+
var text = this._content;
|
|
80530
|
+
var isLineStart = true;
|
|
80531
|
+
for (var i = 0; i < text.length; i++) {
|
|
80532
|
+
if (isLineStart) {
|
|
80533
|
+
lineOffsets.push(i);
|
|
80534
|
+
isLineStart = false;
|
|
80535
|
+
}
|
|
80536
|
+
var ch = text.charAt(i);
|
|
80537
|
+
isLineStart = (ch === '\r' || ch === '\n');
|
|
80538
|
+
if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
|
|
80539
|
+
i++;
|
|
80540
|
+
}
|
|
80426
80541
|
}
|
|
80427
|
-
|
|
80428
|
-
|
|
80429
|
-
if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
|
|
80430
|
-
i++;
|
|
80542
|
+
if (isLineStart && text.length > 0) {
|
|
80543
|
+
lineOffsets.push(text.length);
|
|
80431
80544
|
}
|
|
80545
|
+
this._lineOffsets = lineOffsets;
|
|
80432
80546
|
}
|
|
80433
|
-
|
|
80434
|
-
|
|
80547
|
+
return this._lineOffsets;
|
|
80548
|
+
};
|
|
80549
|
+
FullTextDocument.prototype.positionAt = function (offset) {
|
|
80550
|
+
offset = Math.max(Math.min(offset, this._content.length), 0);
|
|
80551
|
+
var lineOffsets = this.getLineOffsets();
|
|
80552
|
+
var low = 0, high = lineOffsets.length;
|
|
80553
|
+
if (high === 0) {
|
|
80554
|
+
return Position.create(0, offset);
|
|
80555
|
+
}
|
|
80556
|
+
while (low < high) {
|
|
80557
|
+
var mid = Math.floor((low + high) / 2);
|
|
80558
|
+
if (lineOffsets[mid] > offset) {
|
|
80559
|
+
high = mid;
|
|
80560
|
+
}
|
|
80561
|
+
else {
|
|
80562
|
+
low = mid + 1;
|
|
80563
|
+
}
|
|
80435
80564
|
}
|
|
80436
|
-
|
|
80437
|
-
|
|
80438
|
-
|
|
80439
|
-
|
|
80440
|
-
|
|
80441
|
-
|
|
80442
|
-
|
|
80443
|
-
|
|
80444
|
-
|
|
80445
|
-
return Position.create(0, offset);
|
|
80446
|
-
}
|
|
80447
|
-
while (low < high) {
|
|
80448
|
-
var mid = Math.floor((low + high) / 2);
|
|
80449
|
-
if (lineOffsets[mid] > offset) {
|
|
80450
|
-
high = mid;
|
|
80565
|
+
// low is the least x for which the line offset is larger than the current offset
|
|
80566
|
+
// or array.length if no line offset is larger than the current offset
|
|
80567
|
+
var line = low - 1;
|
|
80568
|
+
return Position.create(line, offset - lineOffsets[line]);
|
|
80569
|
+
};
|
|
80570
|
+
FullTextDocument.prototype.offsetAt = function (position) {
|
|
80571
|
+
var lineOffsets = this.getLineOffsets();
|
|
80572
|
+
if (position.line >= lineOffsets.length) {
|
|
80573
|
+
return this._content.length;
|
|
80451
80574
|
}
|
|
80452
|
-
else {
|
|
80453
|
-
|
|
80575
|
+
else if (position.line < 0) {
|
|
80576
|
+
return 0;
|
|
80454
80577
|
}
|
|
80455
|
-
|
|
80456
|
-
|
|
80457
|
-
|
|
80458
|
-
|
|
80459
|
-
|
|
80460
|
-
|
|
80461
|
-
|
|
80462
|
-
|
|
80463
|
-
|
|
80464
|
-
|
|
80465
|
-
}
|
|
80466
|
-
|
|
80467
|
-
|
|
80468
|
-
|
|
80469
|
-
|
|
80470
|
-
var
|
|
80471
|
-
|
|
80472
|
-
|
|
80473
|
-
|
|
80474
|
-
|
|
80475
|
-
|
|
80476
|
-
|
|
80477
|
-
|
|
80478
|
-
|
|
80479
|
-
|
|
80480
|
-
|
|
80481
|
-
}
|
|
80482
|
-
|
|
80483
|
-
|
|
80484
|
-
|
|
80485
|
-
|
|
80486
|
-
|
|
80487
|
-
|
|
80488
|
-
|
|
80489
|
-
|
|
80490
|
-
|
|
80491
|
-
|
|
80492
|
-
|
|
80493
|
-
|
|
80494
|
-
|
|
80495
|
-
|
|
80496
|
-
|
|
80497
|
-
|
|
80498
|
-
|
|
80499
|
-
|
|
80500
|
-
|
|
80501
|
-
|
|
80502
|
-
|
|
80503
|
-
|
|
80504
|
-
|
|
80505
|
-
|
|
80506
|
-
|
|
80507
|
-
|
|
80508
|
-
|
|
80509
|
-
|
|
80510
|
-
|
|
80511
|
-
|
|
80512
|
-
|
|
80513
|
-
|
|
80514
|
-
|
|
80515
|
-
|
|
80516
|
-
|
|
80517
|
-
|
|
80518
|
-
|
|
80519
|
-
|
|
80520
|
-
Is.func = func;
|
|
80521
|
-
function objectLiteral(value) {
|
|
80522
|
-
// Strictly speaking class instances pass this check as well. Since the LSP
|
|
80523
|
-
// doesn't use classes we ignore this for now. If we do we need to add something
|
|
80524
|
-
// like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
|
|
80525
|
-
return value !== null && typeof value === 'object';
|
|
80526
|
-
}
|
|
80527
|
-
Is.objectLiteral = objectLiteral;
|
|
80528
|
-
function typedArray(value, check) {
|
|
80529
|
-
return Array.isArray(value) && value.every(check);
|
|
80530
|
-
}
|
|
80531
|
-
Is.typedArray = typedArray;
|
|
80532
|
-
})(Is || (Is = {}));
|
|
80578
|
+
var lineOffset = lineOffsets[position.line];
|
|
80579
|
+
var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
|
|
80580
|
+
return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
|
|
80581
|
+
};
|
|
80582
|
+
Object.defineProperty(FullTextDocument.prototype, "lineCount", {
|
|
80583
|
+
get: function () {
|
|
80584
|
+
return this.getLineOffsets().length;
|
|
80585
|
+
},
|
|
80586
|
+
enumerable: false,
|
|
80587
|
+
configurable: true
|
|
80588
|
+
});
|
|
80589
|
+
return FullTextDocument;
|
|
80590
|
+
}());
|
|
80591
|
+
var Is;
|
|
80592
|
+
(function (Is) {
|
|
80593
|
+
var toString = Object.prototype.toString;
|
|
80594
|
+
function defined(value) {
|
|
80595
|
+
return typeof value !== 'undefined';
|
|
80596
|
+
}
|
|
80597
|
+
Is.defined = defined;
|
|
80598
|
+
function undefined(value) {
|
|
80599
|
+
return typeof value === 'undefined';
|
|
80600
|
+
}
|
|
80601
|
+
Is.undefined = undefined;
|
|
80602
|
+
function boolean(value) {
|
|
80603
|
+
return value === true || value === false;
|
|
80604
|
+
}
|
|
80605
|
+
Is.boolean = boolean;
|
|
80606
|
+
function string(value) {
|
|
80607
|
+
return toString.call(value) === '[object String]';
|
|
80608
|
+
}
|
|
80609
|
+
Is.string = string;
|
|
80610
|
+
function number(value) {
|
|
80611
|
+
return toString.call(value) === '[object Number]';
|
|
80612
|
+
}
|
|
80613
|
+
Is.number = number;
|
|
80614
|
+
function numberRange(value, min, max) {
|
|
80615
|
+
return toString.call(value) === '[object Number]' && min <= value && value <= max;
|
|
80616
|
+
}
|
|
80617
|
+
Is.numberRange = numberRange;
|
|
80618
|
+
function integer(value) {
|
|
80619
|
+
return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;
|
|
80620
|
+
}
|
|
80621
|
+
Is.integer = integer;
|
|
80622
|
+
function uinteger(value) {
|
|
80623
|
+
return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;
|
|
80624
|
+
}
|
|
80625
|
+
Is.uinteger = uinteger;
|
|
80626
|
+
function func(value) {
|
|
80627
|
+
return toString.call(value) === '[object Function]';
|
|
80628
|
+
}
|
|
80629
|
+
Is.func = func;
|
|
80630
|
+
function objectLiteral(value) {
|
|
80631
|
+
// Strictly speaking class instances pass this check as well. Since the LSP
|
|
80632
|
+
// doesn't use classes we ignore this for now. If we do we need to add something
|
|
80633
|
+
// like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
|
|
80634
|
+
return value !== null && typeof value === 'object';
|
|
80635
|
+
}
|
|
80636
|
+
Is.objectLiteral = objectLiteral;
|
|
80637
|
+
function typedArray(value, check) {
|
|
80638
|
+
return Array.isArray(value) && value.every(check);
|
|
80639
|
+
}
|
|
80640
|
+
Is.typedArray = typedArray;
|
|
80641
|
+
})(Is || (Is = {}));
|
|
80642
|
+
});
|
|
80533
80643
|
|
|
80534
80644
|
|
|
80645
|
+
/***/ }),
|
|
80646
|
+
|
|
80647
|
+
/***/ "./node_modules/vscode-languageserver-types/lib/umd sync recursive":
|
|
80648
|
+
/*!****************************************************************!*\
|
|
80649
|
+
!*** ./node_modules/vscode-languageserver-types/lib/umd/ sync ***!
|
|
80650
|
+
\****************************************************************/
|
|
80651
|
+
/***/ ((module) => {
|
|
80652
|
+
|
|
80653
|
+
function webpackEmptyContext(req) {
|
|
80654
|
+
var e = new Error("Cannot find module '" + req + "'");
|
|
80655
|
+
e.code = 'MODULE_NOT_FOUND';
|
|
80656
|
+
throw e;
|
|
80657
|
+
}
|
|
80658
|
+
webpackEmptyContext.keys = () => ([]);
|
|
80659
|
+
webpackEmptyContext.resolve = webpackEmptyContext;
|
|
80660
|
+
webpackEmptyContext.id = "./node_modules/vscode-languageserver-types/lib/umd sync recursive";
|
|
80661
|
+
module.exports = webpackEmptyContext;
|
|
80662
|
+
|
|
80535
80663
|
/***/ }),
|
|
80536
80664
|
|
|
80537
80665
|
/***/ "./node_modules/wrappy/wrappy.js":
|