#ifndef SAND_STATE_H #define SAND_STATE_H // This module defines the evaluator state. This is the "world" in Sand. // Multiple evaluator states can coexist as they are totally separate. #include "utils.h" #include "allocator.h" #include "config.h" // This data structure should be treated as entirely opaque by consuming code. typedef struct { SandConfig config; SandAllocator gpa; } SandState; SandState sand_create_state(SandConfig config); _SAND_FORMAT_ATTR(printf, 4, 5) void sand_print_diagnostic(SandState *, const SandLocation *, SandDiagnosticLevel, const char *fmt, ...); void sand_destroy_state(SandState *); #endif