getNotes
Function parameters
Parameters
Type definitions in this namespace
Types
- ErrorMessageList
- There will be a MessageIndex for each len at start.
- SourceLocation
- Trailing:
- ErrorMessage
- Trailing:
Functions in this namespace
Functions
- nullTerminatedString
- Given an index into `string_bytes` returns the null-terminated string found there.
Special encoding when there are no errors.
Values
- empty
- Special encoding when there are no errors.
Source
Implementation
pub fn getNotes(eb: ErrorBundle, index: MessageIndex) []const MessageIndex {
const notes_len = eb.getErrorMessage(index).notes_len;
const start = @intFromEnum(index) + @typeInfo(ErrorMessage).@"struct".fields.len;
return @as([]const MessageIndex, @ptrCast(eb.extra[start..][0..notes_len]));
}