aboutsummaryrefslogtreecommitdiff
path: root/src/ast.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-21 16:50:40 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-21 16:50:40 -0400
commitab55eee556ecbe6a8bd0a4f4cd92e38b021f6841 (patch)
tree47c339c48c9aaeffb931588c1b6241d35690c5a2 /src/ast.h
parentf2eab0d205d1a60e9ce7a8e2420196e12d7eed10 (diff)
Add `assert`
Diffstat (limited to 'src/ast.h')
-rw-r--r--src/ast.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ast.h b/src/ast.h
index 2e1a035a..c628e38c 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -147,7 +147,7 @@ typedef enum {
Extern,
StructDef, EnumDef, LangDef,
Index, FieldAccess, Optional, NonOptional,
- DocTest,
+ DocTest, Assert,
Use,
InlineCCode,
Deserialize,
@@ -322,6 +322,9 @@ struct ast_s {
bool skip_source:1;
} DocTest;
struct {
+ ast_t *expr, *message;
+ } Assert;
+ struct {
ast_t *var;
const char *path;
enum { USE_LOCAL, USE_MODULE, USE_SHARED_OBJECT, USE_HEADER, USE_C_CODE, USE_ASM } what;