From 91e2df54eff073624491023fc6ad8ebd185e39d7 Mon Sep 17 00:00:00 2001 From: Johannes Meier Date: Tue, 8 Oct 2024 14:10:37 +0200 Subject: [PATCH] use get instead of getter, according to the review --- packages/langium/src/validation/document-validator.ts | 4 ++-- packages/langium/src/validation/validation-registry.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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; }