From 284be00c81407735cc8ddec1f1353b867b2deffd Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 19 Jan 2025 16:33:32 +0200 Subject: improve export model --- include/ek/ast.h | 1 + include/ek/scope.h | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'include') diff --git a/include/ek/ast.h b/include/ek/ast.h index 81b1a85..5c1c6e6 100644 --- a/include/ek/ast.h +++ b/include/ek/ast.h @@ -751,6 +751,7 @@ struct type *reverse_type_list(struct type *root); struct ast *chain_base(struct ast *node); struct ast *clone_chain(struct ast *chain); +bool is_subchain(struct ast *sub, struct ast *top); int type_lists_match(struct type *a, struct type *b); diff --git a/include/ek/scope.h b/include/ek/scope.h index d8a5974..aedeacf 100644 --- a/include/ek/scope.h +++ b/include/ek/scope.h @@ -340,4 +340,9 @@ bool is_exported_type(struct scope *scope, struct ast *def); bool is_exported_symbol(struct scope *scope, struct ast *def); bool is_exported_macro(struct scope *scope, struct ast *def); +int scope_add_exported_symbol(struct scope *scope, struct ast *def); +int scope_add_exported_type(struct scope *scope, struct ast *def); +int scope_add_exported_chain(struct scope *scope, struct ast *def); +int scope_add_exported_macro(struct scope *scope, struct ast *def); + #endif /* SCOPE_H */ -- cgit v1.3