From bf41d022ce9736a92097f416ab96fca7ab4594ca Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 23 Aug 2026 14:05:26 +0200 Subject: Reject 0-sized variables --- boot/ast.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'boot/ast.cc') diff --git a/boot/ast.cc b/boot/ast.cc index 287b7aa..1f2b884 100644 --- a/boot/ast.cc +++ b/boot/ast.cc @@ -61,6 +61,11 @@ namespace elna::boot __builtin_unreachable(); } + void empty_visitor::visit(extern_type_expression *) + { + __builtin_unreachable(); + } + void empty_visitor::visit(variable_declaration *) { __builtin_unreachable(); @@ -436,6 +441,10 @@ namespace elna::boot { } + void walking_visitor::visit(extern_type_expression *) + { + } + void walking_visitor::visit(cast_expression *expression) { expression->value().accept(this); @@ -731,6 +740,16 @@ namespace elna::boot return this; } + extern_type_expression::extern_type_expression(const source_position position) + : node(position) + { + } + + void extern_type_expression::accept(parser_visitor *visitor) + { + visitor->visit(this); + } + type_expression& constant_type_expression::base() { return *m_base; -- cgit v1.2.3