To support incremental compilation, errors are stored in various places so that they can be created and destroyed appropriately. This structure is used to collect all the errors from the various places into one convenient place for API users to consume.

There is one special encoding for this data structure. If both arrays are empty, it means there are no errors. This special encoding exists so that heap allocation is not needed in the common case of no errors.

Fields

string_bytes: []const u8,
extra: []const u32,

The first thing in this array is an ErrorMessageList.

Functions

fn deinit(eb: *ErrorBundle, gpa: Allocator) void

No documentation provided.

fn errorMessageCount(eb: ErrorBundle) u32

No documentation provided.

fn getCompileLogOutput(eb: ErrorBundle) [:0]const u8

No documentation provided.

fn getErrorMessage(eb: ErrorBundle, index: MessageIndex) ErrorMessage

No documentation provided.

fn getErrorMessageList(eb: ErrorBundle) ErrorMessageList

No documentation provided.

fn getMessages(eb: ErrorBundle) []const MessageIndex

No documentation provided.

fn getNotes(eb: ErrorBundle, index: MessageIndex) []const MessageIndex

No documentation provided.

fn getSourceLocation(eb: ErrorBundle, index: SourceLocationIndex) SourceLocation

No documentation provided.

fn nullTerminatedString(eb: ErrorBundle, index: usize) [:0]const u8

Given an index into string_bytes returns the null-terminated string found ther…

Given an index into string_bytes returns the null-terminated string found there.

fn renderToStdErr(eb: ErrorBundle, options: RenderOptions) void

No documentation provided.

fn renderToWriter(eb: ErrorBundle, options: RenderOptions, writer: anytype) anyerror!void

No documentation provided.

Values

empty
ErrorBundle

Special encoding when there are no errors.