aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/elna/boot/ast.h16
-rw-r--r--include/elna/boot/materialization.h4
2 files changed, 9 insertions, 11 deletions
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<attribute>&& attributes = std::vector<attribute>{});
+ const bool exported, std::vector<identifier>&& parameters = {},
+ std::vector<attribute>&& attributes = {});
identifier_definition(const identifier_definition&) = delete;
identifier_definition(identifier_definition&&) noexcept = default;
@@ -406,6 +407,10 @@ namespace elna::boot
const identifier& id() const;
bool exported() const;
/**
+ * \return Type parameters bound by this declaration.
+ */
+ std::vector<identifier> parameters;
+ /**
* \return Attributes attached to the identifier.
*/
std::vector<attribute> attributes;
@@ -721,12 +726,6 @@ namespace elna::boot
const identifier_definition identifier;
std::optional<procedure_body> body;
- /**
- * Type parameters bound by this declaration. Empty for a plain
- * procedure.
- */
- std::vector<elna::boot::identifier> 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<elna::boot::identifier> 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);