Compiler module

compiler_report

procedure2 overloadsSource

Reports a problem at loc (by default the call site). The default mode, .ERROR, fails the build once the current step ends; .WARNING and .INFO only print.

Example↗
#run compiler_report("heads up", mode = .INFO);

main :: () {}
compiler_report :: (
    message: string,
    loc := #caller_location,
    mode := Report.ERROR
)

Parameters

message: string
loc := #caller_location
mode := Report.ERROR
compiler_report :: (
    filename: string,
    line_number: s64,
    character_number: s64,
    error_text: string,
    mode := Report.ERROR
)

Reports a problem at an explicit file, line and character instead of a code location.

Parameters

filename: string
line_number: s64
character_number: s64
error_text: string
mode := Report.ERROR

See also