Skip to content

Commit

Permalink
use get instead of getter, according to the review
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesMeierSE committed Oct 8, 2024
1 parent 508da7a commit 91e2df5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/langium/src/validation/document-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export class DefaultDocumentValidator implements DocumentValidator {
}

protected async validateAstBefore(rootNode: AstNode, options: ValidationOptions, acceptor: ValidationAcceptor, cancelToken = CancellationToken.None): Promise<void> {
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);
Expand All @@ -210,7 +210,7 @@ export class DefaultDocumentValidator implements DocumentValidator {
}

protected async validateAstAfter(rootNode: AstNode, options: ValidationOptions, acceptor: ValidationAcceptor, cancelToken = CancellationToken.None): Promise<void> {
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);
Expand Down
4 changes: 2 additions & 2 deletions packages/langium/src/validation/validation-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ export class ValidationRegistry {
};
}

getChecksBefore(): ValidationPreparation[] {
get checksBefore(): ValidationPreparation[] {
return this.entriesBefore;
}

getChecksAfter(): ValidationPreparation[] {
get checksAfter(): ValidationPreparation[] {
return this.entriesAfter;
}

Expand Down

0 comments on commit 91e2df5

Please sign in to comment.