diagnostic

package
v0.1.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic struct {
	File    string // source file path
	Line    int    // line number (0 if unknown)
	Phase   Phase  // parse, validate, crosscheck
	Level   Level  // error, warning
	Message string // human-readable message
	Ref     *Loc   // counterpart location (crosscheck only, nil otherwise)
}

Diagnostic represents a single diagnostic message from any phase.

type Level

type Level string

Level indicates the severity of a diagnostic.

const (
	LevelError   Level = "ERROR"
	LevelWarning Level = "WARNING"
)

type Loc

type Loc struct {
	File string
	Line int
}

Loc is a source location reference.

type Phase

type Phase string

Phase identifies which stage produced the diagnostic.

const (
	PhaseParse      Phase = "parse"
	PhaseValidate   Phase = "validate"
	PhaseCrosscheck Phase = "crosscheck"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL