Перейти к содержимому
Топаз6.0 · До релиза
Загрузка →

Поиск в документации

Спецификация 6.0

Выберите результат стрелками и нажмите Enter, чтобы открыть его.

Введите имя API, номер диагностики, правило или тему проекта.

    Диагностика TPZ2002

    A tagged template used a tag that is not in the built-in template registry.

    Diagnostic and cause

    Ссылка

    Unknown template tag

    Семейство
    topaz
    Этап
    parse
    Код
    TPZ2002

    Причина и условия

    During parsing, TPZ2002 reports an unrecognized identifier immediately before a string delimiter. The template tag rule defines the permitted prefixes.

    Действия

    Remove the prefix for an ordinary string, or choose a registered prefix from the template tag rule for the intended template operation.

    Compiler phase: parse.

    Compiler explanation: A tagged template used a tag that is not in the built-in template registry.

    Message templates. The marker ⟨value⟩ stands for text computed for the reported program.

    • unknown template tag ⟨value⟩; the registry is p, r, sh, sql Source

    Observed for the candidate in Topaz 5.21.3. Execution

    • error[TPZ2002]: unknown template tag html; the registry is p, r, sh, sql

    During parsing, TPZ2002 reports an unrecognized identifier immediately before a string delimiter. The template tag rule defines the permitted prefixes.

    Правилоdiagnostics.tpz2002.rule

    Trigger and repair

    During parsing, TPZ2002 reports an unrecognized identifier immediately before a string delimiter. The template tag rule defines the permitted prefixes.

    Response

    Ссылка

    Remove the prefix for an ordinary string, or choose a registered prefix from the template tag rule for the intended template operation.

    Reproduction and verification

    Ссылка

    Rejected program

    Ссылка
    example.tpzRejected programОткрыть песочницу →
    1. let message = html"<p>Hello</p>"
    Ожидаемый выводНенулевой код завершения
    Нет стандартного вывода.
    $ topaz check example.tpz · Целевой продукт 5.21.3
    Ожидаемый результат

    Ожидаемый результат

    Этап отклонения parse. Ненулевой код завершения.

    The expected diagnostic, cause, source location, and accompanying diagnostics are specified below. The verification status records whether this program has been run.

    Corrected program

    Ссылка
    example.tpzCorrected program
    1. let message = "<p>Hello</p>"
    Ожидаемый выводКод завершения 0
    $ topaz check example.tpz · Целевой продукт 5.21.3
    Ожидаемый результат

    Ожидаемый результат

    Проверка принимает программу. Код завершения 0.

    This program applies the repair described above. The verification status records whether it has been run.

    Меню

    Загрузка →