aboutsummaryrefslogtreecommitdiff
path: root/boot/ast.cc
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-08-23 14:05:26 +0200
committerEugen Wissner <belka@caraus.de>2026-08-23 14:05:26 +0200
commitbf41d022ce9736a92097f416ab96fca7ab4594ca (patch)
tree74813da62ec329f826828d2cac8701a94277dc41 /boot/ast.cc
parente4fece8e791cddec1c765c9834e1c13d0f258e16 (diff)
downloadelna-bf41d022ce9736a92097f416ab96fca7ab4594ca.tar.gz
Reject 0-sized variables
Diffstat (limited to 'boot/ast.cc')
-rw-r--r--boot/ast.cc19
1 files changed, 19 insertions, 0 deletions
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;