aboutsummaryrefslogtreecommitdiff
path: root/src/ast.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-11-23 15:57:44 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-11-23 15:57:44 -0500
commit83a2bff4bb04b0189d17419baf8ca520992d5033 (patch)
tree63c24b6419e0896d985cb0c9f30b742274e95833 /src/ast.h
parent2a24b0a3fc3c4986572ae2c4ea0e8e387497a7f6 (diff)
Added Metadata section for files instead of _HELP and _USAGE
Diffstat (limited to 'src/ast.h')
-rw-r--r--src/ast.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ast.h b/src/ast.h
index c01ba68a..7fa9092a 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -276,6 +276,7 @@ typedef enum {
Use,
InlineCCode,
ExplicitlyTyped,
+ Metadata,
} ast_e;
#define NUM_AST_TAGS (ExplicitlyTyped + 1)
@@ -458,6 +459,9 @@ struct ast_s {
ast_t *ast;
struct type_s *type;
} ExplicitlyTyped;
+ struct {
+ Text_t key, value;
+ } Metadata;
} __data;
};
@@ -483,3 +487,4 @@ CONSTFUNC ast_e binop_tag(ast_e tag);
CONSTFUNC bool is_binary_operation(ast_t *ast);
void ast_visit(ast_t *ast, void (*visitor)(ast_t *, void *), void *userdata);
void type_ast_visit(ast_t *ast, void (*visitor)(type_ast_t *, void *), void *userdata);
+OptionalText_t ast_metadata(ast_t *ast, const char *key);