@hydranium/core 1.0.0-next.75 → 1.0.0-next.77

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.
@@ -6,8 +6,8 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { type LogThreshold, type MaybeObservableValue, ObservableValue, type Tracer } from '@hydranium/protocol';
10
- import { type AstNode, type AstNodeLocator, type AstReflection, DefaultDocumentValidator, type DiagnosticInfo, type LangiumDocument, type LangiumCoreServices, type ValidateSingleNodeOptions, type ValidationOptions, type ValidationSeverity } from '@hydranium/langium';
9
+ import { type MessageDefinition, type MessageParams, type ParamsArg, type ParamsOf, type LogThreshold, type MaybeObservableValue, ObservableValue, type Tracer } from '@hydranium/protocol';
10
+ import { type AstNode, type AstNodeLocator, type AstReflection, DefaultDocumentValidator, type DiagnosticInfo, type LangiumDocument, type LangiumCoreServices, type Lexer, type ValidateSingleNodeOptions, type ValidationOptions, type ValidationSeverity } from '@hydranium/langium';
11
11
  import type { CancellationToken } from 'vscode-languageserver-protocol';
12
12
  import { Diagnostic } from 'vscode-languageserver-types';
13
13
  import { type LogNameOptions } from '../diagnostics/logger.js';
@@ -48,7 +48,7 @@ export interface TransferLspDiagnostic extends Diagnostic {
48
48
  * `Diagnostic.code` — so without a framework identity every adopter wanting to
49
49
  * render it has to special-case Langium's shape.
50
50
  */
51
- export declare const UNRESOLVED_REFERENCE: import("@hydranium/protocol").MessageDefinition<"Could not resolve reference to {referenceType} named '{refText}'.">;
51
+ export declare const UNRESOLVED_REFERENCE: MessageDefinition<"Could not resolve reference to {referenceType} named '{refText}'.">;
52
52
  /**
53
53
  * A character no token of the grammar can start with.
54
54
  *
@@ -74,7 +74,77 @@ export declare const UNRESOLVED_REFERENCE: import("@hydranium/protocol").Message
74
74
  * means: chevrotain reports how many characters the lexer discarded to recover,
75
75
  * which for a single stray character is one and for a run of them is the run.
76
76
  */
77
- export declare const LEXING_ERROR: import("@hydranium/protocol").MessageDefinition<"unexpected character: ->{character}<- at offset: {offset}, skipped {skipped} characters.">;
77
+ export declare const UNEXPECTED_CHARACTER: MessageDefinition<"unexpected character: ->{character}<- at offset: {offset}, skipped {skipped} characters.">;
78
+ /**
79
+ * A token the grammar does not admit at this position.
80
+ *
81
+ * **The English is byte-identical to Langium's
82
+ * `LangiumParserErrorMessageProvider.buildMismatchTokenMessage`, and must stay
83
+ * so**, on the same rule as {@link UNRESOLVED_REFERENCE}.
84
+ *
85
+ * `expected` is a token type name, which is grammar vocabulary rather than
86
+ * translatable text — only the frame around it is. Promoting it into the code
87
+ * instead would make the catalogue as large as the grammar.
88
+ */
89
+ export declare const UNEXPECTED_TOKEN: MessageDefinition<"Expecting token of type '{expected}' but found `{found}`.">;
90
+ /**
91
+ * Input left over once the entry rule had matched.
92
+ *
93
+ * **The English is byte-identical to Langium's
94
+ * `LangiumParserErrorMessageProvider.buildNotAllInputParsedMessage`, and must
95
+ * stay so.**
96
+ */
97
+ export declare const TRAILING_INPUT: MessageDefinition<"Expecting end of file but found `{found}`.">;
98
+ /**
99
+ * A mode-popping token reached with nothing on the lexer's mode stack.
100
+ *
101
+ * **The English is byte-identical to CHEVROTAIN's
102
+ * `defaultLexerErrorProvider.buildUnableToPopLexerModeMessage`, and must stay
103
+ * so**, the closing clause running on without punctuation exactly as upstream
104
+ * writes it.
105
+ *
106
+ * Reachable only from a multi-mode lexer, which a grammar opts into through a
107
+ * custom token builder.
108
+ */
109
+ export declare const UNPOPPABLE_LEXER_MODE: MessageDefinition<"Unable to pop Lexer Mode after encountering Token ->{image}<- The Mode Stack is empty">;
110
+ /**
111
+ * A dedent that lines up with no enclosing indentation level.
112
+ *
113
+ * **The English is byte-identical to LANGIUM's `IndentationAwareTokenBuilder`,
114
+ * and must stay so** — the one lexing sentence Langium words itself rather than
115
+ * relaying from chevrotain, which is why it renders through no
116
+ * `ILexerErrorMessageProvider` and an adopter cannot reach it by replacing one.
117
+ *
118
+ * `stack` is the indentation stack as the template literal upstream stringifies
119
+ * it, comma-joined: structure would have to survive {@link MessageParams}, which
120
+ * holds scalars, and a translation has nothing to say about the numbers anyway.
121
+ */
122
+ export declare const INVALID_DEDENT: MessageDefinition<"Invalid dedent level {level} at offset: {offset}. Current indentation stack: {stack}">;
123
+ /**
124
+ * A position where none of a rule's alternatives can start.
125
+ *
126
+ * **The English is byte-identical to CHEVROTAIN's
127
+ * `defaultParserErrorProvider.buildNoViableAltMessage`, and must stay so** —
128
+ * one layer further out than {@link UNEXPECTED_TOKEN}, because Langium overrides
129
+ * only two of the four parser sentences and passes this one straight through.
130
+ *
131
+ * `sequences` is the token-sequence list chevrotain generated, carried whole
132
+ * rather than as structure: {@link MessageParams} holds scalars, and the list is
133
+ * token names in any case, so only the frame around it is translatable.
134
+ */
135
+ export declare const NO_VIABLE_ALTERNATIVE: MessageDefinition<"Expecting: one of these possible Token sequences:\n{sequences}\nbut found: '{found}'">;
136
+ /**
137
+ * A repetition that had to match at least once and matched nothing.
138
+ *
139
+ * **The English is byte-identical to CHEVROTAIN's
140
+ * `defaultParserErrorProvider.buildEarlyExitMessage`, and must stay so**,
141
+ * including the doubled colon after `sequences::`, which is upstream's and not a
142
+ * typo to repair here — a divergence would silently stop the identity attaching.
143
+ *
144
+ * Named for the empty repetition rather than for chevrotain's `EarlyExit`, which
145
+ * describes its own control flow rather than the reader's problem.
146
+ */
147
+ export declare const MISSING_ITERATION: MessageDefinition<"Expecting: expecting at least one iteration which starts with one of these possible Token sequences::\n <{sequences}>\nbut found: '{found}'">;
78
148
  export interface DocumentValidatorOptions extends LogNameOptions {
79
149
  /**
80
150
  * Level at which the `validateDocument` timing line is emitted, or `'off'`
@@ -121,6 +191,12 @@ export declare class HydraniumDocumentValidator extends DefaultDocumentValidator
121
191
  protected readonly tracer: Tracer;
122
192
  protected readonly astNodeLocator: AstNodeLocator;
123
193
  protected readonly reflection: AstReflection;
194
+ protected readonly lexer: Lexer;
195
+ /**
196
+ * {@link tokenTypeNames}' answer. Nothing invalidates it: the vocabulary
197
+ * comes from the grammar, which is fixed once the DI tree is composed.
198
+ */
199
+ protected expectedNames?: readonly string[];
124
200
  protected readonly logLevel: ObservableValue<LogThreshold>;
125
201
  protected readonly logAfterMs: ObservableValue<number>;
126
202
  protected readonly validateVirtualDocuments: ObservableValue<boolean>;
@@ -132,26 +208,31 @@ export declare class HydraniumDocumentValidator extends DefaultDocumentValidator
132
208
  }, options?: DocumentValidatorOptions);
