Interface LangiumTypirValidator<Specifics>

This service is a technical adapter service, which helps to call the Typir validations, triggered by the Langium validation mechanisms.

interface LangiumTypirValidator<Specifics extends TypirLangiumSpecifics> {
    checkTypingProblemsWithTypir(
        node: Specifics["LanguageType"],
        accept: ValidationAcceptor,
    ): void;
    checkTypingProblemsWithTypirAfterDocument(
        rootNode: Specifics["LanguageType"],
        accept: ValidationAcceptor,
    ): void;
    checkTypingProblemsWithTypirBeforeDocument(
        rootNode: Specifics["LanguageType"],
        accept: ValidationAcceptor,
    ): void;
}

Type Parameters

Implemented by

Methods

  • Executes all checks, which are directly derived from the current Typir configuration, i.e. checks that arguments fit to parameters for function calls (including operands for operators).

    Parameters

    • node: Specifics["LanguageType"]

      the current AST node to check regarding typing issues

    • accept: ValidationAcceptor

      receives the found validation issues

    Returns void

  • Will be called once after finishing the validation of a LangiumDocument.

    Parameters

    • rootNode: Specifics["LanguageType"]

      the root node of the current document

    • accept: ValidationAcceptor

      receives the found validation issues

    Returns void

  • Will be called once before starting the validation of a LangiumDocument.

    Parameters

    • rootNode: Specifics["LanguageType"]

      the root node of the current document

    • accept: ValidationAcceptor

      receives the found validation issues

    Returns void