OxL Reference

data CompileError

The error of a plugin: a diagnostic of the plugin's rule at at.

Example:

oxl✓ checked in CI
use std.comptime { Decl, CompileError }

comptime fn no_fixme(d: Decl) -> () | CompileError {
  if d.name.contains("fixme") {
    return CompileError{ at: d.span, message: "rename {d.name}" }
  }
}
@error
pub(api) data CompileError

Since. 1.0.0-beta

Fields

pub(api) at: Span

Where the diagnostic is reported.

pub(api) message: str

The text of the diagnostic.

Defined in: std/comptime/comptime.oxl:179

See also