diff --git a/packages/langium/src/validation/document-validator.ts b/packages/langium/src/validation/document-validator.ts index 8862b5eff..fb3754411 100644 --- a/packages/langium/src/validation/document-validator.ts +++ b/packages/langium/src/validation/document-validator.ts @@ -192,7 +192,7 @@ export class DefaultDocumentValidator implements DocumentValidator { } protected async validateAstBefore(rootNode: AstNode, options: ValidationOptions, acceptor: ValidationAcceptor, cancelToken = CancellationToken.None): Promise { - const checksBefore = this.validationRegistry.getChecksBefore(); + const checksBefore = this.validationRegistry.checksBefore; for (const checkBefore of checksBefore) { await interruptAndCheck(cancelToken); await checkBefore(rootNode, acceptor, options.categories ?? [], cancelToken); @@ -210,7 +210,7 @@ export class DefaultDocumentValidator implements DocumentValidator { } protected async validateAstAfter(rootNode: AstNode, options: ValidationOptions, acceptor: ValidationAcceptor, cancelToken = CancellationToken.None): Promise { - const checksAfter = this.validationRegistry.getChecksAfter(); + const checksAfter = this.validationRegistry.checksAfter; for (const checkAfter of checksAfter) { await interruptAndCheck(cancelToken); await checkAfter(rootNode, acceptor, options.categories ?? [], cancelToken); diff --git a/packages/langium/src/validation/validation-registry.ts b/packages/langium/src/validation/validation-registry.ts index b2efcd1da..8f7dc8a9a 100644 --- a/packages/langium/src/validation/validation-registry.ts +++ b/packages/langium/src/validation/validation-registry.ts @@ -253,11 +253,11 @@ export class ValidationRegistry { }; } - getChecksBefore(): ValidationPreparation[] { + get checksBefore(): ValidationPreparation[] { return this.entriesBefore; } - getChecksAfter(): ValidationPreparation[] { + get checksAfter(): ValidationPreparation[] { return this.entriesAfter; }