likec4 1.59.3 → 1.59.4
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/__app__/src/chunks/AIChat.mjs +108 -108
- package/__app__/src/chunks/LikeC4Styles.mjs +752 -604
- package/__app__/src/chunks/ProjectsOverview.mjs +72 -72
- package/__app__/src/chunks/es.mjs +1 -1
- package/__app__/src/chunks/hooks.mjs +94 -91
- package/__app__/src/chunks/libs/@floating-ui.mjs +3 -3
- package/__app__/src/chunks/libs/@mantine.mjs +1609 -892
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +2 -2
- package/__app__/src/chunks/libs/@tanstack.mjs +4 -10
- package/__app__/src/chunks/libs/@xyflow/react.mjs +4 -4
- package/__app__/src/chunks/libs/d3.mjs +4 -9
- package/__app__/src/chunks/libs/fast-equals.mjs +61 -49
- package/__app__/src/chunks/libs/framer.mjs +6 -6
- package/__app__/src/chunks/styled-system.mjs +2578 -124
- package/__app__/src/main.mjs +21537 -20155
- package/__app__/src/style.css +1 -1
- package/config/schema.json +14 -0
- package/dist/app/render-view-client.css +1 -1
- package/dist/app/render-view-client.js +99 -105
- package/dist/chunks/filenames.mjs +6 -6
- package/dist/chunks/index.d.mts +7 -1
- package/dist/chunks/index2.d.mts +38 -21
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@chevrotain/types.d.mts +108 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -4
- package/dist/chunks/libs/langium.d.mts +1777 -16
- package/dist/chunks/libs/langium.mjs +4 -4
- package/dist/chunks/libs/p-queue.mjs +1 -1
- package/dist/chunks/libs/package-manager-detector.mjs +1 -1
- package/dist/chunks/libs/pako.mjs +2 -2
- package/dist/chunks/libs/picomatch.mjs +1 -1
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ufo.mjs +1 -1
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/zod.d.mts +1717 -17
- package/dist/chunks/node.mjs +58 -59
- package/dist/chunks/vite-plugin.mjs +15 -12
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +104 -88
- package/dist/index.d.mts +3 -3
- package/dist/model/index.d.mts +4 -4
- package/dist/vite-plugin/index.d.mts +2 -2
- package/dist/vite-plugin/internal/index.d.mts +15 -15
- package/dist/vite-plugin/internal/index.mjs +72 -27
- package/package.json +28 -28
- package/react/index.d.mts +22720 -1460
- package/react/index.mjs +30391 -25072
- package/vite-plugin-modules.d.ts +4 -2
|
@@ -1,5 +1,54 @@
|
|
|
1
|
-
import { i as __name } from "../rolldown-runtime.mjs";
|
|
2
|
-
import {
|
|
1
|
+
import { i as __name, r as __exportAll } from "../rolldown-runtime.mjs";
|
|
2
|
+
import { t as IToken$1 } from "./@chevrotain/types.mjs";
|
|
3
|
+
import { CustomPatternMatcherFunc, DSLMethodOpts, EmbeddedActionsParser, ILexerErrorMessageProvider, ILexingError, IMultiModeLexerDefinition, IOrAlt, IParserConfig, IParserErrorMessageProvider, IRecognitionException, IRuleConfig, IToken, Lexer, TokenPattern, TokenType, TokenTypeDictionary, TokenVocabulary } from "chevrotain";
|
|
4
|
+
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/dependency-injection.d.ts
|
|
5
|
+
/******************************************************************************
|
|
6
|
+
* Copyright 2021 TypeFox GmbH
|
|
7
|
+
* This program and the accompanying materials are made available under the
|
|
8
|
+
* terms of the MIT License, which is available in the project root.
|
|
9
|
+
******************************************************************************/
|
|
10
|
+
/**
|
|
11
|
+
* A `Module<I>` is a description of possibly grouped service factories.
|
|
12
|
+
*
|
|
13
|
+
* Given a type I = { group: { service: A } },
|
|
14
|
+
* Module<I> := { group: { service: (injector: I) => A } }
|
|
15
|
+
*
|
|
16
|
+
* Making `I` available during the creation of `I` allows us to create cyclic
|
|
17
|
+
* dependencies.
|
|
18
|
+
*/
|
|
19
|
+
type Module<I, T = I> = { [K in keyof T]: Module<I, T[K]> | ((injector: I) => T[K]); };
|
|
20
|
+
declare namespace Module {
|
|
21
|
+
const merge: <M1, M2, R extends M1 & M2>(m1: Module<R, M1>, m2: Module<R, M2>) => Module<R, M1 & M2>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Given a set of modules, the inject function returns a lazily evaluated injector
|
|
25
|
+
* that injects dependencies into the requested service when it is requested the
|
|
26
|
+
* first time. Subsequent requests will return the same service.
|
|
27
|
+
*
|
|
28
|
+
* In the case of cyclic dependencies, an Error will be thrown. This can be fixed
|
|
29
|
+
* by injecting a provider `() => T` instead of a `T`.
|
|
30
|
+
*
|
|
31
|
+
* Please note that the arguments may be objects or arrays. However, the result will
|
|
32
|
+
* be an object. Using it with for..of will have no effect.
|
|
33
|
+
*
|
|
34
|
+
* @param module1 first Module
|
|
35
|
+
* @param module2 (optional) second Module
|
|
36
|
+
* @param module3 (optional) third Module
|
|
37
|
+
* @param module4 (optional) fourth Module
|
|
38
|
+
* @param module5 (optional) fifth Module
|
|
39
|
+
* @param module6 (optional) sixth Module
|
|
40
|
+
* @param module7 (optional) seventh Module
|
|
41
|
+
* @param module8 (optional) eighth Module
|
|
42
|
+
* @param module9 (optional) ninth Module
|
|
43
|
+
* @returns a new object of type I
|
|
44
|
+
*/
|
|
45
|
+
declare function inject<I1, I2, I3, I4, I5, I6, I7, I8, I9, I extends I1 & I2 & I3 & I4 & I5 & I6 & I7 & I8 & I9>(module1: Module<I, I1>, module2?: Module<I, I2>, module3?: Module<I, I3>, module4?: Module<I, I4>, module5?: Module<I, I5>, module6?: Module<I, I6>, module7?: Module<I, I7>, module8?: Module<I, I8>, module9?: Module<I, I9>): I;
|
|
46
|
+
/**
|
|
47
|
+
* Eagerly load all services in the given dependency injection container. This is sometimes
|
|
48
|
+
* necessary because services can register event listeners in their constructors.
|
|
49
|
+
*/
|
|
50
|
+
declare function eagerLoad<T>(item: T): T;
|
|
51
|
+
//#endregion
|
|
3
52
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/languages/grammar-config.d.ts
|
|
4
53
|
interface GrammarConfig {
|
|
5
54
|
/**
|
|
@@ -11,6 +60,11 @@ interface GrammarConfig {
|
|
|
11
60
|
*/
|
|
12
61
|
nameRegexp: RegExp;
|
|
13
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Create the default grammar configuration (used by `createDefaultModule`). This can be overridden in a
|
|
65
|
+
* language-specific module.
|
|
66
|
+
*/
|
|
67
|
+
declare function createGrammarConfig(services: LangiumCoreServices): GrammarConfig;
|
|
14
68
|
//#endregion
|
|
15
69
|
//#region ../../node_modules/.pnpm/vscode-uri@3.1.0/node_modules/vscode-uri/lib/umd/uri.d.ts
|
|
16
70
|
/**
|
|
@@ -155,43 +209,138 @@ interface UriComponents {
|
|
|
155
209
|
fragment: string;
|
|
156
210
|
}
|
|
157
211
|
//#endregion
|
|
158
|
-
//#region ../../node_modules/.pnpm/
|
|
212
|
+
//#region ../../node_modules/.pnpm/vscode-uri@3.1.0/node_modules/vscode-uri/lib/umd/utils.d.ts
|
|
213
|
+
declare namespace Utils {
|
|
214
|
+
/**
|
|
215
|
+
* Joins one or more input paths to the path of URI.
|
|
216
|
+
* '/' is used as the directory separation character.
|
|
217
|
+
*
|
|
218
|
+
* The resolved path will be normalized. That means:
|
|
219
|
+
* - all '..' and '.' segments are resolved.
|
|
220
|
+
* - multiple, sequential occurences of '/' are replaced by a single instance of '/'.
|
|
221
|
+
* - trailing separators are preserved.
|
|
222
|
+
*
|
|
223
|
+
* @param uri The input URI.
|
|
224
|
+
* @param paths The paths to be joined with the path of URI.
|
|
225
|
+
* @returns A URI with the joined path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.
|
|
226
|
+
*/
|
|
227
|
+
function joinPath(uri: URI$1, ...paths: string[]): URI$1;
|
|
228
|
+
/**
|
|
229
|
+
* Resolves one or more paths against the path of a URI.
|
|
230
|
+
* '/' is used as the directory separation character.
|
|
231
|
+
*
|
|
232
|
+
* The resolved path will be normalized. That means:
|
|
233
|
+
* - all '..' and '.' segments are resolved.
|
|
234
|
+
* - multiple, sequential occurences of '/' are replaced by a single instance of '/'.
|
|
235
|
+
* - trailing separators are removed.
|
|
236
|
+
*
|
|
237
|
+
* @param uri The input URI.
|
|
238
|
+
* @param paths The paths to resolve against the path of URI.
|
|
239
|
+
* @returns A URI with the resolved path. All other properties of the URI (scheme, authority, query, fragments, ...) will be taken from the input URI.
|
|
240
|
+
*/
|
|
241
|
+
function resolvePath(uri: URI$1, ...paths: string[]): URI$1;
|
|
242
|
+
/**
|
|
243
|
+
* Returns a URI where the path is the directory name of the input uri, similar to the Unix dirname command.
|
|
244
|
+
* In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.
|
|
245
|
+
* The orignal URI is returned if the URIs path is empty or does not contain any path segments.
|
|
246
|
+
*
|
|
247
|
+
* @param uri The input URI.
|
|
248
|
+
* @return The last segment of the URIs path.
|
|
249
|
+
*/
|
|
250
|
+
function dirname(uri: URI$1): URI$1;
|
|
251
|
+
/**
|
|
252
|
+
* Returns the last segment of the path of a URI, similar to the Unix basename command.
|
|
253
|
+
* In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.
|
|
254
|
+
* The empty string is returned if the URIs path is empty or does not contain any path segments.
|
|
255
|
+
*
|
|
256
|
+
* @param uri The input URI.
|
|
257
|
+
* @return The base name of the URIs path.
|
|
258
|
+
*/
|
|
259
|
+
function basename(uri: URI$1): string;
|
|
260
|
+
/**
|
|
261
|
+
* Returns the extension name of the path of a URI, similar to the Unix extname command.
|
|
262
|
+
* In the path, '/' is recognized as the directory separation character. Trailing directory separators are ignored.
|
|
263
|
+
* The empty string is returned if the URIs path is empty or does not contain any path segments.
|
|
264
|
+
*
|
|
265
|
+
* @param uri The input URI.
|
|
266
|
+
* @return The extension name of the URIs path.
|
|
267
|
+
*/
|
|
268
|
+
function extname(uri: URI$1): string;
|
|
269
|
+
}
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/utils/uri-utils.d.ts
|
|
272
|
+
declare namespace UriUtils {
|
|
273
|
+
const basename: typeof Utils.basename;
|
|
274
|
+
const dirname: typeof Utils.dirname;
|
|
275
|
+
const extname: typeof Utils.extname;
|
|
276
|
+
const joinPath: typeof Utils.joinPath;
|
|
277
|
+
const resolvePath: typeof Utils.resolvePath;
|
|
278
|
+
function equals(a?: URI$1 | string, b?: URI$1 | string): boolean;
|
|
279
|
+
function relative(from: URI$1 | string, to: URI$1 | string): string;
|
|
280
|
+
function normalize(uri: URI$1 | string): string;
|
|
281
|
+
}
|
|
282
|
+
declare namespace ast_d_exports {
|
|
283
|
+
export { AbstractElement, AbstractRule, AbstractType, Action, Alternatives, ArrayLiteral, ArrayType, Assignment, BooleanLiteral, CharacterRange, Condition, Conjunction, CrossReference, Disjunction, EndOfFile, FeatureName, Grammar, GrammarImport, Group, InferredType, Interface, Keyword, LangiumGrammarAstReflection, LangiumGrammarAstType, LangiumGrammarKeywordNames, LangiumGrammarTerminalNames, LangiumGrammarTerminals, LangiumGrammarTokenNames, NamedArgument, NegatedToken, Negation, NumberLiteral, Parameter, ParameterReference, ParserRule, PrimitiveType, ReferenceType, RegexToken, ReturnType$1 as ReturnType, RuleCall, SimpleType, StringLiteral, TerminalAlternatives, TerminalGroup, TerminalRule, TerminalRuleCall, Type, TypeAttribute, TypeDefinition, UnionType, UnorderedGroup, UntilToken, ValueLiteral, Wildcard, isAbstractElement, isAbstractRule, isAbstractType, isAction, isAlternatives, isArrayLiteral, isArrayType, isAssignment, isBooleanLiteral, isCharacterRange, isCondition, isConjunction, isCrossReference, isDisjunction, isEndOfFile, isFeatureName, isGrammar, isGrammarImport, isGroup, isInferredType, isInterface, isKeyword, isNamedArgument, isNegatedToken, isNegation, isNumberLiteral, isParameter, isParameterReference, isParserRule, isPrimitiveType, isReferenceType, isRegexToken, isReturnType, isRuleCall, isSimpleType, isStringLiteral, isTerminalAlternatives, isTerminalGroup, isTerminalRule, isTerminalRuleCall, isType, isTypeAttribute, isTypeDefinition, isUnionType, isUnorderedGroup, isUntilToken, isValueLiteral, isWildcard, reflection };
|
|
284
|
+
}
|
|
285
|
+
declare const LangiumGrammarTerminals: {
|
|
286
|
+
ID: RegExp;
|
|
287
|
+
STRING: RegExp;
|
|
288
|
+
NUMBER: RegExp;
|
|
289
|
+
RegexLiteral: RegExp;
|
|
290
|
+
WS: RegExp;
|
|
291
|
+
ML_COMMENT: RegExp;
|
|
292
|
+
SL_COMMENT: RegExp;
|
|
293
|
+
};
|
|
294
|
+
type LangiumGrammarTerminalNames = keyof typeof LangiumGrammarTerminals;
|
|
295
|
+
type LangiumGrammarKeywordNames = "!" | "&" | "(" | ")" | "*" | "+" | "+=" | "," | "->" | "." | ".." | ":" | ";" | "<" | "=" | "=>" | ">" | "?" | "?!" | "?<!" | "?<=" | "?=" | "@" | "Date" | "EOF" | "[" | "]" | "bigint" | "boolean" | "current" | "entry" | "extends" | "false" | "fragment" | "grammar" | "hidden" | "import" | "infer" | "infers" | "interface" | "number" | "returns" | "string" | "terminal" | "true" | "type" | "with" | "{" | "|" | "}";
|
|
296
|
+
type LangiumGrammarTokenNames = LangiumGrammarTerminalNames | LangiumGrammarKeywordNames;
|
|
159
297
|
type AbstractRule = ParserRule | TerminalRule;
|
|
160
298
|
declare const AbstractRule = "AbstractRule";
|
|
299
|
+
declare function isAbstractRule(item: unknown): item is AbstractRule;
|
|
161
300
|
type AbstractType = InferredType | Interface | ParserRule | Type;
|
|
162
301
|
declare const AbstractType = "AbstractType";
|
|
302
|
+
declare function isAbstractType(item: unknown): item is AbstractType;
|
|
163
303
|
type Condition = BooleanLiteral | Conjunction | Disjunction | Negation | ParameterReference;
|
|
164
304
|
declare const Condition = "Condition";
|
|
305
|
+
declare function isCondition(item: unknown): item is Condition;
|
|
165
306
|
type FeatureName = 'current' | 'entry' | 'extends' | 'false' | 'fragment' | 'grammar' | 'hidden' | 'import' | 'infer' | 'infers' | 'interface' | 'returns' | 'terminal' | 'true' | 'type' | 'with' | PrimitiveType | string;
|
|
307
|
+
declare function isFeatureName(item: unknown): item is FeatureName;
|
|
166
308
|
type PrimitiveType = 'Date' | 'bigint' | 'boolean' | 'number' | 'string';
|
|
309
|
+
declare function isPrimitiveType(item: unknown): item is PrimitiveType;
|
|
167
310
|
type TypeDefinition = ArrayType | ReferenceType | SimpleType | UnionType;
|
|
168
311
|
declare const TypeDefinition = "TypeDefinition";
|
|
312
|
+
declare function isTypeDefinition(item: unknown): item is TypeDefinition;
|
|
169
313
|
type ValueLiteral = ArrayLiteral | BooleanLiteral | NumberLiteral | StringLiteral;
|
|
170
314
|
declare const ValueLiteral = "ValueLiteral";
|
|
315
|
+
declare function isValueLiteral(item: unknown): item is ValueLiteral;
|
|
171
316
|
interface AbstractElement extends AstNode {
|
|
172
317
|
readonly $type: 'AbstractElement' | 'Action' | 'Alternatives' | 'Assignment' | 'CharacterRange' | 'CrossReference' | 'EndOfFile' | 'Group' | 'Keyword' | 'NegatedToken' | 'RegexToken' | 'RuleCall' | 'TerminalAlternatives' | 'TerminalGroup' | 'TerminalRuleCall' | 'UnorderedGroup' | 'UntilToken' | 'Wildcard';
|
|
173
318
|
cardinality?: '*' | '+' | '?';
|
|
174
319
|
lookahead?: '?!' | '?<!' | '?<=' | '?=';
|
|
175
320
|
}
|
|
176
321
|
declare const AbstractElement = "AbstractElement";
|
|
322
|
+
declare function isAbstractElement(item: unknown): item is AbstractElement;
|
|
177
323
|
interface ArrayLiteral extends AstNode {
|
|
178
324
|
readonly $container: ArrayLiteral | TypeAttribute;
|
|
179
325
|
readonly $type: 'ArrayLiteral';
|
|
180
326
|
elements: Array<ValueLiteral>;
|
|
181
327
|
}
|
|
182
328
|
declare const ArrayLiteral = "ArrayLiteral";
|
|
329
|
+
declare function isArrayLiteral(item: unknown): item is ArrayLiteral;
|
|
183
330
|
interface ArrayType extends AstNode {
|
|
184
331
|
readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;
|
|
185
332
|
readonly $type: 'ArrayType';
|
|
186
333
|
elementType: TypeDefinition;
|
|
187
334
|
}
|
|
188
335
|
declare const ArrayType = "ArrayType";
|
|
336
|
+
declare function isArrayType(item: unknown): item is ArrayType;
|
|
189
337
|
interface BooleanLiteral extends AstNode {
|
|
190
338
|
readonly $container: ArrayLiteral | Conjunction | Disjunction | Group | NamedArgument | Negation | TypeAttribute;
|
|
191
339
|
readonly $type: 'BooleanLiteral';
|
|
192
340
|
true: boolean;
|
|
193
341
|
}
|
|
194
342
|
declare const BooleanLiteral = "BooleanLiteral";
|
|
343
|
+
declare function isBooleanLiteral(item: unknown): item is BooleanLiteral;
|
|
195
344
|
interface Conjunction extends AstNode {
|
|
196
345
|
readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;
|
|
197
346
|
readonly $type: 'Conjunction';
|
|
@@ -199,6 +348,7 @@ interface Conjunction extends AstNode {
|
|
|
199
348
|
right: Condition;
|
|
200
349
|
}
|
|
201
350
|
declare const Conjunction = "Conjunction";
|
|
351
|
+
declare function isConjunction(item: unknown): item is Conjunction;
|
|
202
352
|
interface Disjunction extends AstNode {
|
|
203
353
|
readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;
|
|
204
354
|
readonly $type: 'Disjunction';
|
|
@@ -206,6 +356,7 @@ interface Disjunction extends AstNode {
|
|
|
206
356
|
right: Condition;
|
|
207
357
|
}
|
|
208
358
|
declare const Disjunction = "Disjunction";
|
|
359
|
+
declare function isDisjunction(item: unknown): item is Disjunction;
|
|
209
360
|
interface Grammar extends AstNode {
|
|
210
361
|
readonly $type: 'Grammar';
|
|
211
362
|
definesHiddenTokens: boolean;
|
|
@@ -219,18 +370,21 @@ interface Grammar extends AstNode {
|
|
|
219
370
|
usedGrammars: Array<Reference<Grammar>>;
|
|
220
371
|
}
|
|
221
372
|
declare const Grammar = "Grammar";
|
|
373
|
+
declare function isGrammar(item: unknown): item is Grammar;
|
|
222
374
|
interface GrammarImport extends AstNode {
|
|
223
375
|
readonly $container: Grammar;
|
|
224
376
|
readonly $type: 'GrammarImport';
|
|
225
377
|
path: string;
|
|
226
378
|
}
|
|
227
379
|
declare const GrammarImport = "GrammarImport";
|
|
380
|
+
declare function isGrammarImport(item: unknown): item is GrammarImport;
|
|
228
381
|
interface InferredType extends AstNode {
|
|
229
382
|
readonly $container: Action | ParserRule;
|
|
230
383
|
readonly $type: 'InferredType';
|
|
231
384
|
name: string;
|
|
232
385
|
}
|
|
233
386
|
declare const InferredType = "InferredType";
|
|
387
|
+
declare function isInferredType(item: unknown): item is InferredType;
|
|
234
388
|
interface Interface extends AstNode {
|
|
235
389
|
readonly $container: Grammar;
|
|
236
390
|
readonly $type: 'Interface';
|
|
@@ -239,6 +393,7 @@ interface Interface extends AstNode {
|
|
|
239
393
|
superTypes: Array<Reference<AbstractType>>;
|
|
240
394
|
}
|
|
241
395
|
declare const Interface = "Interface";
|
|
396
|
+
declare function isInterface(item: unknown): item is Interface;
|
|
242
397
|
interface NamedArgument extends AstNode {
|
|
243
398
|
readonly $container: RuleCall;
|
|
244
399
|
readonly $type: 'NamedArgument';
|
|
@@ -247,30 +402,35 @@ interface NamedArgument extends AstNode {
|
|
|
247
402
|
value: Condition;
|
|
248
403
|
}
|
|
249
404
|
declare const NamedArgument = "NamedArgument";
|
|
405
|
+
declare function isNamedArgument(item: unknown): item is NamedArgument;
|
|
250
406
|
interface Negation extends AstNode {
|
|
251
407
|
readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;
|
|
252
408
|
readonly $type: 'Negation';
|
|
253
409
|
value: Condition;
|
|
254
410
|
}
|
|
255
411
|
declare const Negation = "Negation";
|
|
412
|
+
declare function isNegation(item: unknown): item is Negation;
|
|
256
413
|
interface NumberLiteral extends AstNode {
|
|
257
414
|
readonly $container: ArrayLiteral | TypeAttribute;
|
|
258
415
|
readonly $type: 'NumberLiteral';
|
|
259
416
|
value: number;
|
|
260
417
|
}
|
|
261
418
|
declare const NumberLiteral = "NumberLiteral";
|
|
419
|
+
declare function isNumberLiteral(item: unknown): item is NumberLiteral;
|
|
262
420
|
interface Parameter extends AstNode {
|
|
263
421
|
readonly $container: ParserRule;
|
|
264
422
|
readonly $type: 'Parameter';
|
|
265
423
|
name: string;
|
|
266
424
|
}
|
|
267
425
|
declare const Parameter = "Parameter";
|
|
426
|
+
declare function isParameter(item: unknown): item is Parameter;
|
|
268
427
|
interface ParameterReference extends AstNode {
|
|
269
428
|
readonly $container: Conjunction | Disjunction | Group | NamedArgument | Negation;
|
|
270
429
|
readonly $type: 'ParameterReference';
|
|
271
430
|
parameter: Reference<Parameter>;
|
|
272
431
|
}
|
|
273
432
|
declare const ParameterReference = "ParameterReference";
|
|
433
|
+
declare function isParameterReference(item: unknown): item is ParameterReference;
|
|
274
434
|
interface ParserRule extends AstNode {
|
|
275
435
|
readonly $container: Grammar;
|
|
276
436
|
readonly $type: 'ParserRule';
|
|
@@ -287,18 +447,21 @@ interface ParserRule extends AstNode {
|
|
|
287
447
|
wildcard: boolean;
|
|
288
448
|
}
|
|
289
449
|
declare const ParserRule = "ParserRule";
|
|
450
|
+
declare function isParserRule(item: unknown): item is ParserRule;
|
|
290
451
|
interface ReferenceType extends AstNode {
|
|
291
452
|
readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;
|
|
292
453
|
readonly $type: 'ReferenceType';
|
|
293
454
|
referenceType: TypeDefinition;
|
|
294
455
|
}
|
|
295
456
|
declare const ReferenceType = "ReferenceType";
|
|
296
|
-
|
|
457
|
+
declare function isReferenceType(item: unknown): item is ReferenceType;
|
|
458
|
+
interface ReturnType$1 extends AstNode {
|
|
297
459
|
readonly $container: TerminalRule;
|
|
298
460
|
readonly $type: 'ReturnType';
|
|
299
461
|
name: PrimitiveType | string;
|
|
300
462
|
}
|
|
301
|
-
declare const ReturnType = "ReturnType";
|
|
463
|
+
declare const ReturnType$1 = "ReturnType";
|
|
464
|
+
declare function isReturnType(item: unknown): item is ReturnType$1;
|
|
302
465
|
interface SimpleType extends AstNode {
|
|
303
466
|
readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;
|
|
304
467
|
readonly $type: 'SimpleType';
|
|
@@ -307,12 +470,14 @@ interface SimpleType extends AstNode {
|
|
|
307
470
|
typeRef?: Reference<AbstractType>;
|
|
308
471
|
}
|
|
309
472
|
declare const SimpleType = "SimpleType";
|
|
473
|
+
declare function isSimpleType(item: unknown): item is SimpleType;
|
|
310
474
|
interface StringLiteral extends AstNode {
|
|
311
475
|
readonly $container: ArrayLiteral | TypeAttribute;
|
|
312
476
|
readonly $type: 'StringLiteral';
|
|
313
477
|
value: string;
|
|
314
478
|
}
|
|
315
479
|
declare const StringLiteral = "StringLiteral";
|
|
480
|
+
declare function isStringLiteral(item: unknown): item is StringLiteral;
|
|
316
481
|
interface TerminalRule extends AstNode {
|
|
317
482
|
readonly $container: Grammar;
|
|
318
483
|
readonly $type: 'TerminalRule';
|
|
@@ -320,9 +485,10 @@ interface TerminalRule extends AstNode {
|
|
|
320
485
|
fragment: boolean;
|
|
321
486
|
hidden: boolean;
|
|
322
487
|
name: string;
|
|
323
|
-
type?: ReturnType;
|
|
488
|
+
type?: ReturnType$1;
|
|
324
489
|
}
|
|
325
490
|
declare const TerminalRule = "TerminalRule";
|
|
491
|
+
declare function isTerminalRule(item: unknown): item is TerminalRule;
|
|
326
492
|
interface Type extends AstNode {
|
|
327
493
|
readonly $container: Grammar;
|
|
328
494
|
readonly $type: 'Type';
|
|
@@ -330,6 +496,7 @@ interface Type extends AstNode {
|
|
|
330
496
|
type: TypeDefinition;
|
|
331
497
|
}
|
|
332
498
|
declare const Type = "Type";
|
|
499
|
+
declare function isType(item: unknown): item is Type;
|
|
333
500
|
interface TypeAttribute extends AstNode {
|
|
334
501
|
readonly $container: Interface;
|
|
335
502
|
readonly $type: 'TypeAttribute';
|
|
@@ -339,12 +506,14 @@ interface TypeAttribute extends AstNode {
|
|
|
339
506
|
type: TypeDefinition;
|
|
340
507
|
}
|
|
341
508
|
declare const TypeAttribute = "TypeAttribute";
|
|
509
|
+
declare function isTypeAttribute(item: unknown): item is TypeAttribute;
|
|
342
510
|
interface UnionType extends AstNode {
|
|
343
511
|
readonly $container: ArrayType | ReferenceType | Type | TypeAttribute | UnionType;
|
|
344
512
|
readonly $type: 'UnionType';
|
|
345
513
|
types: Array<TypeDefinition>;
|
|
346
514
|
}
|
|
347
515
|
declare const UnionType = "UnionType";
|
|
516
|
+
declare function isUnionType(item: unknown): item is UnionType;
|
|
348
517
|
interface Action extends AbstractElement {
|
|
349
518
|
readonly $type: 'Action';
|
|
350
519
|
feature?: FeatureName;
|
|
@@ -353,12 +522,28 @@ interface Action extends AbstractElement {
|
|
|
353
522
|
type?: Reference<AbstractType>;
|
|
354
523
|
}
|
|
355
524
|
declare const Action = "Action";
|
|
525
|
+
declare function isAction(item: unknown): item is Action;
|
|
526
|
+
interface Alternatives extends AbstractElement {
|
|
527
|
+
readonly $type: 'Alternatives';
|
|
528
|
+
elements: Array<AbstractElement>;
|
|
529
|
+
}
|
|
530
|
+
declare const Alternatives = "Alternatives";
|
|
531
|
+
declare function isAlternatives(item: unknown): item is Alternatives;
|
|
532
|
+
interface Assignment extends AbstractElement {
|
|
533
|
+
readonly $type: 'Assignment';
|
|
534
|
+
feature: FeatureName;
|
|
535
|
+
operator: '+=' | '=' | '?=';
|
|
536
|
+
terminal: AbstractElement;
|
|
537
|
+
}
|
|
538
|
+
declare const Assignment = "Assignment";
|
|
539
|
+
declare function isAssignment(item: unknown): item is Assignment;
|
|
356
540
|
interface CharacterRange extends AbstractElement {
|
|
357
541
|
readonly $type: 'CharacterRange';
|
|
358
542
|
left: Keyword;
|
|
359
543
|
right?: Keyword;
|
|
360
544
|
}
|
|
361
545
|
declare const CharacterRange = "CharacterRange";
|
|
546
|
+
declare function isCharacterRange(item: unknown): item is CharacterRange;
|
|
362
547
|
interface CrossReference extends AbstractElement {
|
|
363
548
|
readonly $type: 'CrossReference';
|
|
364
549
|
deprecatedSyntax: boolean;
|
|
@@ -366,24 +551,135 @@ interface CrossReference extends AbstractElement {
|
|
|
366
551
|
type: Reference<AbstractType>;
|
|
367
552
|
}
|
|
368
553
|
declare const CrossReference = "CrossReference";
|
|
554
|
+
declare function isCrossReference(item: unknown): item is CrossReference;
|
|
555
|
+
interface EndOfFile extends AbstractElement {
|
|
556
|
+
readonly $type: 'EndOfFile';
|
|
557
|
+
}
|
|
558
|
+
declare const EndOfFile = "EndOfFile";
|
|
559
|
+
declare function isEndOfFile(item: unknown): item is EndOfFile;
|
|
369
560
|
interface Group extends AbstractElement {
|
|
370
561
|
readonly $type: 'Group';
|
|
371
562
|
elements: Array<AbstractElement>;
|
|
372
563
|
guardCondition?: Condition;
|
|
373
564
|
}
|
|
374
565
|
declare const Group = "Group";
|
|
566
|
+
declare function isGroup(item: unknown): item is Group;
|
|
375
567
|
interface Keyword extends AbstractElement {
|
|
376
568
|
readonly $container: CharacterRange;
|
|
377
569
|
readonly $type: 'Keyword';
|
|
378
570
|
value: string;
|
|
379
571
|
}
|
|
380
572
|
declare const Keyword = "Keyword";
|
|
573
|
+
declare function isKeyword(item: unknown): item is Keyword;
|
|
574
|
+
interface NegatedToken extends AbstractElement {
|
|
575
|
+
readonly $type: 'NegatedToken';
|
|
576
|
+
terminal: AbstractElement;
|
|
577
|
+
}
|
|
578
|
+
declare const NegatedToken = "NegatedToken";
|
|
579
|
+
declare function isNegatedToken(item: unknown): item is NegatedToken;
|
|
580
|
+
interface RegexToken extends AbstractElement {
|
|
581
|
+
readonly $type: 'RegexToken';
|
|
582
|
+
regex: string;
|
|
583
|
+
}
|
|
584
|
+
declare const RegexToken = "RegexToken";
|
|
585
|
+
declare function isRegexToken(item: unknown): item is RegexToken;
|
|
381
586
|
interface RuleCall extends AbstractElement {
|
|
382
587
|
readonly $type: 'RuleCall';
|
|
383
588
|
arguments: Array<NamedArgument>;
|
|
384
589
|
rule: Reference<AbstractRule>;
|
|
385
590
|
}
|
|
386
591
|
declare const RuleCall = "RuleCall";
|
|
592
|
+
declare function isRuleCall(item: unknown): item is RuleCall;
|
|
593
|
+
interface TerminalAlternatives extends AbstractElement {
|
|
594
|
+
readonly $type: 'TerminalAlternatives';
|
|
595
|
+
elements: Array<AbstractElement>;
|
|
596
|
+
}
|
|
597
|
+
declare const TerminalAlternatives = "TerminalAlternatives";
|
|
598
|
+
declare function isTerminalAlternatives(item: unknown): item is TerminalAlternatives;
|
|
599
|
+
interface TerminalGroup extends AbstractElement {
|
|
600
|
+
readonly $type: 'TerminalGroup';
|
|
601
|
+
elements: Array<AbstractElement>;
|
|
602
|
+
}
|
|
603
|
+
declare const TerminalGroup = "TerminalGroup";
|
|
604
|
+
declare function isTerminalGroup(item: unknown): item is TerminalGroup;
|
|
605
|
+
interface TerminalRuleCall extends AbstractElement {
|
|
606
|
+
readonly $type: 'TerminalRuleCall';
|
|
607
|
+
rule: Reference<TerminalRule>;
|
|
608
|
+
}
|
|
609
|
+
declare const TerminalRuleCall = "TerminalRuleCall";
|
|
610
|
+
declare function isTerminalRuleCall(item: unknown): item is TerminalRuleCall;
|
|
611
|
+
interface UnorderedGroup extends AbstractElement {
|
|
612
|
+
readonly $type: 'UnorderedGroup';
|
|
613
|
+
elements: Array<AbstractElement>;
|
|
614
|
+
}
|
|
615
|
+
declare const UnorderedGroup = "UnorderedGroup";
|
|
616
|
+
declare function isUnorderedGroup(item: unknown): item is UnorderedGroup;
|
|
617
|
+
interface UntilToken extends AbstractElement {
|
|
618
|
+
readonly $type: 'UntilToken';
|
|
619
|
+
terminal: AbstractElement;
|
|
620
|
+
}
|
|
621
|
+
declare const UntilToken = "UntilToken";
|
|
622
|
+
declare function isUntilToken(item: unknown): item is UntilToken;
|
|
623
|
+
interface Wildcard extends AbstractElement {
|
|
624
|
+
readonly $type: 'Wildcard';
|
|
625
|
+
}
|
|
626
|
+
declare const Wildcard = "Wildcard";
|
|
627
|
+
declare function isWildcard(item: unknown): item is Wildcard;
|
|
628
|
+
type LangiumGrammarAstType = {
|
|
629
|
+
AbstractElement: AbstractElement;
|
|
630
|
+
AbstractRule: AbstractRule;
|
|
631
|
+
AbstractType: AbstractType;
|
|
632
|
+
Action: Action;
|
|
633
|
+
Alternatives: Alternatives;
|
|
634
|
+
ArrayLiteral: ArrayLiteral;
|
|
635
|
+
ArrayType: ArrayType;
|
|
636
|
+
Assignment: Assignment;
|
|
637
|
+
BooleanLiteral: BooleanLiteral;
|
|
638
|
+
CharacterRange: CharacterRange;
|
|
639
|
+
Condition: Condition;
|
|
640
|
+
Conjunction: Conjunction;
|
|
641
|
+
CrossReference: CrossReference;
|
|
642
|
+
Disjunction: Disjunction;
|
|
643
|
+
EndOfFile: EndOfFile;
|
|
644
|
+
Grammar: Grammar;
|
|
645
|
+
GrammarImport: GrammarImport;
|
|
646
|
+
Group: Group;
|
|
647
|
+
InferredType: InferredType;
|
|
648
|
+
Interface: Interface;
|
|
649
|
+
Keyword: Keyword;
|
|
650
|
+
NamedArgument: NamedArgument;
|
|
651
|
+
NegatedToken: NegatedToken;
|
|
652
|
+
Negation: Negation;
|
|
653
|
+
NumberLiteral: NumberLiteral;
|
|
654
|
+
Parameter: Parameter;
|
|
655
|
+
ParameterReference: ParameterReference;
|
|
656
|
+
ParserRule: ParserRule;
|
|
657
|
+
ReferenceType: ReferenceType;
|
|
658
|
+
RegexToken: RegexToken;
|
|
659
|
+
ReturnType: ReturnType$1;
|
|
660
|
+
RuleCall: RuleCall;
|
|
661
|
+
SimpleType: SimpleType;
|
|
662
|
+
StringLiteral: StringLiteral;
|
|
663
|
+
TerminalAlternatives: TerminalAlternatives;
|
|
664
|
+
TerminalGroup: TerminalGroup;
|
|
665
|
+
TerminalRule: TerminalRule;
|
|
666
|
+
TerminalRuleCall: TerminalRuleCall;
|
|
667
|
+
Type: Type;
|
|
668
|
+
TypeAttribute: TypeAttribute;
|
|
669
|
+
TypeDefinition: TypeDefinition;
|
|
670
|
+
UnionType: UnionType;
|
|
671
|
+
UnorderedGroup: UnorderedGroup;
|
|
672
|
+
UntilToken: UntilToken;
|
|
673
|
+
ValueLiteral: ValueLiteral;
|
|
674
|
+
Wildcard: Wildcard;
|
|
675
|
+
};
|
|
676
|
+
declare class LangiumGrammarAstReflection extends AbstractAstReflection {
|
|
677
|
+
getAllTypes(): string[];
|
|
678
|
+
protected computeIsSubtype(subtype: string, supertype: string): boolean;
|
|
679
|
+
getReferenceType(refInfo: ReferenceInfo): string;
|
|
680
|
+
getTypeMetaData(type: string): TypeMetaData;
|
|
681
|
+
}
|
|
682
|
+
declare const reflection: LangiumGrammarAstReflection;
|
|
387
683
|
//#endregion
|
|
388
684
|
//#region ../../node_modules/.pnpm/vscode-languageserver-textdocument@1.0.11/node_modules/vscode-languageserver-textdocument/lib/esm/main.d.ts
|
|
389
685
|
/**
|
|
@@ -3376,6 +3672,7 @@ interface FileSystemNode {
|
|
|
3376
3672
|
readonly isDirectory: boolean;
|
|
3377
3673
|
readonly uri: URI$1;
|
|
3378
3674
|
}
|
|
3675
|
+
type FileSystemFilter = (node: FileSystemNode) => boolean;
|
|
3379
3676
|
/**
|
|
3380
3677
|
* Provides methods to interact with an abstract file system. The default implementation is based on the node.js `fs` API.
|
|
3381
3678
|
*/
|
|
@@ -3391,6 +3688,13 @@ interface FileSystemProvider {
|
|
|
3391
3688
|
*/
|
|
3392
3689
|
readDirectory(uri: URI$1): Promise<FileSystemNode[]>;
|
|
3393
3690
|
}
|
|
3691
|
+
declare class EmptyFileSystemProvider implements FileSystemProvider {
|
|
3692
|
+
readFile(): Promise<string>;
|
|
3693
|
+
readDirectory(): Promise<FileSystemNode[]>;
|
|
3694
|
+
}
|
|
3695
|
+
declare const EmptyFileSystem: {
|
|
3696
|
+
fileSystemProvider: () => EmptyFileSystemProvider;
|
|
3697
|
+
};
|
|
3394
3698
|
//#endregion
|
|
3395
3699
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/utils/stream.d.ts
|
|
3396
3700
|
/******************************************************************************
|
|
@@ -3613,6 +3917,114 @@ type FlatStream<T, Depth extends number> = {
|
|
|
3613
3917
|
'recur': T extends Iterable<infer Content> ? FlatStream<Content, MinusOne<Depth>> : Stream<T>;
|
|
3614
3918
|
}[Depth extends 0 ? 'done' : 'recur'];
|
|
3615
3919
|
type MinusOne<N extends number> = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][N];
|
|
3920
|
+
/**
|
|
3921
|
+
* The default implementation of `Stream` works with two input functions:
|
|
3922
|
+
* - The first function creates the initial state of an iteration.
|
|
3923
|
+
* - The second function gets the current state as argument and returns an `IteratorResult`.
|
|
3924
|
+
*/
|
|
3925
|
+
declare class StreamImpl<S, T> implements Stream<T> {
|
|
3926
|
+
protected readonly startFn: () => S;
|
|
3927
|
+
protected readonly nextFn: (state: S) => IteratorResult<T>;
|
|
3928
|
+
constructor(startFn: () => S, nextFn: (state: S) => IteratorResult<T, undefined>);
|
|
3929
|
+
iterator(): IterableIterator<T>;
|
|
3930
|
+
[Symbol.iterator](): Iterator<T>;
|
|
3931
|
+
isEmpty(): boolean;
|
|
3932
|
+
count(): number;
|
|
3933
|
+
toArray(): T[];
|
|
3934
|
+
toSet(): Set<T>;
|
|
3935
|
+
toMap<K = T, V = T>(keyFn?: (e: T) => K, valueFn?: (e: T) => V): Map<K, V>;
|
|
3936
|
+
toString(): string;
|
|
3937
|
+
concat<T2>(other: Iterable<T2>): Stream<T | T2>;
|
|
3938
|
+
join(separator?: string): string;
|
|
3939
|
+
indexOf(searchElement: T, fromIndex?: number): number;
|
|
3940
|
+
every<U extends T>(predicate: (value: T) => value is U): this is Stream<U> & this;
|
|
3941
|
+
every(predicate: (value: T) => unknown): boolean;
|
|
3942
|
+
some(predicate: (value: T) => unknown): boolean;
|
|
3943
|
+
forEach(callbackfn: (value: T, index: number) => void): void;
|
|
3944
|
+
map<U>(callbackfn: (value: T) => U): Stream<U>;
|
|
3945
|
+
filter<U extends T>(predicate: (value: T) => value is U): Stream<U> & this;
|
|
3946
|
+
filter(predicate: (value: T) => unknown): Stream<T> & this;
|
|
3947
|
+
nonNullable(): Stream<NonNullable<T>>;
|
|
3948
|
+
reduce(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;
|
|
3949
|
+
reduce<U = T>(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;
|
|
3950
|
+
reduceRight(callbackfn: (previousValue: T, currentValue: T) => T): T | undefined;
|
|
3951
|
+
reduceRight<U = T>(callbackfn: (previousValue: U, currentValue: T) => U, initialValue: U): U;
|
|
3952
|
+
protected recursiveReduce<U>(iterator: Iterator<T>, callbackfn: (previousValue: U | T, currentValue: T) => U, initialValue?: U): U | T | undefined;
|
|
3953
|
+
find<S extends T>(predicate: (value: T) => value is S): S | undefined;
|
|
3954
|
+
find(predicate: (value: T) => unknown): T | undefined;
|
|
3955
|
+
findIndex(predicate: (value: T) => unknown): number;
|
|
3956
|
+
includes(searchElement: T): boolean;
|
|
3957
|
+
flatMap<U>(callbackfn: (value: T) => U | Iterable<U>): Stream<U>;
|
|
3958
|
+
flat<D extends number = 1>(depth?: D): FlatStream<T, D>;
|
|
3959
|
+
head(): T | undefined;
|
|
3960
|
+
tail(skipCount?: number): Stream<T>;
|
|
3961
|
+
limit(maxSize: number): Stream<T>;
|
|
3962
|
+
distinct<Key = T>(by?: (element: T) => Key): Stream<T>;
|
|
3963
|
+
exclude<Key = T>(other: Iterable<T>, key?: (element: T) => Key): Stream<T>;
|
|
3964
|
+
}
|
|
3965
|
+
/**
|
|
3966
|
+
* An empty stream of any type.
|
|
3967
|
+
*/
|
|
3968
|
+
declare const EMPTY_STREAM: Stream<any>;
|
|
3969
|
+
/**
|
|
3970
|
+
* Use this `IteratorResult` when implementing a `StreamImpl` to indicate that there are no more elements in the stream.
|
|
3971
|
+
*/
|
|
3972
|
+
declare const DONE_RESULT: IteratorReturnResult<undefined>;
|
|
3973
|
+
/**
|
|
3974
|
+
* Create a stream from one or more iterables or array-likes.
|
|
3975
|
+
*/
|
|
3976
|
+
declare function stream<T>(...collections: Array<Iterable<T> | ArrayLike<T>>): Stream<T>;
|
|
3977
|
+
/**
|
|
3978
|
+
* A tree iterator adds the ability to prune the current iteration.
|
|
3979
|
+
*/
|
|
3980
|
+
interface TreeIterator<T> extends IterableIterator<T> {
|
|
3981
|
+
/**
|
|
3982
|
+
* Skip the whole subtree below the last returned element. The iteration continues as if that
|
|
3983
|
+
* element had no children.
|
|
3984
|
+
*/
|
|
3985
|
+
prune(): void;
|
|
3986
|
+
}
|
|
3987
|
+
/**
|
|
3988
|
+
* A tree stream is used to stream the elements of a tree, for example an AST or CST.
|
|
3989
|
+
*/
|
|
3990
|
+
interface TreeStream<T> extends Stream<T> {
|
|
3991
|
+
iterator(): TreeIterator<T>;
|
|
3992
|
+
}
|
|
3993
|
+
/**
|
|
3994
|
+
* The default implementation of `TreeStream` takes a root element and a function that computes the
|
|
3995
|
+
* children of its argument. Whether the root node included in the stream is controlled with the
|
|
3996
|
+
* `includeRoot` option, which defaults to `false`.
|
|
3997
|
+
*/
|
|
3998
|
+
declare class TreeStreamImpl<T> extends StreamImpl<{
|
|
3999
|
+
iterators: Array<Iterator<T>>;
|
|
4000
|
+
pruned: boolean;
|
|
4001
|
+
}, T> implements TreeStream<T> {
|
|
4002
|
+
constructor(root: T, children: (node: T) => Iterable<T>, options?: {
|
|
4003
|
+
includeRoot?: boolean;
|
|
4004
|
+
});
|
|
4005
|
+
iterator(): TreeIterator<T>;
|
|
4006
|
+
}
|
|
4007
|
+
/**
|
|
4008
|
+
* A set of utility functions that reduce a stream to a single value.
|
|
4009
|
+
*/
|
|
4010
|
+
declare namespace Reduction {
|
|
4011
|
+
/**
|
|
4012
|
+
* Compute the sum of a number stream.
|
|
4013
|
+
*/
|
|
4014
|
+
function sum(stream: Stream<number>): number;
|
|
4015
|
+
/**
|
|
4016
|
+
* Compute the product of a number stream.
|
|
4017
|
+
*/
|
|
4018
|
+
function product(stream: Stream<number>): number;
|
|
4019
|
+
/**
|
|
4020
|
+
* Compute the minimum of a number stream. Returns `undefined` if the stream is empty.
|
|
4021
|
+
*/
|
|
4022
|
+
function min(stream: Stream<number>): number | undefined;
|
|
4023
|
+
/**
|
|
4024
|
+
* Compute the maximum of a number stream. Returns `undefined` if the stream is empty.
|
|
4025
|
+
*/
|
|
4026
|
+
function max(stream: Stream<number>): number | undefined;
|
|
4027
|
+
}
|
|
3616
4028
|
//#endregion
|
|
3617
4029
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/parser/token-builder.d.ts
|
|
3618
4030
|
interface TokenBuilderOptions {
|
|
@@ -3638,8 +4050,29 @@ type LexingDiagnosticSeverity = 'error' | 'warning' | 'info' | 'hint';
|
|
|
3638
4050
|
interface LexingDiagnostic extends ILexingError {
|
|
3639
4051
|
severity?: LexingDiagnosticSeverity;
|
|
3640
4052
|
}
|
|
4053
|
+
declare class DefaultTokenBuilder implements TokenBuilder {
|
|
4054
|
+
/**
|
|
4055
|
+
* The list of diagnostics stored during the lexing process of a single text.
|
|
4056
|
+
*/
|
|
4057
|
+
protected diagnostics: LexingDiagnostic[];
|
|
4058
|
+
buildTokens(grammar: Grammar, options?: TokenBuilderOptions): TokenVocabulary;
|
|
4059
|
+
flushLexingReport(text: string): LexingReport;
|
|
4060
|
+
protected popDiagnostics(): LexingDiagnostic[];
|
|
4061
|
+
protected buildTerminalTokens(rules: Stream<AbstractRule>): TokenType[];
|
|
4062
|
+
protected buildTerminalToken(terminal: TerminalRule): TokenType;
|
|
4063
|
+
protected requiresCustomPattern(regex: RegExp): boolean;
|
|
4064
|
+
protected regexPatternFunction(regex: RegExp): CustomPatternMatcherFunc;
|
|
4065
|
+
protected buildKeywordTokens(rules: Stream<AbstractRule>, terminalTokens: TokenType[], options?: TokenBuilderOptions): TokenType[];
|
|
4066
|
+
protected buildKeywordToken(keyword: Keyword, terminalTokens: TokenType[], caseInsensitive: boolean): TokenType;
|
|
4067
|
+
protected buildKeywordPattern(keyword: Keyword, caseInsensitive: boolean): TokenPattern;
|
|
4068
|
+
protected findLongerAlt(keyword: Keyword, terminalTokens: TokenType[]): TokenType[];
|
|
4069
|
+
}
|
|
3641
4070
|
//#endregion
|
|
3642
4071
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/parser/lexer.d.ts
|
|
4072
|
+
declare class DefaultLexerErrorMessageProvider implements ILexerErrorMessageProvider {
|
|
4073
|
+
buildUnexpectedCharactersMessage(fullText: string, startOffset: number, length: number, line?: number, column?: number): string;
|
|
4074
|
+
buildUnableToPopLexerModeMessage(token: IToken): string;
|
|
4075
|
+
}
|
|
3643
4076
|
interface LexerResult {
|
|
3644
4077
|
/**
|
|
3645
4078
|
* A list of all tokens that were lexed from the input.
|
|
@@ -3659,10 +4092,33 @@ type TokenizeMode = 'full' | 'partial';
|
|
|
3659
4092
|
interface TokenizeOptions {
|
|
3660
4093
|
mode?: TokenizeMode;
|
|
3661
4094
|
}
|
|
3662
|
-
|
|
4095
|
+
declare const DEFAULT_TOKENIZE_OPTIONS: TokenizeOptions;
|
|
4096
|
+
interface Lexer$1 {
|
|
3663
4097
|
readonly definition: TokenTypeDictionary;
|
|
3664
4098
|
tokenize(text: string, options?: TokenizeOptions): LexerResult;
|
|
3665
4099
|
}
|
|
4100
|
+
declare class DefaultLexer implements Lexer$1 {
|
|
4101
|
+
protected readonly tokenBuilder: TokenBuilder;
|
|
4102
|
+
protected readonly errorMessageProvider: ILexerErrorMessageProvider;
|
|
4103
|
+
protected tokenTypes: TokenTypeDictionary;
|
|
4104
|
+
protected chevrotainLexer: Lexer;
|
|
4105
|
+
constructor(services: LangiumCoreServices);
|
|
4106
|
+
get definition(): TokenTypeDictionary;
|
|
4107
|
+
tokenize(text: string, _options?: TokenizeOptions): LexerResult;
|
|
4108
|
+
protected toTokenTypeDictionary(buildTokens: TokenVocabulary): TokenTypeDictionary;
|
|
4109
|
+
}
|
|
4110
|
+
/**
|
|
4111
|
+
* Returns a check whether the given TokenVocabulary is TokenType array
|
|
4112
|
+
*/
|
|
4113
|
+
declare function isTokenTypeArray(tokenVocabulary: TokenVocabulary): tokenVocabulary is TokenType[];
|
|
4114
|
+
/**
|
|
4115
|
+
* Returns a check whether the given TokenVocabulary is IMultiModeLexerDefinition
|
|
4116
|
+
*/
|
|
4117
|
+
declare function isIMultiModeLexerDefinition(tokenVocabulary: TokenVocabulary): tokenVocabulary is IMultiModeLexerDefinition;
|
|
4118
|
+
/**
|
|
4119
|
+
* Returns a check whether the given TokenVocabulary is TokenTypeDictionary
|
|
4120
|
+
*/
|
|
4121
|
+
declare function isTokenTypeDictionary(tokenVocabulary: TokenVocabulary): tokenVocabulary is TokenTypeDictionary;
|
|
3666
4122
|
//#endregion
|
|
3667
4123
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/parser/langium-parser.d.ts
|
|
3668
4124
|
type ParseResult<T = AstNode> = {
|
|
@@ -3671,6 +4127,7 @@ type ParseResult<T = AstNode> = {
|
|
|
3671
4127
|
lexerErrors: ILexingError[];
|
|
3672
4128
|
lexerReport?: LexingReport;
|
|
3673
4129
|
};
|
|
4130
|
+
declare const DatatypeSymbol: unique symbol;
|
|
3674
4131
|
type RuleResult = (args: Args) => any;
|
|
3675
4132
|
type Args = Record<string, boolean>;
|
|
3676
4133
|
type RuleImpl = (args: Args) => any;
|
|
@@ -3737,7 +4194,7 @@ interface BaseParser {
|
|
|
3737
4194
|
getRuleStack(): number[];
|
|
3738
4195
|
}
|
|
3739
4196
|
declare abstract class AbstractLangiumParser implements BaseParser {
|
|
3740
|
-
protected readonly lexer: Lexer;
|
|
4197
|
+
protected readonly lexer: Lexer$1;
|
|
3741
4198
|
protected readonly wrapper: ChevrotainWrapper;
|
|
3742
4199
|
protected _unorderedGroups: Map<string, boolean[]>;
|
|
3743
4200
|
protected allRules: Map<string, RuleResult>;
|
|
@@ -3798,6 +4255,44 @@ interface IParserDefinitionError {
|
|
|
3798
4255
|
type: number;
|
|
3799
4256
|
ruleName?: string;
|
|
3800
4257
|
}
|
|
4258
|
+
declare abstract class AbstractParserErrorMessageProvider implements IParserErrorMessageProvider {
|
|
4259
|
+
buildMismatchTokenMessage(options: {
|
|
4260
|
+
expected: TokenType;
|
|
4261
|
+
actual: IToken;
|
|
4262
|
+
previous: IToken;
|
|
4263
|
+
ruleName: string;
|
|
4264
|
+
}): string;
|
|
4265
|
+
buildNotAllInputParsedMessage(options: {
|
|
4266
|
+
firstRedundant: IToken;
|
|
4267
|
+
ruleName: string;
|
|
4268
|
+
}): string;
|
|
4269
|
+
buildNoViableAltMessage(options: {
|
|
4270
|
+
expectedPathsPerAlt: TokenType[][][];
|
|
4271
|
+
actual: IToken[];
|
|
4272
|
+
previous: IToken;
|
|
4273
|
+
customUserDescription: string;
|
|
4274
|
+
ruleName: string;
|
|
4275
|
+
}): string;
|
|
4276
|
+
buildEarlyExitMessage(options: {
|
|
4277
|
+
expectedIterationPaths: TokenType[][];
|
|
4278
|
+
actual: IToken[];
|
|
4279
|
+
previous: IToken;
|
|
4280
|
+
customUserDescription: string;
|
|
4281
|
+
ruleName: string;
|
|
4282
|
+
}): string;
|
|
4283
|
+
}
|
|
4284
|
+
declare class LangiumParserErrorMessageProvider extends AbstractParserErrorMessageProvider {
|
|
4285
|
+
buildMismatchTokenMessage({ expected, actual }: {
|
|
4286
|
+
expected: TokenType;
|
|
4287
|
+
actual: IToken;
|
|
4288
|
+
previous: IToken;
|
|
4289
|
+
ruleName: string;
|
|
4290
|
+
}): string;
|
|
4291
|
+
buildNotAllInputParsedMessage({ firstRedundant }: {
|
|
4292
|
+
firstRedundant: IToken;
|
|
4293
|
+
ruleName: string;
|
|
4294
|
+
}): string;
|
|
4295
|
+
}
|
|
3801
4296
|
interface CompletionParserResult {
|
|
3802
4297
|
tokens: IToken[];
|
|
3803
4298
|
elementStack: AbstractElement[];
|
|
@@ -3866,6 +4361,25 @@ interface ServiceRegistry {
|
|
|
3866
4361
|
*/
|
|
3867
4362
|
readonly all: readonly LangiumCoreServices[];
|
|
3868
4363
|
}
|
|
4364
|
+
/**
|
|
4365
|
+
* Generic registry for Langium services, but capable of being used with extending service sets as well (such as the lsp-complete LangiumCoreServices set)
|
|
4366
|
+
*/
|
|
4367
|
+
declare class DefaultServiceRegistry implements ServiceRegistry {
|
|
4368
|
+
protected singleton?: LangiumCoreServices;
|
|
4369
|
+
protected readonly languageIdMap: Map<string, LangiumCoreServices>;
|
|
4370
|
+
protected readonly fileExtensionMap: Map<string, LangiumCoreServices>;
|
|
4371
|
+
protected readonly fileNameMap: Map<string, LangiumCoreServices>;
|
|
4372
|
+
/**
|
|
4373
|
+
* @deprecated Use the new `fileExtensionMap` (or `languageIdMap`) property instead.
|
|
4374
|
+
*/
|
|
4375
|
+
protected get map(): Map<string, LangiumCoreServices> | undefined;
|
|
4376
|
+
protected readonly textDocuments?: TextDocumentProvider;
|
|
4377
|
+
constructor(services?: LangiumSharedCoreServices);
|
|
4378
|
+
register(language: LangiumCoreServices): void;
|
|
4379
|
+
getServices(uri: URI$1): LangiumCoreServices;
|
|
4380
|
+
hasServices(uri: URI$1): boolean;
|
|
4381
|
+
get all(): readonly LangiumCoreServices[];
|
|
4382
|
+
}
|
|
3869
4383
|
//#endregion
|
|
3870
4384
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/utils/collections.d.ts
|
|
3871
4385
|
/**
|
|
@@ -3939,6 +4453,18 @@ declare class MultiMap<K, V> {
|
|
|
3939
4453
|
*/
|
|
3940
4454
|
entriesGroupedByKey(): Stream<[K, V[]]>;
|
|
3941
4455
|
}
|
|
4456
|
+
declare class BiMap<K, V> {
|
|
4457
|
+
private map;
|
|
4458
|
+
private inverse;
|
|
4459
|
+
get size(): number;
|
|
4460
|
+
constructor();
|
|
4461
|
+
constructor(elements: Array<[K, V]>);
|
|
4462
|
+
clear(): void;
|
|
4463
|
+
set(key: K, value: V): this;
|
|
4464
|
+
get(key: K): V | undefined;
|
|
4465
|
+
getKey(value: V): K | undefined;
|
|
4466
|
+
delete(key: K): boolean;
|
|
4467
|
+
}
|
|
3942
4468
|
//#endregion
|
|
3943
4469
|
//#region ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.d.ts
|
|
3944
4470
|
interface Disposable$1 {
|
|
@@ -3968,6 +4494,28 @@ interface Event<T> {
|
|
|
3968
4494
|
declare namespace Event {
|
|
3969
4495
|
const None: Event<any>;
|
|
3970
4496
|
}
|
|
4497
|
+
interface EmitterOptions {
|
|
4498
|
+
onFirstListenerAdd?: Function;
|
|
4499
|
+
onLastListenerRemove?: Function;
|
|
4500
|
+
}
|
|
4501
|
+
declare class Emitter<T> {
|
|
4502
|
+
private _options?;
|
|
4503
|
+
private static _noop;
|
|
4504
|
+
private _event;
|
|
4505
|
+
private _callbacks;
|
|
4506
|
+
constructor(_options?: EmitterOptions | undefined);
|
|
4507
|
+
/**
|
|
4508
|
+
* For the public to allow to subscribe
|
|
4509
|
+
* to events from this Emitter
|
|
4510
|
+
*/
|
|
4511
|
+
get event(): Event<T>;
|
|
4512
|
+
/**
|
|
4513
|
+
* To be kept private to fire an event to
|
|
4514
|
+
* subscribers
|
|
4515
|
+
*/
|
|
4516
|
+
fire(event: T): any;
|
|
4517
|
+
dispose(): void;
|
|
4518
|
+
}
|
|
3971
4519
|
//#endregion
|
|
3972
4520
|
//#region ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.d.ts
|
|
3973
4521
|
/**
|
|
@@ -3990,6 +4538,19 @@ declare namespace CancellationToken {
|
|
|
3990
4538
|
const Cancelled: CancellationToken;
|
|
3991
4539
|
function is(value: any): value is CancellationToken;
|
|
3992
4540
|
}
|
|
4541
|
+
interface AbstractCancellationTokenSource extends Disposable$1 {
|
|
4542
|
+
token: CancellationToken;
|
|
4543
|
+
cancel(): void;
|
|
4544
|
+
}
|
|
4545
|
+
declare class CancellationTokenSource implements AbstractCancellationTokenSource {
|
|
4546
|
+
private _token;
|
|
4547
|
+
get token(): CancellationToken;
|
|
4548
|
+
cancel(): void;
|
|
4549
|
+
dispose(): void;
|
|
4550
|
+
}
|
|
4551
|
+
declare namespace cancellation_d_exports {
|
|
4552
|
+
export { AbstractCancellationTokenSource, CancellationToken, CancellationTokenSource };
|
|
4553
|
+
}
|
|
3993
4554
|
//#endregion
|
|
3994
4555
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/workspace/documents.d.ts
|
|
3995
4556
|
/**
|
|
@@ -4117,6 +4678,38 @@ interface LangiumDocumentFactory {
|
|
|
4117
4678
|
*/
|
|
4118
4679
|
update<T extends AstNode = AstNode>(document: LangiumDocument<T>, cancellationToken: CancellationToken): Promise<LangiumDocument<T>>;
|
|
4119
4680
|
}
|
|
4681
|
+
declare class DefaultLangiumDocumentFactory implements LangiumDocumentFactory {
|
|
4682
|
+
protected readonly serviceRegistry: ServiceRegistry;
|
|
4683
|
+
protected readonly textDocuments?: TextDocumentProvider;
|
|
4684
|
+
protected readonly fileSystemProvider: FileSystemProvider;
|
|
4685
|
+
constructor(services: LangiumSharedCoreServices);
|
|
4686
|
+
fromUri<T extends AstNode = AstNode>(uri: URI$1, cancellationToken?: CancellationToken): Promise<LangiumDocument<T>>;
|
|
4687
|
+
fromTextDocument<T extends AstNode = AstNode>(textDocument: TextDocument, uri?: URI$1, options?: ParserOptions): LangiumDocument<T>;
|
|
4688
|
+
fromTextDocument<T extends AstNode = AstNode>(textDocument: TextDocument, uri: URI$1 | undefined, cancellationToken: CancellationToken): Promise<LangiumDocument<T>>;
|
|
4689
|
+
fromString<T extends AstNode = AstNode>(text: string, uri: URI$1, options?: ParserOptions): LangiumDocument<T>;
|
|
4690
|
+
fromString<T extends AstNode = AstNode>(text: string, uri: URI$1, cancellationToken: CancellationToken): Promise<LangiumDocument<T>>;
|
|
4691
|
+
fromModel<T extends AstNode = AstNode>(model: T, uri: URI$1): LangiumDocument<T>;
|
|
4692
|
+
protected create<T extends AstNode = AstNode>(uri: URI$1, content: string | TextDocument | {
|
|
4693
|
+
$model: T;
|
|
4694
|
+
}, options?: ParserOptions): LangiumDocument<T>;
|
|
4695
|
+
protected createAsync<T extends AstNode = AstNode>(uri: URI$1, content: string | TextDocument, cancelToken: CancellationToken): Promise<LangiumDocument<T>>;
|
|
4696
|
+
/**
|
|
4697
|
+
* Create a LangiumDocument from a given parse result.
|
|
4698
|
+
*
|
|
4699
|
+
* A TextDocument is created on demand if it is not provided as argument here. Usually this
|
|
4700
|
+
* should not be necessary because the main purpose of the TextDocument is to convert between
|
|
4701
|
+
* text ranges and offsets, which is done solely in LSP request handling.
|
|
4702
|
+
*
|
|
4703
|
+
* With the introduction of {@link update} below this method is supposed to be mainly called
|
|
4704
|
+
* during workspace initialization and on addition/recognition of new files, while changes in
|
|
4705
|
+
* existing documents are processed via {@link update}.
|
|
4706
|
+
*/
|
|
4707
|
+
protected createLangiumDocument<T extends AstNode = AstNode>(parseResult: ParseResult<T>, uri: URI$1, textDocument?: TextDocument, text?: string): LangiumDocument<T>;
|
|
4708
|
+
update<T extends AstNode = AstNode>(document: Mutable<LangiumDocument<T>>, cancellationToken: CancellationToken): Promise<LangiumDocument<T>>;
|
|
4709
|
+
protected parse<T extends AstNode>(uri: URI$1, text: string, options?: ParserOptions): ParseResult<T>;
|
|
4710
|
+
protected parseAsync<T extends AstNode>(uri: URI$1, text: string, cancellationToken: CancellationToken): Promise<ParseResult<T>>;
|
|
4711
|
+
protected createTextDocumentGetter(uri: URI$1, text?: string): () => TextDocument;
|
|
4712
|
+
}
|
|
4120
4713
|
/**
|
|
4121
4714
|
* Shared service for managing Langium documents.
|
|
4122
4715
|
*/
|
|
@@ -4190,8 +4783,9 @@ declare class DefaultLangiumDocuments implements LangiumDocuments {
|
|
|
4190
4783
|
invalidateDocument(uri: URI$1): LangiumDocument | undefined;
|
|
4191
4784
|
deleteDocument(uri: URI$1): LangiumDocument | undefined;
|
|
4192
4785
|
}
|
|
4193
|
-
|
|
4194
|
-
|
|
4786
|
+
declare namespace syntax_tree_d_exports {
|
|
4787
|
+
export { AbstractAstReflection, AstNode, AstNodeDescription, AstNodeTypesWithCrossReferences, AstReflection, AstTypeList, CompositeCstNode, CrossReferencesOfAstNodeType, CstNode, GenericAstNode, LeafCstNode, LinkingError, Mutable, Properties, PropertyType, Reference, ReferenceInfo, ResolvedReference, RootCstNode, TypeMetaData, TypeProperty, isAstNode, isAstNodeDescription, isCompositeCstNode, isLeafCstNode, isLinkingError, isReference, isRootCstNode };
|
|
4788
|
+
}
|
|
4195
4789
|
/**
|
|
4196
4790
|
* A node in the Abstract Syntax Tree (AST).
|
|
4197
4791
|
*/
|
|
@@ -4209,6 +4803,10 @@ interface AstNode {
|
|
|
4209
4803
|
/** The document containing the AST; only the root node has a direct reference to the document. */
|
|
4210
4804
|
readonly $document?: LangiumDocument;
|
|
4211
4805
|
}
|
|
4806
|
+
declare function isAstNode(obj: unknown): obj is AstNode;
|
|
4807
|
+
interface GenericAstNode extends AstNode {
|
|
4808
|
+
[key: string]: unknown;
|
|
4809
|
+
}
|
|
4212
4810
|
type SpecificNodeProperties<N extends AstNode> = keyof Omit<N, keyof AstNode | number | symbol>;
|
|
4213
4811
|
/**
|
|
4214
4812
|
* The property names of a given AST node type.
|
|
@@ -4233,6 +4831,10 @@ interface Reference<T extends AstNode = AstNode> {
|
|
|
4233
4831
|
/** The node description for the AstNode returned by `ref` */
|
|
4234
4832
|
readonly $nodeDescription?: AstNodeDescription;
|
|
4235
4833
|
}
|
|
4834
|
+
declare function isReference(obj: unknown): obj is Reference;
|
|
4835
|
+
type ResolvedReference<T extends AstNode = AstNode> = Reference<T> & {
|
|
4836
|
+
readonly ref: T;
|
|
4837
|
+
};
|
|
4236
4838
|
/**
|
|
4237
4839
|
* A description of an AST node is used when constructing scopes and looking up cross-reference targets.
|
|
4238
4840
|
*/
|
|
@@ -4256,6 +4858,7 @@ interface AstNodeDescription {
|
|
|
4256
4858
|
/** Navigation path inside the document */
|
|
4257
4859
|
path: string;
|
|
4258
4860
|
}
|
|
4861
|
+
declare function isAstNodeDescription(obj: unknown): obj is AstNodeDescription;
|
|
4259
4862
|
/**
|
|
4260
4863
|
* Information about a cross-reference. This is used when traversing references in an AST or to describe
|
|
4261
4864
|
* unresolved references.
|
|
@@ -4273,6 +4876,7 @@ interface LinkingError extends ReferenceInfo {
|
|
|
4273
4876
|
message: string;
|
|
4274
4877
|
targetDescription?: AstNodeDescription;
|
|
4275
4878
|
}
|
|
4879
|
+
declare function isLinkingError(obj: unknown): obj is LinkingError;
|
|
4276
4880
|
/**
|
|
4277
4881
|
* Service used for generic access to the structure of the AST. This service is shared between
|
|
4278
4882
|
* all involved languages, so it operates on the superset of types of these languages.
|
|
@@ -4285,6 +4889,21 @@ interface AstReflection {
|
|
|
4285
4889
|
isInstance(node: unknown, type: string): boolean;
|
|
4286
4890
|
isSubtype(subtype: string, supertype: string): boolean;
|
|
4287
4891
|
}
|
|
4892
|
+
/**
|
|
4893
|
+
* An abstract implementation of the {@link AstReflection} interface.
|
|
4894
|
+
* Serves to cache subtype computation results to improve performance throughout different parts of Langium.
|
|
4895
|
+
*/
|
|
4896
|
+
declare abstract class AbstractAstReflection implements AstReflection {
|
|
4897
|
+
protected subtypes: Record<string, Record<string, boolean | undefined>>;
|
|
4898
|
+
protected allSubtypes: Record<string, string[] | undefined>;
|
|
4899
|
+
abstract getAllTypes(): string[];
|
|
4900
|
+
abstract getReferenceType(refInfo: ReferenceInfo): string;
|
|
4901
|
+
abstract getTypeMetaData(type: string): TypeMetaData;
|
|
4902
|
+
protected abstract computeIsSubtype(subtype: string, supertype: string): boolean;
|
|
4903
|
+
isInstance(node: unknown, type: string): boolean;
|
|
4904
|
+
isSubtype(subtype: string, supertype: string): boolean;
|
|
4905
|
+
getAllSubTypes(type: string): string[];
|
|
4906
|
+
}
|
|
4288
4907
|
/**
|
|
4289
4908
|
* Represents runtime meta data about a meta model type.
|
|
4290
4909
|
*/
|
|
@@ -4339,9 +4958,46 @@ interface CompositeCstNode extends CstNode {
|
|
|
4339
4958
|
/** @deprecated use `content` instead. */
|
|
4340
4959
|
readonly children: CstNode[];
|
|
4341
4960
|
}
|
|
4961
|
+
declare function isCompositeCstNode(node: unknown): node is CompositeCstNode;
|
|
4962
|
+
/**
|
|
4963
|
+
* A leaf CST node corresponds to a token in the input token stream.
|
|
4964
|
+
*/
|
|
4965
|
+
interface LeafCstNode extends CstNode {
|
|
4966
|
+
readonly tokenType: TokenType;
|
|
4967
|
+
}
|
|
4968
|
+
declare function isLeafCstNode(node: unknown): node is LeafCstNode;
|
|
4342
4969
|
interface RootCstNode extends CompositeCstNode {
|
|
4343
4970
|
readonly fullText: string;
|
|
4344
4971
|
}
|
|
4972
|
+
declare function isRootCstNode(node: unknown): node is RootCstNode;
|
|
4973
|
+
/**
|
|
4974
|
+
* Describes a union type including only names(!) of properties of type T whose property value is of a certain type K,
|
|
4975
|
+
* or 'never' in case of no such properties.
|
|
4976
|
+
* It evaluates the value type regardless of the property being optional or not by converting T to Required<T>.
|
|
4977
|
+
* Note the '-?' in '[I in keyof T]-?:' that is required to map all optional but un-intended properties to 'never'.
|
|
4978
|
+
* Without that, optional props like those inherited from 'AstNode' would be mapped to 'never|undefined',
|
|
4979
|
+
* and the subsequent value mapping ('...[keyof T]') would yield 'undefined' instead of 'never' for AstNode types
|
|
4980
|
+
* not having any property matching type K, which in turn yields follow-up errors.
|
|
4981
|
+
*/
|
|
4982
|
+
type ExtractKeysOfValueType<T, K> = { [I in keyof T]-?: Required<T>[I] extends K ? I : never; }[keyof T];
|
|
4983
|
+
/**
|
|
4984
|
+
* Describes a union type including only names(!) of the cross-reference properties of the given AstNode type.
|
|
4985
|
+
* Enhances compile-time validation of cross-reference distinctions, e.g. in scope providers
|
|
4986
|
+
* in combination with `assertUnreachable(context.property)`.
|
|
4987
|
+
*/
|
|
4988
|
+
type CrossReferencesOfAstNodeType<N extends AstNode> = ExtractKeysOfValueType<N, Reference | Reference[]>;
|
|
4989
|
+
/**
|
|
4990
|
+
* Represents the enumeration-like type, that lists all AstNode types of your grammar.
|
|
4991
|
+
*/
|
|
4992
|
+
type AstTypeList<T> = Record<keyof T, AstNode>;
|
|
4993
|
+
/**
|
|
4994
|
+
* Describes a union type including of all AstNode types containing cross-references.
|
|
4995
|
+
* A is meant to be the interface `XXXAstType` fromm your generated `ast.ts` file.
|
|
4996
|
+
* Enhances compile-time validation of cross-reference distinctions, e.g. in scope providers
|
|
4997
|
+
* in combination with `assertUnreachable(context.container)`.
|
|
4998
|
+
*/
|
|
4999
|
+
type AstNodeTypesWithCrossReferences<A extends AstTypeList<A>> = { [T in keyof A]-?: CrossReferencesOfAstNodeType<A[T]> extends never ? never : A[T]; }[keyof A];
|
|
5000
|
+
type Mutable<T> = { -readonly [P in keyof T]: T[P]; };
|
|
4345
5001
|
//#endregion
|
|
4346
5002
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/documentation/comment-provider.d.ts
|
|
4347
5003
|
/**
|
|
@@ -4355,6 +5011,11 @@ interface CommentProvider {
|
|
|
4355
5011
|
*/
|
|
4356
5012
|
getComment(node: AstNode): string | undefined;
|
|
4357
5013
|
}
|
|
5014
|
+
declare class DefaultCommentProvider implements CommentProvider {
|
|
5015
|
+
protected readonly grammarConfig: () => GrammarConfig;
|
|
5016
|
+
constructor(services: LangiumCoreServices);
|
|
5017
|
+
getComment(node: AstNode): string | undefined;
|
|
5018
|
+
}
|
|
4358
5019
|
//#endregion
|
|
4359
5020
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/utils/disposable.d.ts
|
|
4360
5021
|
/******************************************************************************
|
|
@@ -4410,6 +5071,25 @@ declare class ContextCache<Context, Key, Value, ContextKey = Context> extends Di
|
|
|
4410
5071
|
clear(contextKey: Context): void;
|
|
4411
5072
|
protected cacheForContext(contextKey: Context): Map<Key, Value>;
|
|
4412
5073
|
}
|
|
5074
|
+
/**
|
|
5075
|
+
* Every key/value pair in this cache is scoped to a document.
|
|
5076
|
+
* If this document is changed or deleted, all associated key/value pairs are deleted.
|
|
5077
|
+
*/
|
|
5078
|
+
declare class DocumentCache<K, V> extends ContextCache<URI$1 | string, K, V, string> {
|
|
5079
|
+
/**
|
|
5080
|
+
* Creates a new document cache.
|
|
5081
|
+
*
|
|
5082
|
+
* @param sharedServices Service container instance to hook into document lifecycle events.
|
|
5083
|
+
* @param state Optional document state on which the cache should evict.
|
|
5084
|
+
* If not provided, the cache will evict on `DocumentBuilder#onUpdate`.
|
|
5085
|
+
* *Deleted* documents are considered in both cases.
|
|
5086
|
+
*
|
|
5087
|
+
* Providing a state here will use `DocumentBuilder#onDocumentPhase` instead,
|
|
5088
|
+
* which triggers on all documents that have been affected by this change, assuming that the
|
|
5089
|
+
* state is `DocumentState.Linked` or a later state.
|
|
5090
|
+
*/
|
|
5091
|
+
constructor(sharedServices: LangiumSharedCoreServices, state?: DocumentState);
|
|
5092
|
+
}
|
|
4413
5093
|
/**
|
|
4414
5094
|
* Every key/value pair in this cache is scoped to the whole workspace.
|
|
4415
5095
|
* If any document in the workspace is added, changed or deleted, the whole cache is evicted.
|
|
@@ -4427,6 +5107,10 @@ declare class WorkspaceCache<K, V> extends SimpleCache<K, V> {
|
|
|
4427
5107
|
}
|
|
4428
5108
|
//#endregion
|
|
4429
5109
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/references/name-provider.d.ts
|
|
5110
|
+
interface NamedAstNode extends AstNode {
|
|
5111
|
+
name: string;
|
|
5112
|
+
}
|
|
5113
|
+
declare function isNamed(node: AstNode): node is NamedAstNode;
|
|
4430
5114
|
/**
|
|
4431
5115
|
* Utility service for retrieving the `name` of an `AstNode` or the `CstNode` containing a `name`.
|
|
4432
5116
|
*/
|
|
@@ -4471,6 +5155,13 @@ interface AstNodeLocator {
|
|
|
4471
5155
|
*/
|
|
4472
5156
|
getAstNode<T extends AstNode = AstNode>(node: AstNode, path: string): T | undefined;
|
|
4473
5157
|
}
|
|
5158
|
+
declare class DefaultAstNodeLocator implements AstNodeLocator {
|
|
5159
|
+
protected segmentSeparator: string;
|
|
5160
|
+
protected indexSeparator: string;
|
|
5161
|
+
getAstNodePath(node: AstNode): string;
|
|
5162
|
+
protected getPathSegment({ $containerProperty, $containerIndex }: AstNode): string;
|
|
5163
|
+
getAstNode<T extends AstNode = AstNode>(node: AstNode, path: string): T | undefined;
|
|
5164
|
+
}
|
|
4474
5165
|
//#endregion
|
|
4475
5166
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/workspace/ast-descriptions.d.ts
|
|
4476
5167
|
/**
|
|
@@ -4489,6 +5180,12 @@ interface AstNodeDescriptionProvider {
|
|
|
4489
5180
|
*/
|
|
4490
5181
|
createDescription(node: AstNode, name: string | undefined, document?: LangiumDocument): AstNodeDescription;
|
|
4491
5182
|
}
|
|
5183
|
+
declare class DefaultAstNodeDescriptionProvider implements AstNodeDescriptionProvider {
|
|
5184
|
+
protected readonly astNodeLocator: AstNodeLocator;
|
|
5185
|
+
protected readonly nameProvider: NameProvider;
|
|
5186
|
+
constructor(services: LangiumCoreServices);
|
|
5187
|
+
createDescription(node: AstNode, name: string | undefined, document?: LangiumDocument): AstNodeDescription;
|
|
5188
|
+
}
|
|
4492
5189
|
/**
|
|
4493
5190
|
* Describes a cross-reference within a document or between two documents.
|
|
4494
5191
|
*/
|
|
@@ -4522,6 +5219,12 @@ interface ReferenceDescriptionProvider {
|
|
|
4522
5219
|
*/
|
|
4523
5220
|
createDescriptions(document: LangiumDocument, cancelToken?: CancellationToken): Promise<ReferenceDescription[]>;
|
|
4524
5221
|
}
|
|
5222
|
+
declare class DefaultReferenceDescriptionProvider implements ReferenceDescriptionProvider {
|
|
5223
|
+
protected readonly nodeLocator: AstNodeLocator;
|
|
5224
|
+
constructor(services: LangiumCoreServices);
|
|
5225
|
+
createDescriptions(document: LangiumDocument, cancelToken?: CancellationToken): Promise<ReferenceDescription[]>;
|
|
5226
|
+
protected createDescription(refInfo: ReferenceInfo): ReferenceDescription | undefined;
|
|
5227
|
+
}
|
|
4525
5228
|
//#endregion
|
|
4526
5229
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/workspace/index-manager.d.ts
|
|
4527
5230
|
/**
|
|
@@ -4611,6 +5314,12 @@ declare class DefaultIndexManager implements IndexManager {
|
|
|
4611
5314
|
}
|
|
4612
5315
|
//#endregion
|
|
4613
5316
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/documentation/jsdoc.d.ts
|
|
5317
|
+
interface JSDocComment extends JSDocValue {
|
|
5318
|
+
readonly elements: JSDocElement[];
|
|
5319
|
+
getTag(name: string): JSDocTag | undefined;
|
|
5320
|
+
getTags(name: string): JSDocTag[];
|
|
5321
|
+
}
|
|
5322
|
+
type JSDocElement = JSDocParagraph | JSDocTag;
|
|
4614
5323
|
type JSDocInline = JSDocTag | JSDocLine;
|
|
4615
5324
|
interface JSDocValue {
|
|
4616
5325
|
/**
|
|
@@ -4640,6 +5349,20 @@ interface JSDocTag extends JSDocValue {
|
|
|
4640
5349
|
readonly content: JSDocParagraph;
|
|
4641
5350
|
readonly inline: boolean;
|
|
4642
5351
|
}
|
|
5352
|
+
interface JSDocParseOptions {
|
|
5353
|
+
/**
|
|
5354
|
+
* The start symbol of your comment format. Defaults to `/**`.
|
|
5355
|
+
*/
|
|
5356
|
+
readonly start?: RegExp | string;
|
|
5357
|
+
/**
|
|
5358
|
+
* The symbol that start a line of your comment format. Defaults to `*`.
|
|
5359
|
+
*/
|
|
5360
|
+
readonly line?: RegExp | string;
|
|
5361
|
+
/**
|
|
5362
|
+
* The end symbol of your comment format. Defaults to `*\/`.
|
|
5363
|
+
*/
|
|
5364
|
+
readonly end?: RegExp | string;
|
|
5365
|
+
}
|
|
4643
5366
|
interface JSDocRenderOptions {
|
|
4644
5367
|
/**
|
|
4645
5368
|
* Determines the style for rendering tags. Defaults to `italic`.
|
|
@@ -4660,6 +5383,22 @@ interface JSDocRenderOptions {
|
|
|
4660
5383
|
*/
|
|
4661
5384
|
renderLink?(link: string, display: string): string | undefined;
|
|
4662
5385
|
}
|
|
5386
|
+
/**
|
|
5387
|
+
* Parses a JSDoc from a `CstNode` containing a comment.
|
|
5388
|
+
*
|
|
5389
|
+
* @param node A `CstNode` from a parsed Langium document.
|
|
5390
|
+
* @param options Parsing options specialized to your language. See {@link JSDocParseOptions}.
|
|
5391
|
+
*/
|
|
5392
|
+
declare function parseJSDoc(node: CstNode, options?: JSDocParseOptions): JSDocComment;
|
|
5393
|
+
/**
|
|
5394
|
+
* Parses a JSDoc from a string comment.
|
|
5395
|
+
*
|
|
5396
|
+
* @param content A string containing the source of the JSDoc comment.
|
|
5397
|
+
* @param start The start position the comment occupies in the source document.
|
|
5398
|
+
* @param options Parsing options specialized to your language. See {@link JSDocParseOptions}.
|
|
5399
|
+
*/
|
|
5400
|
+
declare function parseJSDoc(content: string, start?: Position, options?: JSDocParseOptions): JSDocComment;
|
|
5401
|
+
declare function isJSDoc(node: CstNode | string, options?: JSDocParseOptions): boolean;
|
|
4663
5402
|
//#endregion
|
|
4664
5403
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/documentation/documentation-provider.d.ts
|
|
4665
5404
|
/**
|
|
@@ -4728,6 +5467,28 @@ interface Scope {
|
|
|
4728
5467
|
interface ScopeOptions {
|
|
4729
5468
|
caseInsensitive?: boolean;
|
|
4730
5469
|
}
|
|
5470
|
+
/**
|
|
5471
|
+
* The default scope implementation is based on a `Stream`. It has an optional _outer scope_ describing
|
|
5472
|
+
* the next level of elements, which are queried when a target element is not found in the stream provided
|
|
5473
|
+
* to this scope.
|
|
5474
|
+
*/
|
|
5475
|
+
declare class StreamScope implements Scope {
|
|
5476
|
+
readonly elements: Stream<AstNodeDescription>;
|
|
5477
|
+
readonly outerScope?: Scope;
|
|
5478
|
+
readonly caseInsensitive: boolean;
|
|
5479
|
+
constructor(elements: Stream<AstNodeDescription>, outerScope?: Scope, options?: ScopeOptions);
|
|
5480
|
+
getAllElements(): Stream<AstNodeDescription>;
|
|
5481
|
+
getElement(name: string): AstNodeDescription | undefined;
|
|
5482
|
+
}
|
|
5483
|
+
declare class MapScope implements Scope {
|
|
5484
|
+
readonly elements: Map<string, AstNodeDescription>;
|
|
5485
|
+
readonly outerScope?: Scope;
|
|
5486
|
+
readonly caseInsensitive: boolean;
|
|
5487
|
+
constructor(elements: Iterable<AstNodeDescription>, outerScope?: Scope, options?: ScopeOptions);
|
|
5488
|
+
getElement(name: string): AstNodeDescription | undefined;
|
|
5489
|
+
getAllElements(): Stream<AstNodeDescription>;
|
|
5490
|
+
}
|
|
5491
|
+
declare const EMPTY_SCOPE: Scope;
|
|
4731
5492
|
//#endregion
|
|
4732
5493
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/references/scope-provider.d.ts
|
|
4733
5494
|
/**
|
|
@@ -4812,6 +5573,25 @@ interface Linker {
|
|
|
4812
5573
|
*/
|
|
4813
5574
|
buildReference(node: AstNode, property: string, refNode: CstNode | undefined, refText: string): Reference;
|
|
4814
5575
|
}
|
|
5576
|
+
declare class DefaultLinker implements Linker {
|
|
5577
|
+
protected readonly reflection: AstReflection;
|
|
5578
|
+
protected readonly scopeProvider: ScopeProvider;
|
|
5579
|
+
protected readonly astNodeLocator: AstNodeLocator;
|
|
5580
|
+
protected readonly langiumDocuments: () => LangiumDocuments;
|
|
5581
|
+
constructor(services: LangiumCoreServices);
|
|
5582
|
+
link(document: LangiumDocument, cancelToken?: CancellationToken): Promise<void>;
|
|
5583
|
+
protected doLink(refInfo: ReferenceInfo, document: LangiumDocument): void;
|
|
5584
|
+
unlink(document: LangiumDocument): void;
|
|
5585
|
+
getCandidate(refInfo: ReferenceInfo): AstNodeDescription | LinkingError;
|
|
5586
|
+
buildReference(node: AstNode, property: string, refNode: CstNode | undefined, refText: string): Reference;
|
|
5587
|
+
protected getLinkedNode(refInfo: ReferenceInfo): {
|
|
5588
|
+
node?: AstNode;
|
|
5589
|
+
descr?: AstNodeDescription;
|
|
5590
|
+
error?: LinkingError;
|
|
5591
|
+
};
|
|
5592
|
+
protected loadAstNode(nodeDescription: AstNodeDescription): AstNode | undefined;
|
|
5593
|
+
protected createLinkingError(refInfo: ReferenceInfo, targetDescription?: AstNodeDescription): LinkingError;
|
|
5594
|
+
}
|
|
4815
5595
|
//#endregion
|
|
4816
5596
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/serializer/hydrator.d.ts
|
|
4817
5597
|
/**
|
|
@@ -4828,9 +5608,79 @@ interface Hydrator {
|
|
|
4828
5608
|
*/
|
|
4829
5609
|
hydrate<T extends AstNode = AstNode>(result: ParseResult<object>): ParseResult<T>;
|
|
4830
5610
|
}
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
5611
|
+
interface DehydrateContext {
|
|
5612
|
+
astNodes: Map<AstNode, any>;
|
|
5613
|
+
cstNodes: Map<CstNode, any>;
|
|
5614
|
+
}
|
|
5615
|
+
interface HydrateContext {
|
|
5616
|
+
astNodes: Map<any, AstNode>;
|
|
5617
|
+
cstNodes: Map<any, CstNode>;
|
|
5618
|
+
}
|
|
5619
|
+
declare class DefaultHydrator implements Hydrator {
|
|
5620
|
+
protected readonly grammar: Grammar;
|
|
5621
|
+
protected readonly lexer: Lexer$1;
|
|
5622
|
+
protected readonly linker: Linker;
|
|
5623
|
+
protected readonly grammarElementIdMap: BiMap<AbstractElement, number>;
|
|
5624
|
+
protected readonly tokenTypeIdMap: BiMap<number, TokenType>;
|
|
5625
|
+
constructor(services: LangiumCoreServices);
|
|
5626
|
+
dehydrate(result: ParseResult<AstNode>): ParseResult<object>;
|
|
5627
|
+
protected dehydrateLexerReport(lexerReport: LexingReport): LexingReport;
|
|
5628
|
+
protected createDehyrationContext(node: AstNode): DehydrateContext;
|
|
5629
|
+
protected dehydrateAstNode(node: AstNode, context: DehydrateContext): object;
|
|
5630
|
+
protected dehydrateReference(reference: Reference, context: DehydrateContext): any;
|
|
5631
|
+
protected dehydrateCstNode(node: CstNode, context: DehydrateContext): any;
|
|
5632
|
+
hydrate<T extends AstNode = AstNode>(result: ParseResult<object>): ParseResult<T>;
|
|
5633
|
+
protected createHydrationContext(node: any): HydrateContext;
|
|
5634
|
+
protected hydrateAstNode(node: any, context: HydrateContext): AstNode;
|
|
5635
|
+
protected setParent(node: any, parent: any): any;
|
|
5636
|
+
protected hydrateReference(reference: any, node: AstNode, name: string, context: HydrateContext): Reference;
|
|
5637
|
+
protected hydrateCstNode(cstNode: any, context: HydrateContext, num?: number): CstNode;
|
|
5638
|
+
protected hydrateCstLeafNode(cstNode: any): LeafCstNode;
|
|
5639
|
+
protected getTokenType(name: string): TokenType;
|
|
5640
|
+
protected getGrammarElementId(node: AbstractElement | undefined): number | undefined;
|
|
5641
|
+
protected getGrammarElement(id: number): AbstractElement | undefined;
|
|
5642
|
+
protected createGrammarElementIdMap(): void;
|
|
5643
|
+
}
|
|
5644
|
+
//#endregion
|
|
5645
|
+
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/utils/promise-utils.d.ts
|
|
5646
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
5647
|
+
/**
|
|
5648
|
+
* Delays the execution of the current code to the next tick of the event loop.
|
|
5649
|
+
* Don't call this method directly in a tight loop to prevent too many promises from being created.
|
|
5650
|
+
*/
|
|
5651
|
+
declare function delayNextTick(): Promise<void>;
|
|
5652
|
+
/**
|
|
5653
|
+
* Reset the global interruption period and create a cancellation token source.
|
|
5654
|
+
*/
|
|
5655
|
+
declare function startCancelableOperation(): AbstractCancellationTokenSource;
|
|
5656
|
+
/**
|
|
5657
|
+
* Change the period duration for `interruptAndCheck` to the given number of milliseconds.
|
|
5658
|
+
* The default value is 10ms.
|
|
5659
|
+
*/
|
|
5660
|
+
declare function setInterruptionPeriod(period: number): void;
|
|
5661
|
+
/**
|
|
5662
|
+
* This symbol may be thrown in an asynchronous context by any Langium service that receives
|
|
5663
|
+
* a `CancellationToken`. This means that the promise returned by such a service is rejected with
|
|
5664
|
+
* this symbol as rejection reason.
|
|
5665
|
+
*/
|
|
5666
|
+
declare const OperationCancelled: unique symbol;
|
|
5667
|
+
/**
|
|
5668
|
+
* Use this in a `catch` block to check whether the thrown object indicates that the operation
|
|
5669
|
+
* has been cancelled.
|
|
5670
|
+
*/
|
|
5671
|
+
declare function isOperationCancelled(err: unknown): err is typeof OperationCancelled;
|
|
5672
|
+
/**
|
|
5673
|
+
* This function does two things:
|
|
5674
|
+
* 1. Check the elapsed time since the last call to this function or to `startCancelableOperation`. If the predefined
|
|
5675
|
+
* period (configured with `setInterruptionPeriod`) is exceeded, execution is delayed with `delayNextTick`.
|
|
5676
|
+
* 2. If the predefined period is not met yet or execution is resumed after an interruption, the given cancellation
|
|
5677
|
+
* token is checked, and if cancellation is requested, `OperationCanceled` is thrown.
|
|
5678
|
+
*
|
|
5679
|
+
* All services in Langium that receive a `CancellationToken` may potentially call this function, so the
|
|
5680
|
+
* `CancellationToken` must be caught (with an `async` try-catch block or a `catch` callback attached to
|
|
5681
|
+
* the promise) to avoid that event being exposed as an error.
|
|
5682
|
+
*/
|
|
5683
|
+
declare function interruptAndCheck(token: CancellationToken): Promise<void>;
|
|
4834
5684
|
/**
|
|
4835
5685
|
* Simple implementation of the deferred pattern.
|
|
4836
5686
|
* An object that exposes a promise and functions to resolve and reject it.
|
|
@@ -4861,6 +5711,55 @@ interface AsyncParser {
|
|
|
4861
5711
|
*/
|
|
4862
5712
|
parse<T extends AstNode>(text: string, cancelToken: CancellationToken): Promise<ParseResult<T>>;
|
|
4863
5713
|
}
|
|
5714
|
+
/**
|
|
5715
|
+
* Default implementation of the async parser which simply wraps the sync parser in a promise.
|
|
5716
|
+
*
|
|
5717
|
+
* @remarks
|
|
5718
|
+
* A real implementation would create worker threads or web workers to offload the parsing work.
|
|
5719
|
+
*/
|
|
5720
|
+
declare class DefaultAsyncParser implements AsyncParser {
|
|
5721
|
+
protected readonly syncParser: LangiumParser;
|
|
5722
|
+
constructor(services: LangiumCoreServices);
|
|
5723
|
+
parse<T extends AstNode>(text: string, _cancelToken: CancellationToken): Promise<ParseResult<T>>;
|
|
5724
|
+
}
|
|
5725
|
+
declare abstract class AbstractThreadedAsyncParser implements AsyncParser {
|
|
5726
|
+
/**
|
|
5727
|
+
* The thread count determines how many threads are used to parse files in parallel.
|
|
5728
|
+
* The default value is 8. Decreasing this value increases startup performance, but decreases parallel parsing performance.
|
|
5729
|
+
*/
|
|
5730
|
+
protected threadCount: number;
|
|
5731
|
+
/**
|
|
5732
|
+
* The termination delay determines how long the parser waits for a thread to finish after a cancellation request.
|
|
5733
|
+
* The default value is 200(ms).
|
|
5734
|
+
*/
|
|
5735
|
+
protected terminationDelay: number;
|
|
5736
|
+
protected workerPool: ParserWorker[];
|
|
5737
|
+
protected queue: Array<Deferred<ParserWorker>>;
|
|
5738
|
+
protected readonly hydrator: Hydrator;
|
|
5739
|
+
constructor(services: LangiumCoreServices);
|
|
5740
|
+
protected initializeWorkers(): void;
|
|
5741
|
+
parse<T extends AstNode>(text: string, cancelToken: CancellationToken): Promise<ParseResult<T>>;
|
|
5742
|
+
protected terminateWorker(worker: ParserWorker): void;
|
|
5743
|
+
protected acquireParserWorker(cancelToken: CancellationToken): Promise<ParserWorker>;
|
|
5744
|
+
protected abstract createWorker(): ParserWorker;
|
|
5745
|
+
}
|
|
5746
|
+
type WorkerMessagePost = (message: unknown) => void;
|
|
5747
|
+
type WorkerMessageCallback = (cb: (message: unknown) => void) => void;
|
|
5748
|
+
declare class ParserWorker {
|
|
5749
|
+
protected readonly sendMessage: WorkerMessagePost;
|
|
5750
|
+
protected readonly _terminate: () => void;
|
|
5751
|
+
protected readonly onReadyEmitter: Emitter<void>;
|
|
5752
|
+
protected deferred: Deferred<ParseResult>;
|
|
5753
|
+
protected _ready: boolean;
|
|
5754
|
+
protected _parsing: boolean;
|
|
5755
|
+
get ready(): boolean;
|
|
5756
|
+
get onReady(): Event<void>;
|
|
5757
|
+
constructor(sendMessage: WorkerMessagePost, onMessage: WorkerMessageCallback, onError: WorkerMessageCallback, terminate: () => void);
|
|
5758
|
+
terminate(): void;
|
|
5759
|
+
lock(): void;
|
|
5760
|
+
unlock(): void;
|
|
5761
|
+
parse(text: string): Promise<ParseResult>;
|
|
5762
|
+
}
|
|
4864
5763
|
//#endregion
|
|
4865
5764
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/parser/value-converter.d.ts
|
|
4866
5765
|
/**
|
|
@@ -4927,6 +5826,16 @@ interface FindReferencesOptions {
|
|
|
4927
5826
|
*/
|
|
4928
5827
|
includeDeclaration?: boolean;
|
|
4929
5828
|
}
|
|
5829
|
+
declare class DefaultReferences implements References {
|
|
5830
|
+
protected readonly nameProvider: NameProvider;
|
|
5831
|
+
protected readonly index: IndexManager;
|
|
5832
|
+
protected readonly nodeLocator: AstNodeLocator;
|
|
5833
|
+
constructor(services: LangiumCoreServices);
|
|
5834
|
+
findDeclaration(sourceCstNode: CstNode): AstNode | undefined;
|
|
5835
|
+
findDeclarationNode(sourceCstNode: CstNode): CstNode | undefined;
|
|
5836
|
+
findReferences(targetNode: AstNode, options: FindReferencesOptions): Stream<ReferenceDescription>;
|
|
5837
|
+
protected getReferenceToSelf(targetNode: AstNode): ReferenceDescription | undefined;
|
|
5838
|
+
}
|
|
4930
5839
|
//#endregion
|
|
4931
5840
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/references/scope-computation.d.ts
|
|
4932
5841
|
/**
|
|
@@ -5027,6 +5936,37 @@ interface JsonDeserializeOptions {
|
|
|
5027
5936
|
/** Used to parse and convert URIs when the target of a cross-reference is in a different document. */
|
|
5028
5937
|
uriConverter?: (uri: string) => URI$1;
|
|
5029
5938
|
}
|
|
5939
|
+
/**
|
|
5940
|
+
* {@link AstNode}s that may carry information on their definition area within the DSL text.
|
|
5941
|
+
*/
|
|
5942
|
+
interface AstNodeWithTextRegion extends AstNode {
|
|
5943
|
+
$sourceText?: string;
|
|
5944
|
+
$textRegion?: AstNodeRegionWithAssignments;
|
|
5945
|
+
}
|
|
5946
|
+
/**
|
|
5947
|
+
* {@link AstNode}s that may carry a semantically relevant comment.
|
|
5948
|
+
*/
|
|
5949
|
+
interface AstNodeWithComment extends AstNode {
|
|
5950
|
+
$comment?: string;
|
|
5951
|
+
}
|
|
5952
|
+
declare function isAstNodeWithComment(node: AstNode): node is AstNodeWithComment;
|
|
5953
|
+
/**
|
|
5954
|
+
* A {@link DocumentSegment} representing the definition area of an AstNode within the DSL text.
|
|
5955
|
+
* Usually contains text region information on all assigned property values of the AstNode,
|
|
5956
|
+
* and may contain the defining file's URI as string.
|
|
5957
|
+
*/
|
|
5958
|
+
interface AstNodeRegionWithAssignments extends DocumentSegment {
|
|
5959
|
+
/**
|
|
5960
|
+
* A record containing an entry for each assigned property of the AstNode.
|
|
5961
|
+
* The key is equal to the property name and the value is an array of the property values'
|
|
5962
|
+
* text regions, regardless of whether the property is a single value or list property.
|
|
5963
|
+
*/
|
|
5964
|
+
assignments?: Record<string, DocumentSegment[]>;
|
|
5965
|
+
/**
|
|
5966
|
+
* The AstNode defining file's URI as string
|
|
5967
|
+
*/
|
|
5968
|
+
documentURI?: string;
|
|
5969
|
+
}
|
|
5030
5970
|
/**
|
|
5031
5971
|
* Utility service for transforming an `AstNode` into a JSON string and vice versa.
|
|
5032
5972
|
*/
|
|
@@ -5042,6 +5982,35 @@ interface JsonSerializer {
|
|
|
5042
5982
|
*/
|
|
5043
5983
|
deserialize<T extends AstNode = AstNode>(content: string, options?: JsonDeserializeOptions): T;
|
|
5044
5984
|
}
|
|
5985
|
+
/**
|
|
5986
|
+
* A cross-reference in the serialized JSON representation of an AstNode.
|
|
5987
|
+
*/
|
|
5988
|
+
interface IntermediateReference {
|
|
5989
|
+
/** URI pointing to the target element. This is either `#${path}` if the target is in the same document, or `${documentURI}#${path}` otherwise. */
|
|
5990
|
+
$ref?: string;
|
|
5991
|
+
/** The actual text used to look up the reference target in the surrounding scope. */
|
|
5992
|
+
$refText?: string;
|
|
5993
|
+
/** If any problem occurred while resolving the reference, it is described by this property. */
|
|
5994
|
+
$error?: string;
|
|
5995
|
+
}
|
|
5996
|
+
declare class DefaultJsonSerializer implements JsonSerializer {
|
|
5997
|
+
/** The set of AstNode properties to be ignored by the serializer. */
|
|
5998
|
+
ignoreProperties: Set<string>;
|
|
5999
|
+
/** The document that is currently processed by the serializer; this is used by the replacer function. */
|
|
6000
|
+
protected currentDocument: LangiumDocument | undefined;
|
|
6001
|
+
protected readonly langiumDocuments: LangiumDocuments;
|
|
6002
|
+
protected readonly astNodeLocator: AstNodeLocator;
|
|
6003
|
+
protected readonly nameProvider: NameProvider;
|
|
6004
|
+
protected readonly commentProvider: CommentProvider;
|
|
6005
|
+
constructor(services: LangiumCoreServices);
|
|
6006
|
+
serialize(node: AstNode, options?: JsonSerializeOptions): string;
|
|
6007
|
+
deserialize<T extends AstNode = AstNode>(content: string, options?: JsonDeserializeOptions): T;
|
|
6008
|
+
protected replacer(key: string, value: unknown, { refText, sourceText, textRegions, comments, uriConverter }: JsonSerializeOptions): unknown;
|
|
6009
|
+
protected addAstNodeRegionWithAssignmentsTo(node: AstNodeWithTextRegion): AstNodeWithTextRegion | undefined;
|
|
6010
|
+
protected linkNode(node: GenericAstNode, root: AstNode, options: JsonDeserializeOptions, container?: AstNode, containerProperty?: string, containerIndex?: number): void;
|
|
6011
|
+
protected reviveReference(container: AstNode, property: string, root: AstNode, reference: IntermediateReference, options: JsonDeserializeOptions): Reference | undefined;
|
|
6012
|
+
protected getRefNode(root: AstNode, uri: string, uriConverter?: (uri: string) => URI$1): AstNode | string;
|
|
6013
|
+
}
|
|
5045
6014
|
//#endregion
|
|
5046
6015
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/validation/validation-registry.d.ts
|
|
5047
6016
|
type DiagnosticInfo<N extends AstNode, P extends string = Properties<N>> = {
|
|
@@ -5066,6 +6035,21 @@ type DiagnosticInfo<N extends AstNode, P extends string = Properties<N>> = {
|
|
|
5066
6035
|
/** A data entry field that is preserved between a `textDocument/publishDiagnostics` notification and `textDocument/codeAction` request. */
|
|
5067
6036
|
data?: unknown;
|
|
5068
6037
|
};
|
|
6038
|
+
/**
|
|
6039
|
+
* Shape of information commonly used in the `data` field of diagnostics.
|
|
6040
|
+
*/
|
|
6041
|
+
interface DiagnosticData {
|
|
6042
|
+
/** Diagnostic code for identifying which code action to apply. This code is _not_ shown in the user interface. */
|
|
6043
|
+
code: string;
|
|
6044
|
+
/** Specifies where to apply the code action in the form of a `DocumentSegment`. */
|
|
6045
|
+
actionSegment?: DocumentSegment;
|
|
6046
|
+
/** Specifies where to apply the code action in the form of a `Range`. */
|
|
6047
|
+
actionRange?: Range;
|
|
6048
|
+
}
|
|
6049
|
+
/**
|
|
6050
|
+
* Create DiagnosticData for a given diagnostic code. The result can be put into the `data` field of a DiagnosticInfo.
|
|
6051
|
+
*/
|
|
6052
|
+
declare function diagnosticData(code: string): DiagnosticData;
|
|
5069
6053
|
type ValidationSeverity = 'error' | 'warning' | 'info' | 'hint';
|
|
5070
6054
|
type ValidationAcceptor = <N extends AstNode>(severity: ValidationSeverity, message: string, info: DiagnosticInfo<N>) => void;
|
|
5071
6055
|
type ValidationCheck<T extends AstNode = AstNode> = (node: T, accept: ValidationAcceptor, cancelToken: CancellationToken) => MaybePromise<void>;
|
|
@@ -5226,6 +6210,15 @@ declare class DefaultDocumentValidator implements DocumentValidator {
|
|
|
5226
6210
|
protected toDiagnostic<N extends AstNode>(severity: ValidationSeverity, message: string, info: DiagnosticInfo<N, string>): Diagnostic;
|
|
5227
6211
|
protected getSource(): string | undefined;
|
|
5228
6212
|
}
|
|
6213
|
+
declare function getDiagnosticRange<N extends AstNode>(info: DiagnosticInfo<N, string>): Range;
|
|
6214
|
+
/**
|
|
6215
|
+
* Transforms the diagnostic severity from the {@link LexingDiagnosticSeverity} format to LSP's `DiagnosticSeverity` format.
|
|
6216
|
+
*
|
|
6217
|
+
* @param severity The lexing diagnostic severity
|
|
6218
|
+
* @returns Diagnostic severity according to `vscode-languageserver-types/lib/esm/main.js#DiagnosticSeverity`
|
|
6219
|
+
*/
|
|
6220
|
+
declare function toDiagnosticSeverity(severity: LexingDiagnosticSeverity): DiagnosticSeverity;
|
|
6221
|
+
declare function toDiagnosticData(severity: LexingDiagnosticSeverity): DiagnosticData;
|
|
5229
6222
|
declare namespace DocumentValidator {
|
|
5230
6223
|
const LexingError = "lexing-error";
|
|
5231
6224
|
const LexingWarning = "lexing-warning";
|
|
@@ -5234,6 +6227,11 @@ declare namespace DocumentValidator {
|
|
|
5234
6227
|
const ParsingError = "parsing-error";
|
|
5235
6228
|
const LinkingError = "linking-error";
|
|
5236
6229
|
}
|
|
6230
|
+
interface LinkingErrorData extends DiagnosticData {
|
|
6231
|
+
containerType: string;
|
|
6232
|
+
property: string;
|
|
6233
|
+
refText: string;
|
|
6234
|
+
}
|
|
5237
6235
|
//#endregion
|
|
5238
6236
|
//#region ../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.d.ts
|
|
5239
6237
|
interface ResponseErrorLiteral<D = void> {
|
|
@@ -9723,6 +10721,37 @@ interface ConfigurationSectionUpdate {
|
|
|
9723
10721
|
configuration: any;
|
|
9724
10722
|
}
|
|
9725
10723
|
type ConfigurationSectionUpdateListener = (update: ConfigurationSectionUpdate) => void;
|
|
10724
|
+
/**
|
|
10725
|
+
* Base configuration provider for building up other configuration providers
|
|
10726
|
+
*/
|
|
10727
|
+
declare class DefaultConfigurationProvider implements ConfigurationProvider {
|
|
10728
|
+
protected readonly serviceRegistry: ServiceRegistry;
|
|
10729
|
+
protected readonly _ready: Deferred<void>;
|
|
10730
|
+
protected settings: Record<string, Record<string, any>>;
|
|
10731
|
+
protected workspaceConfig: boolean;
|
|
10732
|
+
protected onConfigurationSectionUpdateEmitter: Emitter<ConfigurationSectionUpdate>;
|
|
10733
|
+
constructor(services: LangiumSharedCoreServices);
|
|
10734
|
+
get ready(): Promise<void>;
|
|
10735
|
+
initialize(params: InitializeParams): void;
|
|
10736
|
+
initialized(params: ConfigurationInitializedParams): Promise<void>;
|
|
10737
|
+
/**
|
|
10738
|
+
* Updates the cached configurations using the `change` notification parameters.
|
|
10739
|
+
*
|
|
10740
|
+
* @param change The parameters of a change configuration notification.
|
|
10741
|
+
* `settings` property of the change object could be expressed as `Record<string, Record<string, any>>`
|
|
10742
|
+
*/
|
|
10743
|
+
updateConfiguration(change: DidChangeConfigurationParams): void;
|
|
10744
|
+
protected updateSectionConfiguration(section: string, configuration: any): void;
|
|
10745
|
+
/**
|
|
10746
|
+
* Returns a configuration value stored for the given language.
|
|
10747
|
+
*
|
|
10748
|
+
* @param language The language id
|
|
10749
|
+
* @param configuration Configuration name
|
|
10750
|
+
*/
|
|
10751
|
+
getConfiguration(language: string, configuration: string): Promise<any>;
|
|
10752
|
+
protected toSectionName(languageId: string): string;
|
|
10753
|
+
get onConfigurationSectionUpdate(): Event<ConfigurationSectionUpdate>;
|
|
10754
|
+
}
|
|
9726
10755
|
//#endregion
|
|
9727
10756
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/workspace/document-builder.d.ts
|
|
9728
10757
|
interface BuildOptions {
|
|
@@ -9741,6 +10770,16 @@ interface BuildOptions {
|
|
|
9741
10770
|
*/
|
|
9742
10771
|
validation?: boolean | ValidationOptions;
|
|
9743
10772
|
}
|
|
10773
|
+
interface DocumentBuildState {
|
|
10774
|
+
/** Whether a document has completed its last build process. */
|
|
10775
|
+
completed: boolean;
|
|
10776
|
+
/** The options used for the last build process. */
|
|
10777
|
+
options: BuildOptions;
|
|
10778
|
+
/** Additional information about the last build result. */
|
|
10779
|
+
result?: {
|
|
10780
|
+
validationChecks?: ValidationCategory[];
|
|
10781
|
+
};
|
|
10782
|
+
}
|
|
9744
10783
|
/**
|
|
9745
10784
|
* Shared-service for building and updating `LangiumDocument`s.
|
|
9746
10785
|
*/
|
|
@@ -9808,6 +10847,91 @@ interface DocumentBuilder {
|
|
|
9808
10847
|
type DocumentUpdateListener = (changed: URI$1[], deleted: URI$1[]) => void | Promise<void>;
|
|
9809
10848
|
type DocumentBuildListener = (built: LangiumDocument[], cancelToken: CancellationToken) => void | Promise<void>;
|
|
9810
10849
|
type DocumentPhaseListener = (built: LangiumDocument, cancelToken: CancellationToken) => void | Promise<void>;
|
|
10850
|
+
declare class DefaultDocumentBuilder implements DocumentBuilder {
|
|
10851
|
+
updateBuildOptions: BuildOptions;
|
|
10852
|
+
protected readonly langiumDocuments: LangiumDocuments;
|
|
10853
|
+
protected readonly langiumDocumentFactory: LangiumDocumentFactory;
|
|
10854
|
+
protected readonly textDocuments: TextDocumentProvider | undefined;
|
|
10855
|
+
protected readonly indexManager: IndexManager;
|
|
10856
|
+
protected readonly serviceRegistry: ServiceRegistry;
|
|
10857
|
+
protected readonly updateListeners: DocumentUpdateListener[];
|
|
10858
|
+
protected readonly buildPhaseListeners: MultiMap<DocumentState, DocumentBuildListener>;
|
|
10859
|
+
protected readonly documentPhaseListeners: MultiMap<DocumentState, DocumentPhaseListener>;
|
|
10860
|
+
protected readonly buildState: Map<string, DocumentBuildState>;
|
|
10861
|
+
protected readonly documentBuildWaiters: Map<string, Deferred<void>>;
|
|
10862
|
+
protected currentState: DocumentState;
|
|
10863
|
+
constructor(services: LangiumSharedCoreServices);
|
|
10864
|
+
build<T extends AstNode>(documents: Array<LangiumDocument<T>>, options?: BuildOptions, cancelToken?: CancellationToken): Promise<void>;
|
|
10865
|
+
update(changed: URI$1[], deleted: URI$1[], cancelToken?: CancellationToken): Promise<void>;
|
|
10866
|
+
protected emitUpdate(changed: URI$1[], deleted: URI$1[]): Promise<void>;
|
|
10867
|
+
/**
|
|
10868
|
+
* Sort the given documents by priority. By default, documents with an open text document are prioritized.
|
|
10869
|
+
* This is useful to ensure that visible documents show their diagnostics before all other documents.
|
|
10870
|
+
*
|
|
10871
|
+
* This improves the responsiveness in large workspaces as users usually don't care about diagnostics
|
|
10872
|
+
* in files that are currently not opened in the editor.
|
|
10873
|
+
*/
|
|
10874
|
+
protected sortDocuments(documents: LangiumDocument[]): LangiumDocument[];
|
|
10875
|
+
private hasTextDocument;
|
|
10876
|
+
/**
|
|
10877
|
+
* Check whether the given document should be relinked after changes were found in the given URIs.
|
|
10878
|
+
*/
|
|
10879
|
+
protected shouldRelink(document: LangiumDocument, changedUris: Set<string>): boolean;
|
|
10880
|
+
onUpdate(callback: DocumentUpdateListener): Disposable;
|
|
10881
|
+
/**
|
|
10882
|
+
* Build the given documents by stepping through all build phases. If a document's state indicates
|
|
10883
|
+
* that a certain build phase is already done, the phase is skipped for that document.
|
|
10884
|
+
*
|
|
10885
|
+
* @param documents The documents to build.
|
|
10886
|
+
* @param options the {@link BuildOptions} to use.
|
|
10887
|
+
* @param cancelToken A cancellation token that can be used to cancel the build.
|
|
10888
|
+
* @returns A promise that resolves when the build is done.
|
|
10889
|
+
*/
|
|
10890
|
+
protected buildDocuments(documents: LangiumDocument[], options: BuildOptions, cancelToken: CancellationToken): Promise<void>;
|
|
10891
|
+
/**
|
|
10892
|
+
* Runs prior to beginning the build process to update the {@link DocumentBuildState} for each document
|
|
10893
|
+
*
|
|
10894
|
+
* @param documents collection of documents to be built
|
|
10895
|
+
* @param options the {@link BuildOptions} to use
|
|
10896
|
+
*/
|
|
10897
|
+
protected prepareBuild(documents: LangiumDocument[], options: BuildOptions): void;
|
|
10898
|
+
/**
|
|
10899
|
+
* Runs a cancelable operation on a set of documents to bring them to a specified {@link DocumentState}.
|
|
10900
|
+
*
|
|
10901
|
+
* @param documents The array of documents to process.
|
|
10902
|
+
* @param targetState The target {@link DocumentState} to bring the documents to.
|
|
10903
|
+
* @param cancelToken A token that can be used to cancel the operation.
|
|
10904
|
+
* @param callback A function to be called for each document.
|
|
10905
|
+
* @returns A promise that resolves when all documents have been processed or the operation is canceled.
|
|
10906
|
+
* @throws Will throw `OperationCancelled` if the operation is canceled via a `CancellationToken`.
|
|
10907
|
+
*/
|
|
10908
|
+
protected runCancelable(documents: LangiumDocument[], targetState: DocumentState, cancelToken: CancellationToken, callback: (document: LangiumDocument) => MaybePromise<unknown>): Promise<void>;
|
|
10909
|
+
onBuildPhase(targetState: DocumentState, callback: DocumentBuildListener): Disposable;
|
|
10910
|
+
onDocumentPhase(targetState: DocumentState, callback: DocumentPhaseListener): Disposable;
|
|
10911
|
+
waitUntil(state: DocumentState, cancelToken?: CancellationToken): Promise<void>;
|
|
10912
|
+
waitUntil(state: DocumentState, uri?: URI$1, cancelToken?: CancellationToken): Promise<URI$1 | undefined>;
|
|
10913
|
+
protected notifyDocumentPhase(document: LangiumDocument, state: DocumentState, cancelToken: CancellationToken): Promise<void>;
|
|
10914
|
+
protected notifyBuildPhase(documents: LangiumDocument[], state: DocumentState, cancelToken: CancellationToken): Promise<void>;
|
|
10915
|
+
/**
|
|
10916
|
+
* Determine whether the given document should be linked during a build. The default
|
|
10917
|
+
* implementation checks the `eagerLinking` property of the build options. If it's set to `true`
|
|
10918
|
+
* or `undefined`, the document is included in the linking phase. This also affects the
|
|
10919
|
+
* references indexing phase, which depends on eager linking.
|
|
10920
|
+
*/
|
|
10921
|
+
protected shouldLink(document: LangiumDocument): boolean;
|
|
10922
|
+
/**
|
|
10923
|
+
* Determine whether the given document should be validated during a build. The default
|
|
10924
|
+
* implementation checks the `validation` property of the build options. If it's set to `true`
|
|
10925
|
+
* or a `ValidationOptions` object, the document is included in the validation phase.
|
|
10926
|
+
*/
|
|
10927
|
+
protected shouldValidate(document: LangiumDocument): boolean;
|
|
10928
|
+
/**
|
|
10929
|
+
* Run validation checks on the given document and store the resulting diagnostics in the document.
|
|
10930
|
+
* If the document already contains diagnostics, the new ones are added to the list.
|
|
10931
|
+
*/
|
|
10932
|
+
protected validate(document: LangiumDocument, cancelToken: CancellationToken): Promise<void>;
|
|
10933
|
+
protected getBuildOptions(document: LangiumDocument): BuildOptions;
|
|
10934
|
+
}
|
|
9811
10935
|
//#endregion
|
|
9812
10936
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/workspace/workspace-lock.d.ts
|
|
9813
10937
|
/**
|
|
@@ -9837,6 +10961,17 @@ interface WorkspaceLock {
|
|
|
9837
10961
|
*/
|
|
9838
10962
|
cancelWrite(): void;
|
|
9839
10963
|
}
|
|
10964
|
+
declare class DefaultWorkspaceLock implements WorkspaceLock {
|
|
10965
|
+
private previousTokenSource;
|
|
10966
|
+
private writeQueue;
|
|
10967
|
+
private readQueue;
|
|
10968
|
+
private done;
|
|
10969
|
+
write(action: (token: CancellationToken) => MaybePromise<void>): Promise<void>;
|
|
10970
|
+
read<T>(action: () => MaybePromise<T>): Promise<T>;
|
|
10971
|
+
private enqueue;
|
|
10972
|
+
private performNextOperation;
|
|
10973
|
+
cancelWrite(): void;
|
|
10974
|
+
}
|
|
9840
10975
|
//#endregion
|
|
9841
10976
|
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/workspace/workspace-manager.d.ts
|
|
9842
10977
|
/**
|
|
@@ -9955,7 +11090,7 @@ type LangiumDefaultCoreServices = {
|
|
|
9955
11090
|
readonly LexerErrorMessageProvider: ILexerErrorMessageProvider;
|
|
9956
11091
|
readonly CompletionParser: LangiumCompletionParser;
|
|
9957
11092
|
readonly TokenBuilder: TokenBuilder;
|
|
9958
|
-
readonly Lexer: Lexer;
|
|
11093
|
+
readonly Lexer: Lexer$1;
|
|
9959
11094
|
};
|
|
9960
11095
|
readonly documentation: {
|
|
9961
11096
|
readonly CommentProvider: CommentProvider;
|
|
@@ -10017,6 +11152,632 @@ type LangiumDefaultSharedCoreServices = {
|
|
|
10017
11152
|
* This is necessary to enable features like cross references across different languages.
|
|
10018
11153
|
*/
|
|
10019
11154
|
type LangiumSharedCoreServices = LangiumDefaultSharedCoreServices & LangiumGeneratedSharedCoreServices;
|
|
11155
|
+
/**
|
|
11156
|
+
* A deep partial type definition for services. We look into T to see whether its type definition contains
|
|
11157
|
+
* any methods. If it does, it's one of our services and therefore should not be partialized.
|
|
11158
|
+
*/
|
|
11159
|
+
type DeepPartial<T> = T[keyof T] extends Function ? T : { [P in keyof T]?: DeepPartial<T[P]>; };
|
|
11160
|
+
/**
|
|
11161
|
+
* Language-specific core services to be partially overridden via dependency injection.
|
|
11162
|
+
*/
|
|
11163
|
+
type PartialLangiumCoreServices = DeepPartial<LangiumCoreServices>;
|
|
11164
|
+
/**
|
|
11165
|
+
* Shared core services to be partially overridden via dependency injection.
|
|
11166
|
+
*/
|
|
11167
|
+
type PartialLangiumSharedCoreServices = DeepPartial<LangiumSharedCoreServices>;
|
|
11168
|
+
//#endregion
|
|
11169
|
+
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/default-module.d.ts
|
|
11170
|
+
/**
|
|
11171
|
+
* Context required for creating the default language-specific dependency injection module.
|
|
11172
|
+
*/
|
|
11173
|
+
interface DefaultCoreModuleContext {
|
|
11174
|
+
shared: LangiumSharedCoreServices;
|
|
11175
|
+
}
|
|
11176
|
+
/**
|
|
11177
|
+
* Creates a dependency injection module configuring the default core services.
|
|
11178
|
+
* This is a set of services that are dedicated to a specific language.
|
|
11179
|
+
*/
|
|
11180
|
+
declare function createDefaultCoreModule(context: DefaultCoreModuleContext): Module<LangiumCoreServices, LangiumDefaultCoreServices>;
|
|
11181
|
+
/**
|
|
11182
|
+
* Context required for creating the default shared dependency injection module.
|
|
11183
|
+
*/
|
|
11184
|
+
interface DefaultSharedCoreModuleContext {
|
|
11185
|
+
/**
|
|
11186
|
+
* Factory function to create a {@link FileSystemProvider}.
|
|
11187
|
+
*
|
|
11188
|
+
* Langium exposes an `EmptyFileSystem` and `NodeFileSystem`, exported through `langium/node`.
|
|
11189
|
+
* When running Langium as part of a vscode language server or a Node.js app, using the `NodeFileSystem` is recommended,
|
|
11190
|
+
* the `EmptyFileSystem` in every other use case.
|
|
11191
|
+
*/
|
|
11192
|
+
fileSystemProvider: (services: LangiumSharedCoreServices) => FileSystemProvider;
|
|
11193
|
+
}
|
|
11194
|
+
/**
|
|
11195
|
+
* Creates a dependency injection module configuring the default shared core services.
|
|
11196
|
+
* This is the set of services that are shared between multiple languages.
|
|
11197
|
+
*/
|
|
11198
|
+
declare function createDefaultSharedCoreModule(context: DefaultSharedCoreModuleContext): Module<LangiumSharedCoreServices, LangiumDefaultSharedCoreServices>;
|
|
11199
|
+
//#endregion
|
|
11200
|
+
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/parser/completion-parser-builder.d.ts
|
|
11201
|
+
declare function createCompletionParser(services: LangiumCoreServices): LangiumCompletionParser;
|
|
11202
|
+
//#endregion
|
|
11203
|
+
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/parser/cst-node-builder.d.ts
|
|
11204
|
+
declare class CstNodeBuilder {
|
|
11205
|
+
private rootNode;
|
|
11206
|
+
private nodeStack;
|
|
11207
|
+
get current(): CompositeCstNodeImpl;
|
|
11208
|
+
buildRootNode(input: string): RootCstNode;
|
|
11209
|
+
buildCompositeNode(feature: AbstractElement): CompositeCstNode;
|
|
11210
|
+
buildLeafNode(token: IToken, feature?: AbstractElement): LeafCstNode;
|
|
11211
|
+
removeNode(node: CstNode): void;
|
|
11212
|
+
addHiddenNodes(tokens: IToken[]): void;
|
|
11213
|
+
construct(item: {
|
|
11214
|
+
$type: string | symbol | undefined;
|
|
11215
|
+
$cstNode: CstNode;
|
|
11216
|
+
}): void;
|
|
11217
|
+
}
|
|
11218
|
+
declare abstract class AbstractCstNode implements CstNode {
|
|
11219
|
+
abstract get offset(): number;
|
|
11220
|
+
abstract get length(): number;
|
|
11221
|
+
abstract get end(): number;
|
|
11222
|
+
abstract get range(): Range;
|
|
11223
|
+
container?: CompositeCstNode;
|
|
11224
|
+
grammarSource?: AbstractElement;
|
|
11225
|
+
root: RootCstNode;
|
|
11226
|
+
private _astNode?;
|
|
11227
|
+
/** @deprecated use `container` instead. */
|
|
11228
|
+
get parent(): CompositeCstNode | undefined;
|
|
11229
|
+
/** @deprecated use `grammarSource` instead. */
|
|
11230
|
+
get feature(): AbstractElement | undefined;
|
|
11231
|
+
get hidden(): boolean;
|
|
11232
|
+
get astNode(): AstNode;
|
|
11233
|
+
set astNode(value: AstNode | undefined);
|
|
11234
|
+
/** @deprecated use `astNode` instead. */
|
|
11235
|
+
get element(): AstNode;
|
|
11236
|
+
get text(): string;
|
|
11237
|
+
}
|
|
11238
|
+
declare class LeafCstNodeImpl extends AbstractCstNode implements LeafCstNode {
|
|
11239
|
+
get offset(): number;
|
|
11240
|
+
get length(): number;
|
|
11241
|
+
get end(): number;
|
|
11242
|
+
get hidden(): boolean;
|
|
11243
|
+
get tokenType(): TokenType;
|
|
11244
|
+
get range(): Range;
|
|
11245
|
+
private _hidden;
|
|
11246
|
+
private _offset;
|
|
11247
|
+
private _length;
|
|
11248
|
+
private _range;
|
|
11249
|
+
private _tokenType;
|
|
11250
|
+
constructor(offset: number, length: number, range: Range, tokenType: TokenType, hidden?: boolean);
|
|
11251
|
+
}
|
|
11252
|
+
declare class CompositeCstNodeImpl extends AbstractCstNode implements CompositeCstNode {
|
|
11253
|
+
readonly content: CstNode[];
|
|
11254
|
+
private _rangeCache?;
|
|
11255
|
+
/** @deprecated use `content` instead. */
|
|
11256
|
+
get children(): CstNode[];
|
|
11257
|
+
get offset(): number;
|
|
11258
|
+
get length(): number;
|
|
11259
|
+
get end(): number;
|
|
11260
|
+
get range(): Range;
|
|
11261
|
+
private get firstNonHiddenNode();
|
|
11262
|
+
private get lastNonHiddenNode();
|
|
11263
|
+
}
|
|
11264
|
+
declare class RootCstNodeImpl extends CompositeCstNodeImpl implements RootCstNode {
|
|
11265
|
+
private _text;
|
|
11266
|
+
get text(): string;
|
|
11267
|
+
get fullText(): string;
|
|
11268
|
+
constructor(input?: string);
|
|
11269
|
+
}
|
|
11270
|
+
//#endregion
|
|
11271
|
+
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/parser/indentation-aware.d.ts
|
|
11272
|
+
type IndentationAwareDelimiter<TokenName extends string> = [begin: TokenName, end: TokenName];
|
|
11273
|
+
interface IndentationTokenBuilderOptions<TerminalName extends string = string, KeywordName extends string = string> {
|
|
11274
|
+
/**
|
|
11275
|
+
* The name of the token used to denote indentation in the grammar.
|
|
11276
|
+
* A possible definition in the grammar could look like this:
|
|
11277
|
+
* ```langium
|
|
11278
|
+
* terminal INDENT: ':synthetic-indent:';
|
|
11279
|
+
* ```
|
|
11280
|
+
*
|
|
11281
|
+
* @default 'INDENT'
|
|
11282
|
+
*/
|
|
11283
|
+
indentTokenName: TerminalName;
|
|
11284
|
+
/**
|
|
11285
|
+
* The name of the token used to denote deindentation in the grammar.
|
|
11286
|
+
* A possible definition in the grammar could look like this:
|
|
11287
|
+
* ```langium
|
|
11288
|
+
* terminal DEDENT: ':synthetic-dedent:';
|
|
11289
|
+
* ```
|
|
11290
|
+
*
|
|
11291
|
+
* @default 'DEDENT'
|
|
11292
|
+
*/
|
|
11293
|
+
dedentTokenName: TerminalName;
|
|
11294
|
+
/**
|
|
11295
|
+
* The name of the token used to denote whitespace other than indentation and newlines in the grammar.
|
|
11296
|
+
* A possible definition in the grammar could look like this:
|
|
11297
|
+
* ```langium
|
|
11298
|
+
* hidden terminal WS: /[ \t]+/;
|
|
11299
|
+
* ```
|
|
11300
|
+
*
|
|
11301
|
+
* @default 'WS'
|
|
11302
|
+
*/
|
|
11303
|
+
whitespaceTokenName: TerminalName;
|
|
11304
|
+
/**
|
|
11305
|
+
* The delimiter tokens inside of which indentation should be ignored and treated as normal whitespace.
|
|
11306
|
+
* For example, Python doesn't treat any whitespace between `(` and `)` as significant.
|
|
11307
|
+
*
|
|
11308
|
+
* Can be either terminal tokens or keyword tokens.
|
|
11309
|
+
*
|
|
11310
|
+
* @default []
|
|
11311
|
+
*/
|
|
11312
|
+
ignoreIndentationDelimiters: Array<IndentationAwareDelimiter<TerminalName | KeywordName>>;
|
|
11313
|
+
}
|
|
11314
|
+
declare const indentationBuilderDefaultOptions: IndentationTokenBuilderOptions;
|
|
11315
|
+
declare enum LexingMode {
|
|
11316
|
+
REGULAR = "indentation-sensitive",
|
|
11317
|
+
IGNORE_INDENTATION = "ignore-indentation"
|
|
11318
|
+
}
|
|
11319
|
+
interface IndentationLexingReport extends LexingReport {
|
|
11320
|
+
/** Dedent tokens that are necessary to close the remaining indents. */
|
|
11321
|
+
remainingDedents: IToken[];
|
|
11322
|
+
}
|
|
11323
|
+
/**
|
|
11324
|
+
* A token builder that is sensitive to indentation in the input text.
|
|
11325
|
+
* It will generate tokens for indentation and dedentation based on the indentation level.
|
|
11326
|
+
*
|
|
11327
|
+
* The first generic parameter corresponds to the names of terminal tokens,
|
|
11328
|
+
* while the second one corresponds to the names of keyword tokens.
|
|
11329
|
+
* Both parameters are optional and can be imported from `./generated/ast.js`.
|
|
11330
|
+
*
|
|
11331
|
+
* Inspired by https://github.com/chevrotain/chevrotain/blob/master/examples/lexer/python_indentation/python_indentation.js
|
|
11332
|
+
*/
|
|
11333
|
+
declare class IndentationAwareTokenBuilder<Terminals extends string = string, KeywordName extends string = string> extends DefaultTokenBuilder {
|
|
11334
|
+
/**
|
|
11335
|
+
* The stack stores all the previously matched indentation levels to understand how deeply the next tokens are nested.
|
|
11336
|
+
* The stack is valid for lexing
|
|
11337
|
+
*/
|
|
11338
|
+
protected indentationStack: number[];
|
|
11339
|
+
readonly options: IndentationTokenBuilderOptions<Terminals, KeywordName>;
|
|
11340
|
+
/**
|
|
11341
|
+
* The token type to be used for indentation tokens
|
|
11342
|
+
*/
|
|
11343
|
+
readonly indentTokenType: TokenType;
|
|
11344
|
+
/**
|
|
11345
|
+
* The token type to be used for dedentation tokens
|
|
11346
|
+
*/
|
|
11347
|
+
readonly dedentTokenType: TokenType;
|
|
11348
|
+
/**
|
|
11349
|
+
* A regular expression to match a series of tabs and/or spaces.
|
|
11350
|
+
* Override this to customize what the indentation is allowed to consist of.
|
|
11351
|
+
*/
|
|
11352
|
+
protected whitespaceRegExp: RegExp;
|
|
11353
|
+
constructor(options?: Partial<IndentationTokenBuilderOptions<NoInfer<Terminals>, NoInfer<KeywordName>>>);
|
|
11354
|
+
buildTokens(grammar: Grammar, options?: TokenBuilderOptions | undefined): TokenVocabulary;
|
|
11355
|
+
flushLexingReport(text: string): IndentationLexingReport;
|
|
11356
|
+
/**
|
|
11357
|
+
* Helper function to check if the current position is the start of a new line.
|
|
11358
|
+
*
|
|
11359
|
+
* @param text The full input string.
|
|
11360
|
+
* @param offset The current position at which to check
|
|
11361
|
+
* @returns Whether the current position is the start of a new line
|
|
11362
|
+
*/
|
|
11363
|
+
protected isStartOfLine(text: string, offset: number): boolean;
|
|
11364
|
+
/**
|
|
11365
|
+
* A helper function used in matching both indents and dedents.
|
|
11366
|
+
*
|
|
11367
|
+
* @param text The full input string.
|
|
11368
|
+
* @param offset The current position at which to attempt a match
|
|
11369
|
+
* @param tokens Previously scanned tokens
|
|
11370
|
+
* @param groups Token Groups
|
|
11371
|
+
* @returns The current and previous indentation levels and the matched whitespace
|
|
11372
|
+
*/
|
|
11373
|
+
protected matchWhitespace(text: string, offset: number, tokens: IToken[], groups: Record<string, IToken[]>): {
|
|
11374
|
+
currIndentLevel: number;
|
|
11375
|
+
prevIndentLevel: number;
|
|
11376
|
+
match: RegExpExecArray | null;
|
|
11377
|
+
};
|
|
11378
|
+
/**
|
|
11379
|
+
* Helper function to create an instance of an indentation token.
|
|
11380
|
+
*
|
|
11381
|
+
* @param tokenType Indent or dedent token type
|
|
11382
|
+
* @param text Full input string, used to calculate the line number
|
|
11383
|
+
* @param image The original image of the token (tabs or spaces)
|
|
11384
|
+
* @param offset Current position in the input string
|
|
11385
|
+
* @returns The indentation token instance
|
|
11386
|
+
*/
|
|
11387
|
+
protected createIndentationTokenInstance(tokenType: TokenType, text: string, image: string, offset: number): IToken;
|
|
11388
|
+
/**
|
|
11389
|
+
* Helper function to get the line number at a given offset.
|
|
11390
|
+
*
|
|
11391
|
+
* @param text Full input string, used to calculate the line number
|
|
11392
|
+
* @param offset Current position in the input string
|
|
11393
|
+
* @returns The line number at the given offset
|
|
11394
|
+
*/
|
|
11395
|
+
protected getLineNumber(text: string, offset: number): number;
|
|
11396
|
+
/**
|
|
11397
|
+
* A custom pattern for matching indents
|
|
11398
|
+
*
|
|
11399
|
+
* @param text The full input string.
|
|
11400
|
+
* @param offset The offset at which to attempt a match
|
|
11401
|
+
* @param tokens Previously scanned tokens
|
|
11402
|
+
* @param groups Token Groups
|
|
11403
|
+
*/
|
|
11404
|
+
protected indentMatcher(text: string, offset: number, tokens: IToken[], groups: Record<string, IToken[]>): ReturnType<CustomPatternMatcherFunc>;
|
|
11405
|
+
/**
|
|
11406
|
+
* A custom pattern for matching dedents
|
|
11407
|
+
*
|
|
11408
|
+
* @param text The full input string.
|
|
11409
|
+
* @param offset The offset at which to attempt a match
|
|
11410
|
+
* @param tokens Previously scanned tokens
|
|
11411
|
+
* @param groups Token Groups
|
|
11412
|
+
*/
|
|
11413
|
+
protected dedentMatcher(text: string, offset: number, tokens: IToken[], groups: Record<string, IToken[]>): ReturnType<CustomPatternMatcherFunc>;
|
|
11414
|
+
protected buildTerminalToken(terminal: TerminalRule): TokenType;
|
|
11415
|
+
/**
|
|
11416
|
+
* Resets the indentation stack between different runs of the lexer
|
|
11417
|
+
*
|
|
11418
|
+
* @param text Full text that was tokenized
|
|
11419
|
+
* @returns Remaining dedent tokens to match all previous indents at the end of the file
|
|
11420
|
+
*/
|
|
11421
|
+
flushRemainingDedents(text: string): IToken[];
|
|
11422
|
+
}
|
|
11423
|
+
/**
|
|
11424
|
+
* A lexer that is aware of indentation in the input text.
|
|
11425
|
+
* The only purpose of this lexer is to reset the internal state of the {@link IndentationAwareTokenBuilder}
|
|
11426
|
+
* between the tokenization of different text inputs.
|
|
11427
|
+
*
|
|
11428
|
+
* In your module, you can override the default lexer with this one as such:
|
|
11429
|
+
* ```ts
|
|
11430
|
+
* parser: {
|
|
11431
|
+
* TokenBuilder: () => new IndentationAwareTokenBuilder(),
|
|
11432
|
+
* Lexer: (services) => new IndentationAwareLexer(services),
|
|
11433
|
+
* }
|
|
11434
|
+
* ```
|
|
11435
|
+
*/
|
|
11436
|
+
declare class IndentationAwareLexer extends DefaultLexer {
|
|
11437
|
+
protected readonly indentationTokenBuilder: IndentationAwareTokenBuilder;
|
|
11438
|
+
constructor(services: LangiumCoreServices);
|
|
11439
|
+
tokenize(text: string, options?: TokenizeOptions): LexerResult;
|
|
11440
|
+
}
|
|
11441
|
+
//#endregion
|
|
11442
|
+
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/parser/langium-parser-builder.d.ts
|
|
11443
|
+
/**
|
|
11444
|
+
* Create and finalize a Langium parser. The parser rules are derived from the grammar, which is
|
|
11445
|
+
* available at `services.Grammar`.
|
|
11446
|
+
*/
|
|
11447
|
+
declare function createLangiumParser(services: LangiumCoreServices): LangiumParser;
|
|
11448
|
+
/**
|
|
11449
|
+
* Create a Langium parser without finalizing it. This is used to extract more detailed error
|
|
11450
|
+
* information when the parser is initially validated.
|
|
11451
|
+
*/
|
|
11452
|
+
declare function prepareLangiumParser(services: LangiumCoreServices): LangiumParser;
|
|
11453
|
+
//#endregion
|
|
11454
|
+
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/parser/parser-builder-base.d.ts
|
|
11455
|
+
declare function createParser<T extends BaseParser>(grammar: Grammar, parser: T, tokens: TokenTypeDictionary): T;
|
|
11456
|
+
//#endregion
|
|
11457
|
+
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/utils/errors.d.ts
|
|
11458
|
+
declare class ErrorWithLocation extends Error {
|
|
11459
|
+
constructor(node: CstNode | undefined, message: string);
|
|
11460
|
+
}
|
|
11461
|
+
declare function assertUnreachable(_: never): never;
|
|
11462
|
+
//#endregion
|
|
11463
|
+
//#region ../../node_modules/.pnpm/langium@3.5.0/node_modules/langium/lib/utils/grammar-loader.d.ts
|
|
11464
|
+
/**
|
|
11465
|
+
* Load a Langium grammar for your language from a JSON string. This is used by several services,
|
|
11466
|
+
* most notably the parser builder which interprets the grammar to create a parser.
|
|
11467
|
+
*/
|
|
11468
|
+
declare function loadGrammarFromJson(json: string): Grammar;
|
|
11469
|
+
declare namespace ast_utils_d_exports {
|
|
11470
|
+
export { AstStreamOptions, DeepPartialAstNode, assignMandatoryProperties, copyAstNode, findLocalReferences, findRootNode, getContainerOfType, getDocument, hasContainerOfType, linkContentToContainer, streamAllContents, streamAst, streamContents, streamReferences };
|
|
11471
|
+
}
|
|
11472
|
+
/**
|
|
11473
|
+
* Link the `$container` and other related properties of every AST node that is directly contained
|
|
11474
|
+
* in the given `node`.
|
|
11475
|
+
*/
|
|
11476
|
+
declare function linkContentToContainer(node: AstNode): void;
|
|
11477
|
+
/**
|
|
11478
|
+
* Walk along the hierarchy of containers from the given AST node to the root and return the first
|
|
11479
|
+
* node that matches the type predicate. If the start node itself matches, it is returned.
|
|
11480
|
+
* If no container matches, `undefined` is returned.
|
|
11481
|
+
*/
|
|
11482
|
+
declare function getContainerOfType<T extends AstNode>(node: AstNode | undefined, typePredicate: (n: AstNode) => n is T): T | undefined;
|
|
11483
|
+
/**
|
|
11484
|
+
* Walk along the hierarchy of containers from the given AST node to the root and check for existence
|
|
11485
|
+
* of a container that matches the given predicate. The start node is included in the checks.
|
|
11486
|
+
*/
|
|
11487
|
+
declare function hasContainerOfType(node: AstNode | undefined, predicate: (n: AstNode) => boolean): boolean;
|
|
11488
|
+
/**
|
|
11489
|
+
* Retrieve the document in which the given AST node is contained. A reference to the document is
|
|
11490
|
+
* usually held by the root node of the AST.
|
|
11491
|
+
*
|
|
11492
|
+
* @throws an error if the node is not contained in a document.
|
|
11493
|
+
*/
|
|
11494
|
+
declare function getDocument<T extends AstNode = AstNode>(node: AstNode): LangiumDocument<T>;
|
|
11495
|
+
/**
|
|
11496
|
+
* Returns the root node of the given AST node by following the `$container` references.
|
|
11497
|
+
*/
|
|
11498
|
+
declare function findRootNode(node: AstNode): AstNode;
|
|
11499
|
+
interface AstStreamOptions {
|
|
11500
|
+
/**
|
|
11501
|
+
* Optional target range that the nodes in the stream need to intersect
|
|
11502
|
+
*/
|
|
11503
|
+
range?: Range;
|
|
11504
|
+
}
|
|
11505
|
+
/**
|
|
11506
|
+
* Create a stream of all AST nodes that are directly contained in the given node. This includes
|
|
11507
|
+
* single-valued as well as multi-valued (array) properties.
|
|
11508
|
+
*/
|
|
11509
|
+
declare function streamContents(node: AstNode, options?: AstStreamOptions): Stream<AstNode>;
|
|
11510
|
+
/**
|
|
11511
|
+
* Create a stream of all AST nodes that are directly and indirectly contained in the given root node.
|
|
11512
|
+
* This does not include the root node itself.
|
|
11513
|
+
*/
|
|
11514
|
+
declare function streamAllContents(root: AstNode, options?: AstStreamOptions): TreeStream<AstNode>;
|
|
11515
|
+
/**
|
|
11516
|
+
* Create a stream of all AST nodes that are directly and indirectly contained in the given root node,
|
|
11517
|
+
* including the root node itself.
|
|
11518
|
+
*/
|
|
11519
|
+
declare function streamAst(root: AstNode, options?: AstStreamOptions): TreeStream<AstNode>;
|
|
11520
|
+
/**
|
|
11521
|
+
* Create a stream of all cross-references that are held by the given AST node. This includes
|
|
11522
|
+
* single-valued as well as multi-valued (array) properties.
|
|
11523
|
+
*/
|
|
11524
|
+
declare function streamReferences(node: AstNode): Stream<ReferenceInfo>;
|
|
11525
|
+
/**
|
|
11526
|
+
* Returns a Stream of references to the target node from the AstNode tree
|
|
11527
|
+
*
|
|
11528
|
+
* @param targetNode AstNode we are looking for
|
|
11529
|
+
* @param lookup AstNode where we search for references. If not provided, the root node of the document is used as the default value
|
|
11530
|
+
*/
|
|
11531
|
+
declare function findLocalReferences(targetNode: AstNode, lookup?: AstNode): Stream<Reference>;
|
|
11532
|
+
/**
|
|
11533
|
+
* Assigns all mandatory AST properties to the specified node.
|
|
11534
|
+
*
|
|
11535
|
+
* @param reflection Reflection object used to gather mandatory properties for the node.
|
|
11536
|
+
* @param node Specified node is modified in place and properties are directly assigned.
|
|
11537
|
+
*/
|
|
11538
|
+
declare function assignMandatoryProperties(reflection: AstReflection, node: AstNode): void;
|
|
11539
|
+
/**
|
|
11540
|
+
* Creates a deep copy of the specified AST node.
|
|
11541
|
+
* The resulting copy will only contain semantically relevant information, such as the `$type` property and AST properties.
|
|
11542
|
+
*
|
|
11543
|
+
* References are copied without resolved cross reference. The specified function is used to rebuild them.
|
|
11544
|
+
*/
|
|
11545
|
+
declare function copyAstNode<T extends AstNode = AstNode>(node: T, buildReference: (node: AstNode, property: string, refNode: CstNode | undefined, refText: string) => Reference<AstNode>): T;
|
|
11546
|
+
/**
|
|
11547
|
+
* Recursively makes all properties of an AstNode optional, except for those
|
|
11548
|
+
* that start with a dollar sign ($) or are of type boolean or are of type array.
|
|
11549
|
+
* If the type is a Reference or an Array, it applies the transformation recursively
|
|
11550
|
+
* to the inner type.
|
|
11551
|
+
* Otherwise the type is returned as is.
|
|
11552
|
+
*
|
|
11553
|
+
* @template T - The type to be transformed.
|
|
11554
|
+
*/
|
|
11555
|
+
type DeepPartialAstNode<T> = T extends Reference<infer U extends AstNode> ? Reference<DeepPartialAstNode<U>> : T extends AstNode ? { [K in keyof T as K extends `$${string}` | (T[K] extends (boolean | any[]) ? K : never) ? K : never]: DeepPartialAstNode<T[K]>; } & { [K in keyof T as K extends `$${string}` ? never : T[K] extends (boolean | any[]) ? never : K]?: DeepPartialAstNode<T[K]>; } : T extends Array<infer U> ? Array<DeepPartialAstNode<U>> : T;
|
|
11556
|
+
declare namespace cst_utils_d_exports {
|
|
11557
|
+
export { DefaultNameRegexp, RangeComparison, compareRange, findCommentNode, findDeclarationNodeAtOffset, findLeafNodeAtOffset, findLeafNodeBeforeOffset, flattenCst, getInteriorNodes, getNextNode, getPreviousNode, getStartlineNode, inRange, isChildNode, isCommentNode, streamCst, toDocumentSegment, tokenToRange };
|
|
11558
|
+
}
|
|
11559
|
+
/**
|
|
11560
|
+
* Create a stream of all CST nodes that are directly and indirectly contained in the given root node,
|
|
11561
|
+
* including the root node itself.
|
|
11562
|
+
*/
|
|
11563
|
+
declare function streamCst(node: CstNode): TreeStream<CstNode>;
|
|
11564
|
+
/**
|
|
11565
|
+
* Create a stream of all leaf nodes that are directly and indirectly contained in the given root node.
|
|
11566
|
+
*/
|
|
11567
|
+
declare function flattenCst(node: CstNode): Stream<LeafCstNode>;
|
|
11568
|
+
/**
|
|
11569
|
+
* Determines whether the specified cst node is a child of the specified parent node.
|
|
11570
|
+
*/
|
|
11571
|
+
declare function isChildNode(child: CstNode, parent: CstNode): boolean;
|
|
11572
|
+
declare function tokenToRange(token: IToken$1): Range;
|
|
11573
|
+
declare function toDocumentSegment(node: CstNode): DocumentSegment;
|
|
11574
|
+
declare function toDocumentSegment(node?: CstNode): DocumentSegment | undefined;
|
|
11575
|
+
declare enum RangeComparison {
|
|
11576
|
+
Before = 0,
|
|
11577
|
+
After = 1,
|
|
11578
|
+
OverlapFront = 2,
|
|
11579
|
+
OverlapBack = 3,
|
|
11580
|
+
Inside = 4,
|
|
11581
|
+
Outside = 5
|
|
11582
|
+
}
|
|
11583
|
+
declare function compareRange(range: Range, to: Range): RangeComparison;
|
|
11584
|
+
declare function inRange(range: Range, to: Range): boolean;
|
|
11585
|
+
declare const DefaultNameRegexp: RegExp;
|
|
11586
|
+
/**
|
|
11587
|
+
* Performs `findLeafNodeAtOffset` with a minor difference: When encountering a character that matches the `nameRegexp` argument,
|
|
11588
|
+
* it will instead return the leaf node at the `offset - 1` position.
|
|
11589
|
+
*
|
|
11590
|
+
* For LSP services, users expect that the declaration of an element is available if the cursor is directly after the element.
|
|
11591
|
+
*/
|
|
11592
|
+
declare function findDeclarationNodeAtOffset(cstNode: CstNode | undefined, offset: number, nameRegexp?: RegExp): LeafCstNode | undefined;
|
|
11593
|
+
declare function findCommentNode(cstNode: CstNode | undefined, commentNames: string[]): CstNode | undefined;
|
|
11594
|
+
declare function isCommentNode(cstNode: CstNode, commentNames: string[]): boolean;
|
|
11595
|
+
/**
|
|
11596
|
+
* Finds the leaf CST node at the specified 0-based string offset.
|
|
11597
|
+
* Note that the given offset will be within the range of the returned leaf node.
|
|
11598
|
+
*
|
|
11599
|
+
* If the offset does not point to a CST node (but just white space), this method will return `undefined`.
|
|
11600
|
+
*
|
|
11601
|
+
* @param node The CST node to search through.
|
|
11602
|
+
* @param offset The specified offset.
|
|
11603
|
+
* @returns The CST node at the specified offset.
|
|
11604
|
+
*/
|
|
11605
|
+
declare function findLeafNodeAtOffset(node: CstNode, offset: number): LeafCstNode | undefined;
|
|
11606
|
+
/**
|
|
11607
|
+
* Finds the leaf CST node at the specified 0-based string offset.
|
|
11608
|
+
* If no CST node exists at the specified position, it will return the leaf node before it.
|
|
11609
|
+
*
|
|
11610
|
+
* If there is no leaf node before the specified offset, this method will return `undefined`.
|
|
11611
|
+
*
|
|
11612
|
+
* @param node The CST node to search through.
|
|
11613
|
+
* @param offset The specified offset.
|
|
11614
|
+
* @returns The CST node closest to the specified offset.
|
|
11615
|
+
*/
|
|
11616
|
+
declare function findLeafNodeBeforeOffset(node: CstNode, offset: number): LeafCstNode | undefined;
|
|
11617
|
+
declare function getPreviousNode(node: CstNode, hidden?: boolean): CstNode | undefined;
|
|
11618
|
+
declare function getNextNode(node: CstNode, hidden?: boolean): CstNode | undefined;
|
|
11619
|
+
declare function getStartlineNode(node: CstNode): CstNode;
|
|
11620
|
+
declare function getInteriorNodes(start: CstNode, end: CstNode): CstNode[];
|
|
11621
|
+
declare namespace grammar_utils_d_exports {
|
|
11622
|
+
export { Cardinality, Operator, findAssignment, findNameAssignment, findNodeForKeyword, findNodeForProperty, findNodesForKeyword, findNodesForKeywordInternal, findNodesForProperty, getActionAtElement, getActionType, getAllReachableRules, getAllRulesUsedForCrossReferences, getCrossReferenceTerminal, getEntryRule, getExplicitRuleType, getHiddenRules, getRuleType, getRuleTypeName, getTypeName, isArrayCardinality, isArrayOperator, isCommentTerminal, isDataType, isDataTypeRule, isOptionalCardinality, terminalRegex };
|
|
11623
|
+
}
|
|
11624
|
+
/**
|
|
11625
|
+
* Returns the entry rule of the given grammar, if any. If the grammar file does not contain an entry rule,
|
|
11626
|
+
* the result is `undefined`.
|
|
11627
|
+
*/
|
|
11628
|
+
declare function getEntryRule(grammar: Grammar): ParserRule | undefined;
|
|
11629
|
+
/**
|
|
11630
|
+
* Returns all hidden terminal rules of the given grammar, if any.
|
|
11631
|
+
*/
|
|
11632
|
+
declare function getHiddenRules(grammar: Grammar): TerminalRule[];
|
|
11633
|
+
/**
|
|
11634
|
+
* Returns all rules that can be reached from the topmost rules of the specified grammar (entry and hidden terminal rules).
|
|
11635
|
+
*
|
|
11636
|
+
* @param grammar The grammar that contains all rules
|
|
11637
|
+
* @param allTerminals Whether or not to include terminals that are referenced only by other terminals
|
|
11638
|
+
* @returns A list of referenced parser and terminal rules. If the grammar contains no entry rule,
|
|
11639
|
+
* this function returns all rules of the specified grammar.
|
|
11640
|
+
*/
|
|
11641
|
+
declare function getAllReachableRules(grammar: Grammar, allTerminals: boolean): Set<AbstractRule>;
|
|
11642
|
+
/**
|
|
11643
|
+
* Returns all parser rules which provide types which are used in the grammar as type in cross-references.
|
|
11644
|
+
* @param grammar the grammar to investigate
|
|
11645
|
+
* @returns the set of parser rules whose contributed types are used as type in cross-references
|
|
11646
|
+
*/
|
|
11647
|
+
declare function getAllRulesUsedForCrossReferences(grammar: Grammar): Set<ParserRule>;
|
|
11648
|
+
/**
|
|
11649
|
+
* Determines the grammar expression used to parse a cross-reference (usually a reference to a terminal rule).
|
|
11650
|
+
* A cross-reference can declare this expression explicitly in the form `[Type : Terminal]`, but if `Terminal`
|
|
11651
|
+
* is omitted, this function attempts to infer it from the name of the referenced `Type` (using `findNameAssignment`).
|
|
11652
|
+
*
|
|
11653
|
+
* Returns the grammar expression used to parse the given cross-reference, or `undefined` if it is not declared
|
|
11654
|
+
* and cannot be inferred.
|
|
11655
|
+
*/
|
|
11656
|
+
declare function getCrossReferenceTerminal(crossRef: CrossReference): AbstractElement | undefined;
|
|
11657
|
+
/**
|
|
11658
|
+
* Determines whether the given terminal rule represents a comment. This is true if the rule is marked
|
|
11659
|
+
* as `hidden` and it does not match white space. This means every hidden token (i.e. excluded from the AST)
|
|
11660
|
+
* that contains visible characters is considered a comment.
|
|
11661
|
+
*/
|
|
11662
|
+
declare function isCommentTerminal(terminalRule: TerminalRule): boolean;
|
|
11663
|
+
/**
|
|
11664
|
+
* Find all CST nodes within the given node that contribute to the specified property.
|
|
11665
|
+
*
|
|
11666
|
+
* @param node A CST node in which to look for property assignments. If this is undefined, the result is an empty array.
|
|
11667
|
+
* @param property A property name of the constructed AST node. If this is undefined, the result is an empty array.
|
|
11668
|
+
*/
|
|
11669
|
+
declare function findNodesForProperty(node: CstNode | undefined, property: string | undefined): CstNode[];
|
|
11670
|
+
/**
|
|
11671
|
+
* Find a single CST node within the given node that contributes to the specified property.
|
|
11672
|
+
*
|
|
11673
|
+
* @param node A CST node in which to look for property assignments. If this is undefined, the result is `undefined`.
|
|
11674
|
+
* @param property A property name of the constructed AST node. If this is undefined, the result is `undefined`.
|
|
11675
|
+
* @param index If no index is specified or the index is less than zero, the first found node is returned. If the
|
|
11676
|
+
* specified index exceeds the number of assignments to the property, the last found node is returned. Otherwise,
|
|
11677
|
+
* the node with the specified index is returned.
|
|
11678
|
+
*/
|
|
11679
|
+
declare function findNodeForProperty(node: CstNode | undefined, property: string | undefined, index?: number): CstNode | undefined;
|
|
11680
|
+
/**
|
|
11681
|
+
* Find all CST nodes within the given node that correspond to the specified keyword.
|
|
11682
|
+
*
|
|
11683
|
+
* @param node A CST node in which to look for keywords. If this is undefined, the result is an empty array.
|
|
11684
|
+
* @param keyword A keyword as specified in the grammar.
|
|
11685
|
+
*/
|
|
11686
|
+
declare function findNodesForKeyword(node: CstNode | undefined, keyword: string): CstNode[];
|
|
11687
|
+
/**
|
|
11688
|
+
* Find a single CST node within the given node that corresponds to the specified keyword.
|
|
11689
|
+
*
|
|
11690
|
+
* @param node A CST node in which to look for keywords. If this is undefined, the result is `undefined`.
|
|
11691
|
+
* @param keyword A keyword as specified in the grammar.
|
|
11692
|
+
* @param index If no index is specified or the index is less than zero, the first found node is returned. If the
|
|
11693
|
+
* specified index exceeds the number of keyword occurrences, the last found node is returned. Otherwise,
|
|
11694
|
+
* the node with the specified index is returned.
|
|
11695
|
+
*/
|
|
11696
|
+
declare function findNodeForKeyword(node: CstNode | undefined, keyword: string, index?: number): CstNode | undefined;
|
|
11697
|
+
declare function findNodesForKeywordInternal(node: CstNode, keyword: string, element: AstNode | undefined): CstNode[];
|
|
11698
|
+
/**
|
|
11699
|
+
* If the given CST node was parsed in the context of a property assignment, the respective `Assignment` grammar
|
|
11700
|
+
* node is returned. If no assignment is found, the result is `undefined`.
|
|
11701
|
+
*
|
|
11702
|
+
* @param cstNode A CST node for which to find a property assignment.
|
|
11703
|
+
*/
|
|
11704
|
+
declare function findAssignment(cstNode: CstNode): Assignment | undefined;
|
|
11705
|
+
/**
|
|
11706
|
+
* Find an assignment to the `name` property for the given grammar type. This requires the `type` to be inferred
|
|
11707
|
+
* from a parser rule, and that rule must contain an assignment to the `name` property. In all other cases,
|
|
11708
|
+
* this function returns `undefined`.
|
|
11709
|
+
*/
|
|
11710
|
+
declare function findNameAssignment(type: AbstractType): Assignment | undefined;
|
|
11711
|
+
declare function getActionAtElement(element: AbstractElement): Action | undefined;
|
|
11712
|
+
type Cardinality = '?' | '*' | '+' | undefined;
|
|
11713
|
+
type Operator = '=' | '+=' | '?=' | undefined;
|
|
11714
|
+
declare function isOptionalCardinality(cardinality?: Cardinality, element?: AbstractElement): boolean;
|
|
11715
|
+
declare function isArrayCardinality(cardinality?: Cardinality): boolean;
|
|
11716
|
+
declare function isArrayOperator(operator?: Operator): boolean;
|
|
11717
|
+
/**
|
|
11718
|
+
* Determines whether the given parser rule is a _data type rule_, meaning that it has a
|
|
11719
|
+
* primitive return type like `number`, `boolean`, etc.
|
|
11720
|
+
*/
|
|
11721
|
+
declare function isDataTypeRule(rule: ParserRule): boolean;
|
|
11722
|
+
declare function isDataType(type: Type): boolean;
|
|
11723
|
+
declare function getExplicitRuleType(rule: ParserRule): string | undefined;
|
|
11724
|
+
declare function getTypeName(type: AbstractType | Action): string;
|
|
11725
|
+
declare function getActionType(action: Action): string | undefined;
|
|
11726
|
+
/**
|
|
11727
|
+
* This function is used at development time (for code generation and the internal type system) to get the type of the AST node produced by the given rule.
|
|
11728
|
+
* For data type rules, the name of the rule is returned,
|
|
11729
|
+
* e.g. "INT_value returns number: MY_INT;" returns "INT_value".
|
|
11730
|
+
* @param rule the given rule
|
|
11731
|
+
* @returns the name of the AST node type of the rule
|
|
11732
|
+
*/
|
|
11733
|
+
declare function getRuleTypeName(rule: AbstractRule): string;
|
|
11734
|
+
/**
|
|
11735
|
+
* This function is used at runtime to get the actual type of the values produced by the given rule at runtime.
|
|
11736
|
+
* For data type rules, the name of the declared return type of the rule is returned (if any),
|
|
11737
|
+
* e.g. "INT_value returns number: MY_INT;" returns "number".
|
|
11738
|
+
* @param rule the given rule
|
|
11739
|
+
* @returns the name of the type of the produced values of the rule at runtime
|
|
11740
|
+
*/
|
|
11741
|
+
declare function getRuleType(rule: AbstractRule): string;
|
|
11742
|
+
declare function terminalRegex(terminalRule: TerminalRule): RegExp;
|
|
11743
|
+
declare namespace regexp_utils_d_exports {
|
|
11744
|
+
export { NEWLINE_REGEXP, escapeRegExp, getTerminalParts, isMultilineComment, isWhitespace, partialMatches, partialRegExp, whitespaceCharacters };
|
|
11745
|
+
}
|
|
11746
|
+
/******************************************************************************
|
|
11747
|
+
* Copyright 2021 TypeFox GmbH
|
|
11748
|
+
* This program and the accompanying materials are made available under the
|
|
11749
|
+
* terms of the MIT License, which is available in the project root.
|
|
11750
|
+
******************************************************************************/
|
|
11751
|
+
declare const NEWLINE_REGEXP: RegExp;
|
|
11752
|
+
declare function getTerminalParts(regexp: RegExp | string): Array<{
|
|
11753
|
+
start: string;
|
|
11754
|
+
end: string;
|
|
11755
|
+
}>;
|
|
11756
|
+
declare function isMultilineComment(regexp: RegExp | string): boolean;
|
|
11757
|
+
/**
|
|
11758
|
+
* A set of all characters that are considered whitespace by the '\s' RegExp character class.
|
|
11759
|
+
* Taken from [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Character_classes).
|
|
11760
|
+
*/
|
|
11761
|
+
declare const whitespaceCharacters: string[];
|
|
11762
|
+
declare function isWhitespace(value: RegExp | string): boolean;
|
|
11763
|
+
declare function escapeRegExp(value: string): string;
|
|
11764
|
+
/**
|
|
11765
|
+
* Determines whether the given input has a partial match with the specified regex.
|
|
11766
|
+
* @param regex The regex to partially match against
|
|
11767
|
+
* @param input The input string
|
|
11768
|
+
* @returns Whether any match exists.
|
|
11769
|
+
*/
|
|
11770
|
+
declare function partialMatches(regex: RegExp | string, input: string): boolean;
|
|
11771
|
+
/**
|
|
11772
|
+
* Builds a partial regex from the input regex. A partial regex is able to match incomplete input strings. E.g.
|
|
11773
|
+
* a partial regex constructed from `/ab/` is able to match the string `a` without needing a following `b` character. However it won't match `b` alone.
|
|
11774
|
+
* @param regex The input regex to be converted.
|
|
11775
|
+
* @returns A partial regex constructed from the input regex.
|
|
11776
|
+
*/
|
|
11777
|
+
declare function partialRegExp(regex: RegExp | string): RegExp;
|
|
11778
|
+
declare namespace index_d_exports {
|
|
11779
|
+
export { AbstractAstReflection, AbstractCstNode, AbstractLangiumParser, AbstractParserErrorMessageProvider, AbstractThreadedAsyncParser, AstNode, AstNodeDescription, AstNodeDescriptionProvider, AstNodeLocator, AstNodeRegionWithAssignments, AstNodeTypesWithCrossReferences, AstNodeWithComment, AstNodeWithTextRegion, AstReflection, AstTypeList, ast_utils_d_exports as AstUtils, AsyncDisposable, AsyncParser, BaseParser, BiMap, BuildOptions, cancellation_d_exports as Cancellation, CommentProvider, CompletionParserResult, CompositeCstNode, CompositeCstNodeImpl, ConfigurationInitializedParams, ConfigurationProvider, ConfigurationSectionUpdate, ConfigurationSectionUpdateListener, ContextCache, CrossReferencesOfAstNodeType, CstNode, CstNodeBuilder, cst_utils_d_exports as CstUtils, DEFAULT_TOKENIZE_OPTIONS, DONE_RESULT, DatatypeSymbol, DeepPartial, DefaultAstNodeDescriptionProvider, DefaultAstNodeLocator, DefaultAsyncParser, DefaultCommentProvider, DefaultConfigurationProvider, DefaultCoreModuleContext, DefaultDocumentBuilder, DefaultDocumentValidator, DefaultHydrator, DefaultIndexManager, DefaultJsonSerializer, DefaultLangiumDocumentFactory, DefaultLangiumDocuments, DefaultLexer, DefaultLexerErrorMessageProvider, DefaultLinker, DefaultNameProvider, DefaultReferenceDescriptionProvider, DefaultReferences, DefaultScopeComputation, DefaultScopeProvider, DefaultServiceRegistry, DefaultSharedCoreModuleContext, DefaultTokenBuilder, DefaultValueConverter, DefaultWorkspaceLock, DefaultWorkspaceManager, Deferred, DehydrateContext, DiagnosticData, DiagnosticInfo, Disposable, DisposableCache, DocumentBuildListener, DocumentBuildState, DocumentBuilder, DocumentCache, DocumentPhaseListener, DocumentSegment, DocumentState, DocumentUpdateListener, DocumentValidator, DocumentationProvider, EMPTY_SCOPE, EMPTY_STREAM, Emitter, EmitterOptions, EmptyFileSystem, EmptyFileSystemProvider, ErrorWithLocation, Event, FileSelector, FileSystemFilter, FileSystemNode, FileSystemProvider, FindReferencesOptions, FlatStream, GenericAstNode, Grammar, ast_d_exports as GrammarAST, GrammarConfig, grammar_utils_d_exports as GrammarUtils, HydrateContext, Hydrator, IParserConfig, IParserDefinitionError, IndentationAwareLexer, IndentationAwareTokenBuilder, IndentationLexingReport, IndentationTokenBuilderOptions, IndexManager, JSDocComment, JSDocDocumentationProvider, JSDocElement, JSDocInline, JSDocLine, JSDocParagraph, JSDocParseOptions, JSDocRenderOptions, JSDocTag, JSDocValue, JsonDeserializeOptions, JsonSerializeOptions, JsonSerializer, LangiumCompletionParser, LangiumCoreServices, LangiumDefaultCoreServices, LangiumDefaultSharedCoreServices, LangiumDocument, LangiumDocumentFactory, LangiumDocuments, LangiumGeneratedCoreServices, LangiumGeneratedSharedCoreServices, LangiumParser, LangiumParserErrorMessageProvider, LangiumSharedCoreServices, LanguageMetaData, LeafCstNode, LeafCstNodeImpl, Lexer$1 as Lexer, LexerResult, LexingDiagnostic, LexingDiagnosticSeverity, LexingMode, LexingReport, Linker, LinkingError, LinkingErrorData, MapScope, MaybePromise, MinusOne, Module, MultiMap, Mutable, NameProvider, NamedAstNode, OperationCancelled, ParseResult, ParserOptions, ParserWorker, PartialLangiumCoreServices, PartialLangiumSharedCoreServices, PrecomputedScopes, Properties, PropertyType, Reduction, Reference, ReferenceDescription, ReferenceDescriptionProvider, ReferenceInfo, References, regexp_utils_d_exports as RegExpUtils, ResolvedReference, RootCstNode, RootCstNodeImpl, Scope, ScopeComputation, ScopeOptions, ScopeProvider, ServiceRegistry, SimpleCache, Stream, StreamImpl, StreamScope, TextDocument, TextDocumentProvider, TokenBuilder, TokenBuilderOptions, TokenizeMode, TokenizeOptions, TreeIterator, TreeStream, TreeStreamImpl, TypeMetaData, TypeProperty, URI$1 as URI, UriUtils, ValidationAcceptor, ValidationCategory, ValidationCheck, ValidationChecks, ValidationOptions, ValidationPreparation, ValidationRegistry, ValidationSeverity, ValueConverter, ValueType, WorkerMessageCallback, WorkerMessagePost, WorkspaceCache, WorkspaceFolder, WorkspaceLock, WorkspaceManager, assertUnreachable, createCompletionParser, createDefaultCoreModule, createDefaultSharedCoreModule, createGrammarConfig, createLangiumParser, createParser, delayNextTick, diagnosticData, eagerLoad, getDiagnosticRange, indentationBuilderDefaultOptions, inject, interruptAndCheck, isAstNode, isAstNodeDescription, isAstNodeWithComment, isCompositeCstNode, isIMultiModeLexerDefinition, isJSDoc, isLeafCstNode, isLinkingError, isNamed, isOperationCancelled, isReference, isRootCstNode, isTokenTypeArray, isTokenTypeDictionary, loadGrammarFromJson, parseJSDoc, prepareLangiumParser, setInterruptionPeriod, startCancelableOperation, stream, toDiagnosticData, toDiagnosticSeverity };
|
|
11780
|
+
}
|
|
10020
11781
|
//#endregion
|
|
10021
11782
|
//#region ../../node_modules/.pnpm/vscode-languageserver@9.0.1/node_modules/vscode-languageserver/lib/common/progress.d.ts
|
|
10022
11783
|
interface WorkDoneProgressReporter {
|
|
@@ -12058,7 +13819,7 @@ declare class DefaultCompletionProvider implements CompletionProvider {
|
|
|
12058
13819
|
protected readonly scopeProvider: ScopeProvider;
|
|
12059
13820
|
protected readonly grammar: Grammar;
|
|
12060
13821
|
protected readonly nameProvider: NameProvider;
|
|
12061
|
-
protected readonly lexer: Lexer;
|
|
13822
|
+
protected readonly lexer: Lexer$1;
|
|
12062
13823
|
protected readonly nodeKindProvider: NodeKindProvider;
|
|
12063
13824
|
protected readonly fuzzyMatcher: FuzzyMatcher;
|
|
12064
13825
|
protected readonly grammarConfig: GrammarConfig;
|
|
@@ -12123,4 +13884,4 @@ declare class DefaultCompletionProvider implements CompletionProvider {
|
|
|
12123
13884
|
protected buildCompletionTextEdit(context: CompletionContext, label: string, newText: string): TextEdit | undefined;
|
|
12124
13885
|
}
|
|
12125
13886
|
//#endregion
|
|
12126
|
-
export {
|
|
13887
|
+
export { cancellation_d_exports as $, DiagnosticInfo as A, DefaultNameProvider as B, CodeLensParams as C, RequestType as D, NotificationType as E, DefaultScopeProvider as F, AstNodeDescription as G, AsyncDisposable as H, Scope as I, ReferenceInfo as J, CstNode as K, JSDocDocumentationProvider as L, DefaultValueConverter as M, ValueType as N, DefaultDocumentValidator as O, MaybePromise as P, PrecomputedScopes as Q, DefaultIndexManager as R, CodeActionParams as S, DocumentSymbolParams as T, Disposable as U, WorkspaceCache as V, AstNode as W, LangiumDocument as X, DefaultLangiumDocuments as Y, LangiumDocumentFactory as Z, CodeLensProvider as _, TextEdit as _t, LangiumServices as a, CodeLens as at, DefaultWorkspaceManager as b, ast_d_exports as bt, AbstractSemanticTokenProvider as c, Diagnostic as ct, AbstractFormatter as d, DocumentSymbol as dt, CancellationToken as et, FormattingRegion as f, FormattingOptions as ft, DefaultDocumentHighlightProvider as g, SymbolKind as gt, DocumentLinkProvider as h, Range as ht, NextFeature as i, CodeAction as it, DefaultScopeComputation as j, ValidationOptions as k, SemanticTokenAcceptor as l, DocumentHighlight as lt, NodeKindProvider as m, Location as mt, CompletionContext as n, FileSystemNode as nt, LangiumSharedServices as o, Command as ot, DocumentSymbolProvider as p, Hover as pt, Reference as q, DefaultCompletionProvider as r, FileSystemProvider as rt, DefaultWorkspaceSymbolProvider as s, CompletionItemKind as st, CompletionAcceptor as t, Stream as tt, AstNodeHoverProvider as u, DocumentLink as ut, CodeActionProvider as v, WorkspaceFolder as vt, DocumentLinkParams as w, BuildOptions as x, URI$1 as xt, index_d_exports as y, Keyword as yt, ReferenceDescription as z };
|