133
209
  validateDocument(document: LangiumDocument, options?: ValidationOptions, cancelToken?: CancellationToken): Promise<Diagnostic[]>;
134
210
  /**
135
- * Langium's validation pass, plus the framework identity on the lexing
136
- * diagnostics it produced.
211
+ * Langium's validation pass, plus the framework identity on the lexing and
212
+ * parsing diagnostics it produced.
213
+ *
214
+ * **Here rather than in an override of `processLexingErrors` /
215
+ * `processParsingErrors`, and the reason is that neither seam can see what
216
+ * the identity needs.** Langium hands them a `ParseResult`, which carries the
217
+ * AST and the error lists but not the source text — and the offending
218
+ * CHARACTER, or the offending TOKEN, is the parameter a translation exists to
219
+ * interpolate. The document does carry it, and this is the innermost point
220
+ * that still holds one.
137
221
  *
138
- * **Here rather than in an override of `processLexingErrors`, and the reason
139
- * is that the seam cannot see what the identity needs.** Langium hands that
140
- * method a `ParseResult`, which carries the AST and the error lists but not
141
- * the source text — and the offending CHARACTER is the parameter a
142
- * translation exists to interpolate. The document does carry it, and this is
143
- * the innermost point that still holds one. Reconstructing the character by
144
- * matching it out of the finished sentence was the alternative, and it
145
- * inverts the direction the rest of this file works in: every other identity
146
- * here is derived from structured fields and CHECKED against the prose.
222
+ * Correlating the finished diagnostics back to the `ParseResult`'s error
223
+ * lists positionally is the alternative, and it is unsound for the parsing
224
+ * half: `processParsingErrors` DROPS an error whose token offsets are `NaN`
225
+ * and whose exception carries no `previousToken`, so the two lists differ in
226
+ * length exactly when recovery has been at work.
147
227
  *
148
228
  * Inside the timing span rather than around it, so the line accounts for the
149
229
  * whole pass.
150
230
  */
