aboutsummaryrefslogtreecommitdiff
path: root/src/ast.h
diff options
context:
space:
mode:
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);