Expand description

Pretty-printing diagnostic messages containing references to source code.

This module defines some data types for constructing intermediate data structures for printing diagnostic messages referencing source code fragments. When you have an Error, you can convert it to a Message. Then, you can in turn convert it into annotate_snippets::snippet::Snippet, for example, and finally format a printable diagnostic message string.

When the yash_syntax crate is built with the annotate-snippets feature enabled, it supports conversion from Message to Snippet. If you would like to use another formatter instead, you can provide your own conversion for yourself.

TODO Elaborate

Structs

Source code fragment annotated with a label.
Entire diagnostic message.

Enums

Type of annotation.

Traits

Helper for constructing a Message