Skip to content

v3.errors

fn details #

fn details(file &token.File, pos token.Position, row_padding int) string

details supports details handling for errors.

fn error #

fn error(msg string, details string, kind Kind, pos token.Position)

error supports error handling for errors.

fn Kind.from #

fn Kind.from[W](input W) !Kind

fn Reporter.from #

fn Reporter.from[W](input W) !Reporter

enum Kind #

enum Kind {
	warning
	notice
	error
}

Kind lists kind values used by errors.

fn (Kind) str #

fn (e Kind) str() string

str returns the string form for Kind.

fn (Kind) color #

fn (e Kind) color(s string) string

color supports color handling for Kind.

enum Reporter #

enum Reporter {
	scanner
	parser
	checker
	gen
}

Reporter lists reporter values used by errors.

struct CompilerMessage #

struct CompilerMessage {
pub:
	message   string
	details   string
	file_path string
	pos       token.Pos
	reporter  Reporter
}

CompilerMessage represents compiler message data used by errors.

struct Error #

struct Error {
	CompilerMessage
}

Error represents error data used by errors.

struct Warning #

struct Warning {
	CompilerMessage
}

Warning represents warning data used by errors.