151
231
  protected validateAndIdentify(document: LangiumDocument, options?: ValidationOptions, cancelToken?: CancellationToken): Promise<Diagnostic[]>;
152
232
  /**
153
- * Add the {@link LEXING_ERROR} identity to one diagnostic, or return it
154
- * untouched when it is not the sentence that identity renders.
233
+ * Add whichever lexing identity renders `diagnostic`'s sentence, or return it
234
+ * untouched when none of them does — a custom lexer's own report, which
235
+ * Langium admits through `lexerReport`, being the case that reaches the end.
155
236
  *
156
237
  * The parameters come from the diagnostic's own RANGE, not from
157
238
  * `parseResult.lexerErrors`. Both hold the same numbers, and the range is the
@@ -166,6 +247,64 @@ export declare class HydraniumDocumentValidator extends DefaultDocumentValidator
166
247
  * message.
167
248
  */
168
249
  protected identifyLexingError(document: LangiumDocument, diagnostic: Diagnostic): Diagnostic;
250
+ /**
251
+ * Add whichever parser identity renders `diagnostic`'s sentence, or return it
252
+ * untouched when none of them does — an adopter that replaced the parser
253
+ * error-message provider being the case that reaches the last branch.
254
+ *
255
+ * `found` comes from the diagnostic's own RANGE, for the same reason
256
+ * {@link identifyLexingError} reads its parameters there. A token whose
257
+ * offsets chevrotain could not report collapses to a zero-width range, which
258
+ * yields the empty string the sentence already renders for it.
259
+ *
260
+ * **`expected` is recovered by SEARCHING the vocabulary, because nothing
261
+ * carries it.** Chevrotain hands the expected token type to the message
262
+ * provider and keeps it on neither the exception nor the diagnostic, so the
263
+ * only structured source left is the grammar's own vocabulary: every token
264
+ * type is offered to the same `format` the identity renders with, and the one
265
+ * that reproduces the message supplies the parameter. Matching it out of the
266
+ * prose instead would derive a parameter from a sentence that a Langium
267
+ * reword can change without warning. Two distinct names cannot render one
268
+ * sentence, so the match is unique where it exists.
269
+ */
270
+ protected identifyParsingError(document: LangiumDocument, diagnostic: Diagnostic): Diagnostic;
271
+ /** `diagnostic` carrying `definition`'s identity, over whatever `data` it already had. */
272
+ protected identified<S extends string>(diagnostic: Diagnostic, definition: MessageDefinition<S>, ...params: ParamsArg<S>): Diagnostic;
273
+ /**
274
+ * `definition`'s parameters as they appear in `message`, taking the ones in
275
+ * `known` as given, or `undefined` when `message` is not that sentence.
276
+ *
277
+ * **The only parameters in this file taken OUT of the prose rather than
278
+ * derived and checked against it, and the bound on that is what `known`
279
+ * is for.** A generated token-sequence list, a lexer's indentation stack: for
280
+ * these there is no finite candidate set to offer to `format` the way a token
281
+ * type name can be, and no structured field carries them. What keeps the read
282
+ * honest is that everything else in the sentence is either a fixed literal or
283
+ * a parameter the caller derived independently, so the frame either matches
284
+ * exactly or the sentence is declined.
285
+ *
286
+ * **The trailing format-and-compare is load-bearing once more than one
287
+ * parameter is unknown.** Each is captured up to the NEXT fixed separator, so
288
+ * a separator that also occurs inside a value would cut early — re-rendering
289
+ * catches that, where for a single unknown between two affixes it could not
290
+ * fail. Two adjacent placeholders are declined outright: nothing marks the
291
+ * boundary, so no capture is recoverable.
292
+ *
293
+ * The frame is split off the declaration's own `text`, so it cannot drift
294
+ * from the sentence `format` renders.
295
+ */
296
+ protected sliceFramed<S extends string>(message: string, definition: MessageDefinition<S>, known: MessageParams): ParamsOf<S> | undefined;
297
+ /**
298
+ * Every token type name the grammar declares, as
299
+ * {@link identifyParsingError} candidates.
300
+ *
301
+ * Read off the lexer, whose `definition` the `Lexer` INTERFACE declares —
302
+ * the parser holds the same vocabulary only behind Langium's default class,
303
+ * where an adopter's replacement need not keep it. A token type the parser
304
+ * expects but the lexer does not declare yields no match, which declines the
305
+ * identity rather than attaching a wrong one.
306
+ */
307
+ protected tokenTypeNames(): readonly string[];
169
308
  /**
170
309
  * Skip validation for a node **and its children** when
171
310
  * {@link shouldSkipValidation} returns true.
@@ -1 +1 @@
1
- {"version":3,"file":"document-validator.d.ts","sourceRoot":"","sources":["../../../src/langium/validation/document-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAIJ,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,eAAe,EACf,KAAK,MAAM,EAEb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACJ,KAAK,O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AAG,IAAI;IAQ/H;;;;;;;;OAQG;IACH,SAAS,CAAC,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU;IAkBlE;;;;;;;;;;;;;;;OAeG;IACH,SAAS,CAAC,eAAe,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;cAapF,YAAY,CAAC,CAAC,SAAS,OAAO,EAC9C,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,GAC/B,qBAAqB;IAWxB;;;;;;;;;;OAUG;IACH,SAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,MAAM;CAejG"}
1
+ {"version":3,"file":"document-validator.d.ts","sourceRoot":"","sources":["../../../src/langium/validation/document-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAIJ,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,eAAe,EACf,KAAK,MAAM,EAEb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACJ,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,wBAAwB,EACxB,KAAK,cAAc,EAEnB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,KAAK,EACV,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAIxE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,E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AAC,gBAAgB,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,MAAM;CAejG"}
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { defineMessage, describeError, messageData, ObservableValue, TransferDiagnostic } from '@hydranium/protocol';
9
+ import { defineMessage, describeError, interpolate, messageData, ObservableValue, TransferDiagnostic } from '@hydranium/protocol';
10
10
  import { DefaultDocumentValidator, DocumentValidator } from '@hydranium/langium';
11
11
  // A VALUE import, for `Diagnostic.getMessageString`: `message` is
12
12
  // `string | MarkupContent` in LSP 3.17+, so upstream's own reader is what
@@ -55,7 +55,90 @@ export const UNRESOLVED_REFERENCE = defineMessage('hydranium/core/unresolved-ref
55
55
  * means: chevrotain reports how many characters the lexer discarded to recover,
56
56
  * which for a single stray character is one and for a run of them is the run.
57
57
  */
