From 244449004fb62adbfd43b81e8dfce7500ca4a7e4 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 9 Oct 2026 09:55:53 +0200 Subject: Move export mark after the generic parameters --- include/elna/boot/ast.h | 16 ++++++---------- include/elna/boot/materialization.h | 4 +++- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/elna/boot/ast.h b/include/elna/boot/ast.h index 06e5d41..e7a77ac 100644 --- a/include/elna/boot/ast.h +++ b/include/elna/boot/ast.h @@ -395,7 +395,8 @@ namespace elna::boot struct identifier_definition { identifier_definition(const std::string& name, const source_position& position, - const bool exported, std::vector&& attributes = std::vector{}); + const bool exported, std::vector&& parameters = {}, + std::vector&& attributes = {}); identifier_definition(const identifier_definition&) = delete; identifier_definition(identifier_definition&&) noexcept = default; @@ -405,6 +406,10 @@ namespace elna::boot const std::string& name() const; const identifier& id() const; bool exported() const; + /** + * \return Type parameters bound by this declaration. + */ + std::vector parameters; /** * \return Attributes attached to the identifier. */ @@ -721,12 +726,6 @@ namespace elna::boot const identifier_definition identifier; std::optional body; - /** - * Type parameters bound by this declaration. Empty for a plain - * procedure. - */ - std::vector parameters; - procedure_declaration(const source_position position, identifier_definition identifier, procedure_type_expression *heading, procedure_body&& body); procedure_declaration(const source_position position, identifier_definition identifier, @@ -748,9 +747,6 @@ namespace elna::boot public: const identifier_definition identifier; - /// Type parameters bound by this declaration. Empty for a plain type. - std::vector parameters; - type_declaration(const source_position position, identifier_definition identifier, type_expression *underlying_type); ~type_declaration() override; diff --git a/include/elna/boot/materialization.h b/include/elna/boot/materialization.h index b239836..c4abb11 100644 --- a/include/elna/boot/materialization.h +++ b/include/elna/boot/materialization.h @@ -30,7 +30,9 @@ namespace elna::boot real_overflow, local_export, local_extern, - field_export + field_export, + variable_generic, + field_generic }; materialization_error(const source_position position, kind error_kind); -- cgit v1.2.3