From d15dd976b98b4c39a899b3d68047dc752699dca7 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Fri, 11 Apr 2025 23:42:02 +0000 Subject: feat(core,cli): Add diagnostic handler to SandConfig --- src/core/state.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/core/state.h') diff --git a/src/core/state.h b/src/core/state.h index 85c604b..6f4d174 100644 --- a/src/core/state.h +++ b/src/core/state.h @@ -4,17 +4,22 @@ // 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" -#include - // 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 -- cgit v1.2.3