58
- export const LEXING_ERROR = defineMessage('hydranium/core/lexing-error', 'unexpected character: ->{character}<- at offset: {offset}, skipped {skipped} characters.');
58
+ export const UNEXPECTED_CHARACTER = defineMessage('hydranium/core/unexpected-character', 'unexpected character: ->{character}<- at offset: {offset}, skipped {skipped} characters.');
59
+ /**
60
+ * A token the grammar does not admit at this position.
61
+ *
62
+ * **The English is byte-identical to Langium's
63
+ * `LangiumParserErrorMessageProvider.buildMismatchTokenMessage`, and must stay
64
+ * so**, on the same rule as {@link UNRESOLVED_REFERENCE}.
65
+ *
66
+ * `expected` is a token type name, which is grammar vocabulary rather than
67
+ * translatable text — only the frame around it is. Promoting it into the code
68
+ * instead would make the catalogue as large as the grammar.
69
+ */
70
+ export const UNEXPECTED_TOKEN = defineMessage('hydranium/core/unexpected-token', "Expecting token of type '{expected}' but found `{found}`.");
71
+ /**
72
+ * Input left over once the entry rule had matched.
73
+ *
74
+ * **The English is byte-identical to Langium's
75
+ * `LangiumParserErrorMessageProvider.buildNotAllInputParsedMessage`, and must
76
+ * stay so.**
77
+ */
78
+ export const TRAILING_INPUT = defineMessage('hydranium/core/trailing-input', 'Expecting end of file but found `{found}`.');
79
+ /**
80
+ * A mode-popping token reached with nothing on the lexer's mode stack.
81
+ *
82
+ * **The English is byte-identical to CHEVROTAIN's
83
+ * `defaultLexerErrorProvider.buildUnableToPopLexerModeMessage`, and must stay
84
+ * so**, the closing clause running on without punctuation exactly as upstream
85
+ * writes it.
86
+ *
87
+ * Reachable only from a multi-mode lexer, which a grammar opts into through a
88
+ * custom token builder.
89
+ */
90
+ export const UNPOPPABLE_LEXER_MODE = defineMessage('hydranium/core/unpoppable-lexer-mode', 'Unable to pop Lexer Mode after encountering Token ->{image}<- The Mode Stack is empty');
91
+ /**
92
+ * A dedent that lines up with no enclosing indentation level.
93
+ *
94
+ * **The English is byte-identical to LANGIUM's `IndentationAwareTokenBuilder`,
95
+ * and must stay so** — the one lexing sentence Langium words itself rather than
96
+ * relaying from chevrotain, which is why it renders through no
97
+ * `ILexerErrorMessageProvider` and an adopter cannot reach it by replacing one.
98
+ *
99
+ * `stack` is the indentation stack as the template literal upstream stringifies
100
+ * it, comma-joined: structure would have to survive {@link MessageParams}, which
101
+ * holds scalars, and a translation has nothing to say about the numbers anyway.
102
+ */
103
+ export const INVALID_DEDENT = defineMessage('hydranium/core/invalid-dedent', 'Invalid dedent level {level} at offset: {offset}. Current indentation stack: {stack}');
104
+ /**
105
+ * A position where none of a rule's alternatives can start.
106
+ *
107
+ * **The English is byte-identical to CHEVROTAIN's
108
+ * `defaultParserErrorProvider.buildNoViableAltMessage`, and must stay so** —
109
+ * one layer further out than {@link UNEXPECTED_TOKEN}, because Langium overrides
110
+ * only two of the four parser sentences and passes this one straight through.
111
+ *
112
+ * `sequences` is the token-sequence list chevrotain generated, carried whole
113
+ * rather than as structure: {@link MessageParams} holds scalars, and the list is
114
+ * token names in any case, so only the frame around it is translatable.
115
+ */
116
+ export const NO_VIABLE_ALTERNATIVE = defineMessage('hydranium/core/no-viable-alternative', "Expecting: one of these possible Token sequences:\n{sequences}\nbut found: '{found}'");
117
+ /**
118
+ * A repetition that had to match at least once and matched nothing.
119
+ *
120
+ * **The English is byte-identical to CHEVROTAIN's
121
+ * `defaultParserErrorProvider.buildEarlyExitMessage`, and must stay so**,
122
+ * including the doubled colon after `sequences::`, which is upstream's and not a
123
+ * typo to repair here — a divergence would silently stop the identity attaching.
124
+ *
125
+ * Named for the empty repetition rather than for chevrotain's `EarlyExit`, which
126
+ * describes its own control flow rather than the reader's problem.
127
+ */
128
+ export const MISSING_ITERATION = defineMessage('hydranium/core/missing-iteration', "Expecting: expecting at least one iteration which starts with one of these possible Token sequences::\n <{sequences}>\nbut found: '{found}'");
129
+ /**
130
+ * The two sentences whose only free parameter is a generated list, in the order
131
+ * {@link HydraniumDocumentValidator.identifyParsingError} tries them. Order is
132
+ * free: their frames share a prefix but diverge before the list begins, so at
133
+ * most one can match.
134
+ */
135
+ const SEQUENCE_LISTING_MESSAGES = [NO_VIABLE_ALTERNATIVE, MISSING_ITERATION];
136
+ /**
137
+ * Splits a template into alternating frame and placeholder NAME, for
138
+ * {@link HydraniumDocumentValidator.sliceFramed}. The capturing group is what
139
+ * keeps the names in the result rather than discarding them.
140
+ */
141
+ const PLACEHOLDER_CAPTURE = /\{([^}]+)\}/;
59
142
  /**
60
143
  * Langium's own `data.code` values for a diagnostic that came out of the lexer.
61
144
  *
@@ -85,6 +168,12 @@ export class HydraniumDocumentValidator extends DefaultDocumentValidator {
85
168
  tracer;
86
169
  astNodeLocator;
87
170
  reflection;
171
+ lexer;
172
+ /**
173
+ * {@link tokenTypeNames}' answer. Nothing invalidates it: the vocabulary
174
+ * comes from the grammar, which is fixed once the DI tree is composed.
175
+ */
176
+ expectedNames;
88
177
  logLevel;
