dot-language-support 1.6.2 → 1.7.0
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/lib/parser.d.ts +1 -1
- package/lib/parser.js +5 -3
- package/lib/service/codeAction.d.ts +1 -1
- package/lib/service/codeAction.js +31 -8
- package/lib/service/colorProvider.d.ts +1 -1
- package/lib/service/colorProvider.js +25 -2
- package/lib/service/command/ChangeAllOtherEdgeOpsAndFixGraphCommand.d.ts +1 -1
- package/lib/service/command/ChangeAllOtherEdgeOpsAndFixGraphCommand.js +1 -1
- package/lib/service/command/ChangeEdgeOpCommand.d.ts +1 -1
- package/lib/service/command/ChangeEdgeOpCommand.js +25 -2
- package/lib/service/command/ConsolidateDescendantsCommand.js +0 -18
- package/lib/service/command/common.d.ts +2 -2
- package/lib/service/command/common.js +2 -2
- package/lib/service/completion.js +25 -2
- package/lib/service/reference.js +0 -2
- package/lib/service/util.d.ts +5 -5
- package/lib/service/util.js +2 -2
- package/package.json +1 -1
package/lib/parser.d.ts
CHANGED
|
@@ -81,4 +81,4 @@ export declare class Parser {
|
|
|
81
81
|
private tryParse;
|
|
82
82
|
}
|
|
83
83
|
export declare function isIdentifier(kind: SyntaxKind): boolean;
|
|
84
|
-
export declare function isIdentifierNode
|
|
84
|
+
export declare function isIdentifierNode(node: SyntaxNode): node is Identifier;
|
package/lib/parser.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isIdentifierNode = exports.isIdentifier = exports.Parser = exports.ParsingContext = void 0;
|
|
4
4
|
const scanner_1 = require("./scanner");
|
|
5
|
+
const util_1 = require("./service/util");
|
|
5
6
|
const types_1 = require("./types");
|
|
6
7
|
var ParsingContext;
|
|
7
8
|
(function (ParsingContext) {
|
|
@@ -425,8 +426,9 @@ class Parser {
|
|
|
425
426
|
return "Wat, no parsing context";
|
|
426
427
|
case ParsingContext.Count:
|
|
427
428
|
return "Wat, 'Count' parsing context";
|
|
429
|
+
default:
|
|
430
|
+
return (0, util_1.assertNever)(context);
|
|
428
431
|
}
|
|
429
|
-
return "Error parsing list";
|
|
430
432
|
}
|
|
431
433
|
isInSomeParsingContext() {
|
|
432
434
|
for (let ctx = 0; ctx < ParsingContext.Count; ctx++) {
|
|
@@ -446,7 +448,7 @@ class Parser {
|
|
|
446
448
|
this.nextToken();
|
|
447
449
|
return false;
|
|
448
450
|
}
|
|
449
|
-
isListElement(context,
|
|
451
|
+
isListElement(context, _inErrorRecovery) {
|
|
450
452
|
switch (context) {
|
|
451
453
|
case ParsingContext.AssignmentList:
|
|
452
454
|
return this.isIdentifier();
|
|
@@ -544,7 +546,7 @@ class Parser {
|
|
|
544
546
|
};
|
|
545
547
|
return this.parseErrorAtPosition(this.scanner.tokenPos, this.scanner.pos, message, error);
|
|
546
548
|
}
|
|
547
|
-
scanError(message,
|
|
549
|
+
scanError(message, _category, sub, length) {
|
|
548
550
|
const errorPos = this.scanner.pos;
|
|
549
551
|
const err = {
|
|
550
552
|
source: 1,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as lst from "vscode-languageserver-types";
|
|
2
2
|
import { DocumentLike, SourceFile, CommandApplication } from "../";
|
|
3
3
|
import { ExecutableCommand } from "./command/common";
|
|
4
|
-
export declare function getCodeActions(doc: DocumentLike, sourceFile: SourceFile, range: lst.Range,
|
|
4
|
+
export declare function getCodeActions(doc: DocumentLike, sourceFile: SourceFile, range: lst.Range, _context?: lst.CodeActionContext): lst.Command[] | undefined;
|
|
5
5
|
export declare const enum CommandIds {
|
|
6
6
|
ChangeEdgeOp = "DOT.changeEdgeOp",
|
|
7
7
|
ConvertGraphType = "DOT.convertGraphType",
|
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.executeCommand = exports.getAvailableCommands = exports.getCodeActions = void 0;
|
|
4
27
|
const __1 = require("../");
|
|
5
28
|
const util_1 = require("./util");
|
|
6
29
|
const checker_1 = require("../checker");
|
|
7
|
-
const ChangeEdgeOpCommand = require("./command/ChangeEdgeOpCommand");
|
|
8
|
-
const ChangeAllOtherEdgeOpsAndFixGraphCommand = require("./command/ChangeAllOtherEdgeOpsAndFixGraphCommand");
|
|
9
|
-
const ConsolidateDescendantsCommand = require("./command/ConsolidateDescendantsCommand");
|
|
10
|
-
const RemoveSemicolonsCommand = require("./command/RemoveSemicolons");
|
|
30
|
+
const ChangeEdgeOpCommand = __importStar(require("./command/ChangeEdgeOpCommand"));
|
|
31
|
+
const ChangeAllOtherEdgeOpsAndFixGraphCommand = __importStar(require("./command/ChangeAllOtherEdgeOpsAndFixGraphCommand"));
|
|
32
|
+
const ConsolidateDescendantsCommand = __importStar(require("./command/ConsolidateDescendantsCommand"));
|
|
33
|
+
const RemoveSemicolonsCommand = __importStar(require("./command/RemoveSemicolons"));
|
|
11
34
|
const common_1 = require("./command/common");
|
|
12
|
-
function getCodeActions(doc, sourceFile, range,
|
|
35
|
+
function getCodeActions(doc, sourceFile, range, _context) {
|
|
13
36
|
let actions = getActionsFromDiagnostics(doc, sourceFile, range);
|
|
14
37
|
const general = getGeneralRefactorings(doc, sourceFile, range);
|
|
15
38
|
if (general) {
|
|
@@ -126,17 +149,17 @@ function getCommandsForDiagnostic(doc, file, d) {
|
|
|
126
149
|
default: return (0, util_1.assertNever)(d.code);
|
|
127
150
|
}
|
|
128
151
|
}
|
|
129
|
-
function getScannerErrorCommand(
|
|
152
|
+
function getScannerErrorCommand(_doc, _file, d, code) {
|
|
130
153
|
console.assert(d.code.source === 1);
|
|
131
154
|
console.assert(code.source === 1);
|
|
132
155
|
return undefined;
|
|
133
156
|
}
|
|
134
|
-
function getParserErrorCommand(
|
|
157
|
+
function getParserErrorCommand(_doc, _file, d, code) {
|
|
135
158
|
console.assert(d.code.source === 2);
|
|
136
159
|
console.assert(code.source === 2);
|
|
137
160
|
return undefined;
|
|
138
161
|
}
|
|
139
|
-
function getCheckerErrorCommand(
|
|
162
|
+
function getCheckerErrorCommand(_doc, file, d, code) {
|
|
140
163
|
console.assert(d.code.source === 4);
|
|
141
164
|
console.assert(code.source === 4);
|
|
142
165
|
switch (code.sub) {
|
|
@@ -3,4 +3,4 @@ import { ColorInformation, Color, ColorPresentation } from "./polyfill";
|
|
|
3
3
|
import { SourceFile } from "../types";
|
|
4
4
|
import { DocumentLike } from "../";
|
|
5
5
|
export declare function getDocumentColors(doc: DocumentLike, sourceFile: SourceFile): ColorInformation[] | undefined;
|
|
6
|
-
export declare function getColorRepresentations(
|
|
6
|
+
export declare function getColorRepresentations(_doc: DocumentLike, _sourceFile: SourceFile, color: Color, range: lst.Range): ColorPresentation[] | undefined;
|
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.getColorRepresentations = exports.getDocumentColors = void 0;
|
|
4
27
|
const util_1 = require("./util");
|
|
5
|
-
const languageFacts = require("./languageFacts");
|
|
28
|
+
const languageFacts = __importStar(require("./languageFacts"));
|
|
6
29
|
const colorMap = languageFacts.colors;
|
|
7
30
|
function getDocumentColors(doc, sourceFile) {
|
|
8
31
|
const cs = sourceFile.colors;
|
|
@@ -11,7 +34,7 @@ function getDocumentColors(doc, sourceFile) {
|
|
|
11
34
|
: undefined;
|
|
12
35
|
}
|
|
13
36
|
exports.getDocumentColors = getDocumentColors;
|
|
14
|
-
function getColorRepresentations(
|
|
37
|
+
function getColorRepresentations(_doc, _sourceFile, color, range) {
|
|
15
38
|
if (!color || !range)
|
|
16
39
|
return undefined;
|
|
17
40
|
const hexColor = getColorStringFromColor(color);
|
|
@@ -7,4 +7,4 @@ export interface ChangeAllOtherEdgeOpsAndFixGraphCommand extends lst.Command {
|
|
|
7
7
|
arguments: [Offset[], EdgeOpStr, Offset, GraphTypeStr];
|
|
8
8
|
}
|
|
9
9
|
export declare function create(edgeOffsets: Offset[], changeEdgesTo: EdgeType, graphOffset: Offset, changeFromGraph: GraphType, changeGraphTo: GraphType): ChangeAllOtherEdgeOpsAndFixGraphCommand;
|
|
10
|
-
export declare function execute(doc: DocumentLike,
|
|
10
|
+
export declare function execute(doc: DocumentLike, _sourceFile: SourceFile, cmd: ExecutableCommand): CommandApplication | undefined;
|
|
@@ -15,7 +15,7 @@ function create(edgeOffsets, changeEdgesTo, graphOffset, changeFromGraph, change
|
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
exports.create = create;
|
|
18
|
-
function execute(doc,
|
|
18
|
+
function execute(doc, _sourceFile, cmd) {
|
|
19
19
|
if (!isChangeAllOtherEdgeOpsAndFixGraphCommand(cmd))
|
|
20
20
|
return undefined;
|
|
21
21
|
const [edgeOffsets, changeEdgeTo, graphOffset, changeGraphTo] = cmd.arguments;
|
|
@@ -7,4 +7,4 @@ export interface ChangeEdgeOpCommand extends lst.Command {
|
|
|
7
7
|
arguments: [number, number, EdgeOpStr];
|
|
8
8
|
}
|
|
9
9
|
export declare function create(startOffset: number, endOffset: number, changeTo: EdgeType, changeFrom: EdgeType): ChangeEdgeOpCommand;
|
|
10
|
-
export declare function execute(doc: DocumentLike,
|
|
10
|
+
export declare function execute(doc: DocumentLike, _sourceFile: SourceFile, cmd: ExecutableCommand): CommandApplication | undefined;
|
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.execute = exports.create = void 0;
|
|
4
|
-
const lst = require("vscode-languageserver-types");
|
|
27
|
+
const lst = __importStar(require("vscode-languageserver-types"));
|
|
5
28
|
const common_1 = require("./common");
|
|
6
29
|
function create(startOffset, endOffset, changeTo, changeFrom) {
|
|
7
30
|
const from = (0, common_1.getEdgeStr)(changeFrom);
|
|
@@ -13,7 +36,7 @@ function create(startOffset, endOffset, changeTo, changeFrom) {
|
|
|
13
36
|
};
|
|
14
37
|
}
|
|
15
38
|
exports.create = create;
|
|
16
|
-
function execute(doc,
|
|
39
|
+
function execute(doc, _sourceFile, cmd) {
|
|
17
40
|
if (!isChangeEdgeOpCommand(cmd))
|
|
18
41
|
return undefined;
|
|
19
42
|
const [startOffset, endOffset, changeTo] = cmd.arguments;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.execute = exports.create = void 0;
|
|
15
4
|
const checker_1 = require("../../checker");
|
|
@@ -27,13 +16,6 @@ function create(statements, below) {
|
|
|
27
16
|
};
|
|
28
17
|
}
|
|
29
18
|
exports.create = create;
|
|
30
|
-
function unbind(statements) {
|
|
31
|
-
const res = [];
|
|
32
|
-
for (const statement of statements) {
|
|
33
|
-
const { parent } = statement, copy = __rest(statement, ["parent"]);
|
|
34
|
-
}
|
|
35
|
-
return res;
|
|
36
|
-
}
|
|
37
19
|
function execute(doc, sourceFile, cmd) {
|
|
38
20
|
if (!isConsolidateDescendantsCommand(cmd))
|
|
39
21
|
return undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TextEdit, type Position } from "vscode-languageserver-types";
|
|
2
2
|
import { SyntaxKind } from "../../";
|
|
3
3
|
import { CommandIds } from "../codeAction";
|
|
4
|
-
export declare function createChangeToEdit(start:
|
|
4
|
+
export declare function createChangeToEdit(start: Position, end: Position, changeTo: string): TextEdit;
|
|
5
5
|
export interface Offset {
|
|
6
6
|
start: number;
|
|
7
7
|
end: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAllowedOp = exports.getOppositeEdgeOp = exports.getOppositeKind = exports.getGraphKeywordStr = exports.getEdgeStr = exports.createChangeToEdit = void 0;
|
|
4
|
-
const
|
|
4
|
+
const vscode_languageserver_types_1 = require("vscode-languageserver-types");
|
|
5
5
|
const __1 = require("../../");
|
|
6
6
|
function createChangeToEdit(start, end, changeTo) {
|
|
7
|
-
return
|
|
7
|
+
return vscode_languageserver_types_1.TextEdit.replace(vscode_languageserver_types_1.Range.create(start, end), changeTo);
|
|
8
8
|
}
|
|
9
9
|
exports.createChangeToEdit = createChangeToEdit;
|
|
10
10
|
;
|
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.getCompletions = void 0;
|
|
4
|
-
const lst = require("vscode-languageserver-types");
|
|
27
|
+
const lst = __importStar(require("vscode-languageserver-types"));
|
|
5
28
|
const types_1 = require("../types");
|
|
6
29
|
const checker_1 = require("../checker");
|
|
7
30
|
const util_1 = require("./util");
|
|
8
31
|
const __1 = require("../");
|
|
9
|
-
const languageFacts = require("./languageFacts");
|
|
32
|
+
const languageFacts = __importStar(require("./languageFacts"));
|
|
10
33
|
function getCompletions(doc, sourceFile, position) {
|
|
11
34
|
const symbols = sourceFile.symbols;
|
|
12
35
|
if (!symbols)
|
package/lib/service/reference.js
CHANGED
|
@@ -58,8 +58,6 @@ function findDefinition(doc, sourceFile, position) {
|
|
|
58
58
|
const nodeSymbol = node.symbol;
|
|
59
59
|
if (!nodeSymbol)
|
|
60
60
|
throw "node.symbol is not bound";
|
|
61
|
-
const refs = nodeSymbol.references || [];
|
|
62
|
-
let symbolRefs;
|
|
63
61
|
const firstMention = nodeSymbol.firstMention;
|
|
64
62
|
if (!firstMention)
|
|
65
63
|
return undefined;
|
package/lib/service/util.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Range } from "vscode-languageserver-types";
|
|
2
2
|
import { SourceFile, SyntaxNode } from "../types";
|
|
3
3
|
import type { DocumentLike } from "../";
|
|
4
4
|
export declare function getStart(sourceFile: SourceFile, node: SyntaxNode): number;
|
|
5
|
-
export declare function syntaxNodesToRanges(doc: DocumentLike, sourceFile: SourceFile, nodes: SyntaxNode[]):
|
|
5
|
+
export declare function syntaxNodesToRanges(doc: DocumentLike, sourceFile: SourceFile, nodes: SyntaxNode[]): Range[];
|
|
6
6
|
export declare function syntaxNodeToRange(doc: DocumentLike, sourceFile: SourceFile, node: SyntaxNode): {
|
|
7
|
-
start:
|
|
8
|
-
end:
|
|
7
|
+
start: import("vscode-languageserver-types").Position;
|
|
8
|
+
end: import("vscode-languageserver-types").Position;
|
|
9
9
|
};
|
|
10
10
|
export declare function escapeIdentifierText(text: string): string;
|
|
11
|
-
export declare function assertNever(
|
|
11
|
+
export declare function assertNever(v: never): never;
|
package/lib/service/util.js
CHANGED
|
@@ -45,8 +45,8 @@ function escapeIdentifierText(text) {
|
|
|
45
45
|
}
|
|
46
46
|
exports.escapeIdentifierText = escapeIdentifierText;
|
|
47
47
|
const quote = (s) => "\"" + s + "\"";
|
|
48
|
-
function assertNever(
|
|
49
|
-
throw new Error("
|
|
48
|
+
function assertNever(v) {
|
|
49
|
+
throw new Error("Should not have reached this. Value: " + (v !== null && v !== void 0 ? v : ""));
|
|
50
50
|
}
|
|
51
51
|
exports.assertNever = assertNever;
|
|
52
52
|
//# sourceMappingURL=util.js.map
|