#ifndef ANIMTOOL_SOURCE_H #define ANIMTOOL_SOURCE_H #include #include "util/container.h" #include "util/str.h" struct range { size_t start, end; }; struct loc_str { struct range loc; str str; }; struct source { str name; str contents; size_t offset; arraybuf(str) strings; }; [[noreturn]] void source_error(struct source *source, struct range loc, const char *fmt, ...) __attribute__((format (printf, 3, 4))); void source_init(struct source *source, str name, str contents); void source_free(struct source *source); #endif