89
178
  logAfterMs;
90
179
  validateVirtualDocuments;
@@ -94,6 +183,7 @@ export class HydraniumDocumentValidator extends DefaultDocumentValidator {
94
183
  this.tracer = services.shared.Tracer.for(options.logName ?? 'DocumentValidator').trace('instantiated');
95
184
  this.astNodeLocator = services.workspace.AstNodeLocator;
96
185
  this.reflection = services.shared.AstReflection;
186
+ this.lexer = services.parser.Lexer;
97
187
  this.logLevel = ObservableValue.from(options.logLevel ?? 'debug');
98
188
  this.logAfterMs = ObservableValue.from(options.logAfterMs ?? 20);
99
189
  this.validateVirtualDocuments = ObservableValue.from(options.validateVirtualDocuments ?? false);
@@ -120,18 +210,22 @@ export class HydraniumDocumentValidator extends DefaultDocumentValidator {
120
210
  });
121
211
  }
122
212
  /**
123
- * Langium's validation pass, plus the framework identity on the lexing
124
- * diagnostics it produced.
213
+ * Langium's validation pass, plus the framework identity on the lexing and
214
+ * parsing diagnostics it produced.
125
215
  *
126
- * **Here rather than in an override of `processLexingErrors`, and the reason
127
- * is that the seam cannot see what the identity needs.** Langium hands that
128
- * method a `ParseResult`, which carries the AST and the error lists but not
129
- * the source text — and the offending CHARACTER is the parameter a
130
- * translation exists to interpolate. The document does carry it, and this is
131
- * the innermost point that still holds one. Reconstructing the character by
132
- * matching it out of the finished sentence was the alternative, and it
133
- * inverts the direction the rest of this file works in: every other identity
134
- * here is derived from structured fields and CHECKED against the prose.
216
+ * **Here rather than in an override of `processLexingErrors` /
217
+ * `processParsingErrors`, and the reason is that neither seam can see what
218
+ * the identity needs.** Langium hands them a `ParseResult`, which carries the
219
+ * AST and the error lists but not the source text — and the offending
220
+ * CHARACTER, or the offending TOKEN, is the parameter a translation exists to
221
+ * interpolate. The document does carry it, and this is the innermost point
222
+ * that still holds one.
223
+ *
224
+ * Correlating the finished diagnostics back to the `ParseResult`'s error
225
+ * lists positionally is the alternative, and it is unsound for the parsing
226
+ * half: `processParsingErrors` DROPS an error whose token offsets are `NaN`
227
+ * and whose exception carries no `previousToken`, so the two lists differ in
228
+ * length exactly when recovery has been at work.
135
229
  *
136
230
  * Inside the timing span rather than around it, so the line accounts for the
137
231
  * whole pass.
@@ -141,14 +235,18 @@ export class HydraniumDocumentValidator extends DefaultDocumentValidator {
141
235
  // Mapped in place over the array Langium built, rather than filtered and
142
236
  // re-concatenated: the publish order is the diagnostic order and a
143
237
  // reordering would move a squiggle's entry in the problems list.
238
+ // Each pass guards on its own `data.code`, so at most one can claim a
239
+ // given diagnostic and the order between them carries no meaning.
144
240
  for (let index = 0; index < diagnostics.length; index++) {
145
241
  diagnostics[index] = this.identifyLexingError(document, diagnostics[index]);
242
+ diagnostics[index] = this.identifyParsingError(document, diagnostics[index]);
146
243
  }
147
244
  return diagnostics;
148
245
  }
149
246
  /**
150
- * Add the {@link LEXING_ERROR} identity to one diagnostic, or return it
151
- * untouched when it is not the sentence that identity renders.
247
+ * Add whichever lexing identity renders `diagnostic`'s sentence, or return it
248
+ * untouched when none of them does — a custom lexer's own report, which
249
+ * Langium admits through `lexerReport`, being the case that reaches the end.
152
250
  *
153
251
  * The parameters come from the diagnostic's own RANGE, not from
154
252
  * `parseResult.lexerErrors`. Both hold the same numbers, and the range is the
@@ -168,19 +266,157 @@ export class HydraniumDocumentValidator extends DefaultDocumentValidator {
168
266
  return diagnostic;
169
267
  }
170
268
  const text = document.textDocument;
269
+ const message = Diagnostic.getMessageString(diagnostic);
171
270
  const offset = text.offsetAt(diagnostic.range.start);
172
- const params = {
271
+ const stray = {
173
272
  character: text.getText().charAt(offset),
174
273
  offset,
175
274
  skipped: text.offsetAt(diagnostic.range.end) - offset
176
275
  };
177
- if (Diagnostic.getMessageString(diagnostic) !== LEXING_ERROR.format(params)) {
276
+ if (message === UNEXPECTED_CHARACTER.format(stray)) {
277
+ return this.identified(diagnostic, UNEXPECTED_CHARACTER, stray);
278
+ }
279
+ // The mode-pop error's range spans the offending token exactly, upstream
280
+ // reporting its `startOffset` with the image's own length.
281
+ const image = text.getText(diagnostic.range);
282
+ if (message === UNPOPPABLE_LEXER_MODE.format({ image })) {
283
+ return this.identified(diagnostic, UNPOPPABLE_LEXER_MODE, { image });
284
+ }
285
+ // `level` and `stack` are lexer state that reaches no field here, so they
286
+ // are sliced; `offset` is given, which is what anchors the slice.
287
+ const dedent = this.sliceFramed(message, INVALID_DEDENT, { offset });
288
+ return dedent === undefined ? diagnostic : this.identified(diagnostic, INVALID_DEDENT, dedent);
289
+ }
290
+ /**
291
+ * Add whichever parser identity renders `diagnostic`'s sentence, or return it
292
+ * untouched when none of them does — an adopter that replaced the parser
293
+ * error-message provider being the case that reaches the last branch.
294
+ *
295
+ * `found` comes from the diagnostic's own RANGE, for the same reason
296
+ * {@link identifyLexingError} reads its parameters there. A token whose
297
+ * offsets chevrotain could not report collapses to a zero-width range, which
298
+ * yields the empty string the sentence already renders for it.
299
+ *
300
+ * **`expected` is recovered by SEARCHING the vocabulary, because nothing
301
+ * carries it.** Chevrotain hands the expected token type to the message
302
+ * provider and keeps it on neither the exception nor the diagnostic, so the
303
+ * only structured source left is the grammar's own vocabulary: every token
304
+ * type is offered to the same `format` the identity renders with, and the one
305
+ * that reproduces the message supplies the parameter. Matching it out of the
306
+ * prose instead would derive a parameter from a sentence that a Langium
307
+ * reword can change without warning. Two distinct names cannot render one
308
+ * sentence, so the match is unique where it exists.
309
+ */
310
+ identifyParsingError(document, diagnostic) {
311
+ const data = diagnostic.data;
312
+ if (data?.code !== DocumentValidator.ParsingError) {
178
313
  return diagnostic;
179
314
  }
180
- // Merged OVER Langium's data, so `data.code` survives for the readers that
181
- // switch on it — `stopAfterLexingErrors` is one, and the GLSP head's
182
- // read-only decision is another.
183
- return { ...diagnostic, code: LEXING_ERROR.code, data: { ...data, ...messageData(LEXING_ERROR, params) } };
315
+ const message = Diagnostic.getMessageString(diagnostic);
316
+ const found = document.textDocument.getText(diagnostic.range);
317
+ if (message === TRAILING_INPUT.format({ found })) {
318
+ return this.identified(diagnostic, TRAILING_INPUT, { found });
319
+ }
320
+ const expected = this.tokenTypeNames().find(name => UNEXPECTED_TOKEN.format({ expected: name, found }) === message);
321
+ if (expected !== undefined) {
322
+ return this.identified(diagnostic, UNEXPECTED_TOKEN, { expected, found });
323
+ }
324
+ for (const definition of SEQUENCE_LISTING_MESSAGES) {
325
+ const params = this.sliceFramed(message, definition, { found });
326
+ if (params !== undefined) {
327
+ return this.identified(diagnostic, definition, params);
328
+ }
329
+ }
330
+ return diagnostic;
331
+ }
332
+ /** `diagnostic` carrying `definition`'s identity, over whatever `data` it already had. */
333
+ identified(diagnostic, definition, ...params) {
334
+ // Merged OVER the existing data, so Langium's `code` survives for the
335
+ // readers that switch on it — `stopAfterParsingErrors` is one, and the
336
+ // GLSP head's read-only decision is another.
337
+ const data = diagnostic.data;
338
+ return { ...diagnostic, code: definition.code, data: { ...data, ...messageData(definition, ...params) } };
339
+ }
340
+ /**
341
+ * `definition`'s parameters as they appear in `message`, taking the ones in
342
+ * `known` as given, or `undefined` when `message` is not that sentence.
343
+ *
344
+ * **The only parameters in this file taken OUT of the prose rather than
345
+ * derived and checked against it, and the bound on that is what `known`
346
+ * is for.** A generated token-sequence list, a lexer's indentation stack: for
347
+ * these there is no finite candidate set to offer to `format` the way a token
348
+ * type name can be, and no structured field carries them. What keeps the read
349
+ * honest is that everything else in the sentence is either a fixed literal or
350
+ * a parameter the caller derived independently, so the frame either matches
351
+ * exactly or the sentence is declined.
352
+ *
353
+ * **The trailing format-and-compare is load-bearing once more than one
354
+ * parameter is unknown.** Each is captured up to the NEXT fixed separator, so
355
+ * a separator that also occurs inside a value would cut early — re-rendering
356
+ * catches that, where for a single unknown between two affixes it could not
357
+ * fail. Two adjacent placeholders are declined outright: nothing marks the
358
+ * boundary, so no capture is recoverable.
359
+ *
360
+ * The frame is split off the declaration's own `text`, so it cannot drift
361
+ * from the sentence `format` renders.
362
+ */
363
+ sliceFramed(message, definition, known) {
364
+ // `split` with a capturing group interleaves literals and placeholder
365
+ // names, so even indices are frame and odd ones are parameters.
366
+ const parts = definition.text.split(PLACEHOLDER_CAPTURE);
367
+ const params = { ...known };
368
+ let cursor = 0;
369
+ for (let index = 0; index < parts.length; index += 2) {
370
+ const literal = parts[index];
371
+ if (!message.startsWith(literal, cursor)) {
372
+ return undefined;
373
+ }
374
+ cursor += literal.length;
375
+ const name = parts[index + 1];
376
+ if (name === undefined) {
377
+ break;
378
+ }
379
+ const given = params[name];
380
+ if (given !== undefined) {
381
+ const rendered = String(given);
382
+ if (!message.startsWith(rendered, cursor)) {
383
+ return undefined;
384
+ }
385
+ cursor += rendered.length;
386
+ continue;
387
+ }
388
+ const separator = parts[index + 2];
389
+ const trailing = parts[index + 3] === undefined;
390
+ if (separator === '' && !trailing) {
391
+ return undefined;
392
+ }
393
+ const at = trailing && separator === '' ? message.length : message.indexOf(separator, cursor);
394
+ if (at < cursor) {
395
+ return undefined;
396
+ }
397
+ params[name] = message.slice(cursor, at);
398
+ cursor = at;
399
+ }
400
+ if (cursor !== message.length || interpolate(definition.text, params) !== message) {
401
+ return undefined;
402
+ }
403
+ // Narrowing only: every placeholder the template names was either given or
404
+ // captured above, which is precisely what `ParamsOf` requires.
405
+ return params;
406
+ }
407
+ /**
408
+ * Every token type name the grammar declares, as
409
+ * {@link identifyParsingError} candidates.
410
+ *
411
+ * Read off the lexer, whose `definition` the `Lexer` INTERFACE declares —
412
+ * the parser holds the same vocabulary only behind Langium's default class,
413
+ * where an adopter's replacement need not keep it. A token type the parser
414
+ * expects but the lexer does not declare yields no match, which declines the
415
+ * identity rather than attaching a wrong one.
416
+ */
417
+ tokenTypeNames() {
418
+ this.expectedNames ??= Object.keys(this.lexer.definition);
419
+ return this.expectedNames;
184
420
  }
