14#ifndef PRISM_NEWLINE_LIST_H
15#define PRISM_NEWLINE_LIST_H
62bool pm_newline_list_init(
pm_newline_list_t *list,
const uint8_t *start,
size_t capacity);
92int32_t pm_newline_list_line(
const pm_newline_list_t *list,
const uint8_t *cursor, int32_t start_line);
Macro definitions used throughout the prism library.
C99 shim for <stdbool.h>.
A line and column in a string.
uint32_t column
The column number.
int32_t line
The line number.
A list of offsets of newlines in a string.
const uint8_t * start
A pointer to the start of the source string.
size_t capacity
The capacity of the list that has been allocated.
size_t * offsets
The list of offsets.
size_t size
The number of offsets in the list.