aboutsummaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-05-12 13:50:06 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-05-12 13:50:06 -0400
commitd143c72b2267883c229a09cc27bbeafcf2c3fd70 (patch)
tree90312f0e4ee553e0588dc3c45f955b5184bf3778 /ast.h
parenta20f522fd61698282d3e01931260c588dd7f40b1 (diff)
WIP, but functional interfaces
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/ast.h b/ast.h
index 4307532b..5c983a17 100644
--- a/ast.h
+++ b/ast.h
@@ -111,7 +111,7 @@ typedef enum {
Skip, Stop, Pass,
Return,
Extern,
- StructDef, EnumDef, LangDef,
+ StructDef, EnumDef, LangDef, InterfaceDef,
Index, FieldAccess, Optional,
DocTest,
Use,
@@ -250,6 +250,12 @@ struct ast_s {
ast_t *namespace;
} LangDef;
struct {
+ const char *name;
+ type_ast_t *type_parameter;
+ arg_ast_t *fields;
+ ast_t *namespace;
+ } InterfaceDef;
+ struct {
ast_t *indexed, *index;
bool unchecked;
} Index;
@@ -284,5 +290,6 @@ CORD type_ast_to_xml(type_ast_t *ast);
int printf_ast(FILE *stream, const struct printf_info *info, const void *const args[]);
ast_list_t *get_ast_children(ast_t *ast);
bool is_idempotent(ast_t *ast);
+type_ast_t *replace_type_ast(type_ast_t *t, type_ast_t *target, type_ast_t *replacement);
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0