185
421
  /**
186
422
  * Skip validation for a node **and its children** when
@@ -1 +1 @@
1
- {"version":3,"file":"document-validator.js","sourceRoot":"","sources":["../../../src/langium/validation/document-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,aAAa,EACb,aAAa,EACb,WAAW,EAGX,eAAe,EAEf,kBAAkB,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAIJ,wBAAwB,EAExB,iBAAiB,EAMnB,MAAM,oBAAoB,CAAC;AAE5B,kEAAkE;AAClE,0EAA0E;AA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AAQ,CAAC,GAAG,kBAAkB,CAAC,uBAAuB,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC;YAC/G,OAAO,QAAQ,CAAC;QACnB,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ;YACjB,CAAC,CAAC,GAAG,QAAQ,GAAG,kBAAkB,CAAC,yBAAyB,GAAG,IAAI,CAAC,QAAQ,GAAG,kBAAkB,CAAC,uBAAuB,GAAG,IAAI,CAAC,KAAK,EAAE;YACxI,CAAC,CAAC,GAAG,QAAQ,GAAG,kBAAkB,CAAC,uBAAuB,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAChF,CAAC;CACH"}
1
+ {"version":3,"file":"document-validator.js","sourceRoot":"","sources":["../../../src/langium/validation/document-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,aAAa,EACb,aAAa,EACb,WAAW,EAGX,WAAW,EAKX,eAAe,EAEf,kBAAkB,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAIJ,wBAAwB,EAExB,iBAAiB,EAOnB,MAAM,oBAAoB,CAAC;AAE5B,kEAAkE;AAClE,0EAA0E;AAC1E,yDAAyD;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAyBhE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAC9C,qCAAqC,EACrC,mEAAmE,CACrE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAC9C,qCAAqC,EACrC,0FAA0F,CAC5F,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAC1C,iCAAiC,EACjC,2D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AAyB,GAAG,IAAI,CAAC,QAAQ,GAAG,kBAAkB,CAAC,uBAAuB,GAAG,IAAI,CAAC,KAAK,EAAE;YACxI,CAAC,CAAC,GAAG,QAAQ,GAAG,kBAAkB,CAAC,uBAAuB,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAChF,CAAC;CACH"}
@@ -19,7 +19,7 @@ export * from './carriers.js';
19
19
  export * from './renderer.js';
20
20
  export { MODEL_UPDATE_EDIT } from '../langium/model-service/model-service.js';
21
21
  export { SEPARATOR_IN_NAME } from '../langium/naming/name-separator-validation.js';
22
- export { LEXING_ERROR, UNRESOLVED_REFERENCE } from '../langium/validation/document-validator.js';
22
+ export { INVALID_DEDENT, UNEXPECTED_CHARACTER, MISSING_ITERATION, NO_VIABLE_ALTERNATIVE, TRAILING_INPUT, UNEXPECTED_TOKEN, UNPOPPABLE_LEXER_MODE, UNRESOLVED_REFERENCE } from '../langium/validation/document-validator.js';
23
23
  export { NO_LOADABLE_CONTENT } from '../langium/workspace/langium-documents.js';
24
24
  export { NO_SUCH_FILE, NO_SUCH_PATH } from '../langium/workspace/in-memory-file-system-provider.js';
25
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;GAQG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/messages/index.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;;;GAQG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EACJ,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACtB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wDAAwD,CAAC"}