marianoguerra/css/error does not have a README file

    CssError

    pub(all) suberror CssError {
    CssError(Diagnostic)
    }

    A CSS source was rejected.

    One error type for the whole module, raised only in strict mode. The tolerant path never raises: it puts a Bogus in the tree and a Diagnostic in the list, which is what lets a caller parse Bootstrap and still get a stylesheet.

    CssError::diagnostic

    fn CssError::diagnostic(self : CssError) -> Diagnostic

    Diagnostic

    A problem, with the span it was found at.

    Diagnostic::is_error

    fn Diagnostic::is_error(self : Diagnostic) -> Bool

    Whether this diagnostic is severe enough to fail a strict parse.

    A predicate rather than a comparison at the call site, because @report.Severity has no Eq and this is the only question anyone asks of it -- so the match belongs here once rather than everywhere.

    Diagnostic::of_kind

    A diagnostic whose severity follows from its kind.

    An unknown at-rule is a warning rather than an error, because CSS gains new at-rules faster than any parser learns them; refusing one would make this library wrong every time the language moves.

    Diagnostic::raise_

    fn[T] Diagnostic::raise_(self : Diagnostic) -> T raise CssError

    Diagnostic::to_report

    Turn a diagnostic into a renderable report.

    This is the only function in the module that mentions error-report.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io