Module glast::diag

source ·
Expand description

All diagnostic types.

Diagnostics are split across two main types:

  • Syntax for all syntax/grammar-related diagnostics,
  • Semantic for all semantics-related diagnostics.

All diagnostic types are marked #[non_exhaustive] to allow for new diagnostics to be introduced without a breaking change. All diagnostic types have a get_severity() method which returns the Severity of that given diagnostic. Syntax diagnostics only return Severity::Error.

There are a lot of individual syntax diagnostics for all sorts of edge cases. This approach was chosen in order to provide very specific and precise diagnostics without having to hardcode &'static strings everywhere. In order to make the amount more managable, most diagnostics are split into nested enums.

Enums

Syntax diagnostics for expressions.
Syntax diagnostics for the conditional directives.
Syntax diagnostics for the #define and #undef directives.
Syntax diagnostics for the #extension directive.
Syntax diagnostics for the #line directive.
Syntax diagnostics for the #version directive.
All semantic diagnostics.
The severity of a diagnostic.
Syntax diagnostics for statement.
All syntax diagnostics.