diff options
author | Linnnus <[email protected]> | 2025-04-11 23:42:02 +0000 |
---|---|---|
committer | Linnnus <[email protected]> | 2025-04-15 01:08:23 +0000 |
commit | d15dd976b98b4c39a899b3d68047dc752699dca7 (patch) | |
tree | 2291c13817e0359d2f116e76e7b66c9ae8f0c590 /src/core/state.h | |
parent | 31eacdeefe6099e68dd8596faab8108671e4c6a5 (diff) |
feat(core,cli): Add diagnostic handler to SandConfig
Diffstat (limited to 'src/core/state.h')
-rw-r--r-- | src/core/state.h | 9 |
1 files changed, 7 insertions, 2 deletions
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 <stddef.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 |