From 775c38f5f5606bd22e60dc1ac0b2793a11c23d73 Mon Sep 17 00:00:00 2001 From: Techatrix <19954306+Techatrix@users.noreply.github.com> Date: Mon, 20 Mar 2023 19:30:13 +0100 Subject: [PATCH] implement document scope creation for array_type_sentinel --- src/analysis.zig | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/analysis.zig b/src/analysis.zig index a2086ec..8e22d58 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -2620,10 +2620,6 @@ fn makeScopeInternal(context: ScopeContext, node_idx: Ast.Node.Index) error{OutO } } }, - .array_type_sentinel => { - // TODO: ??? - return; - }, .fn_proto, .fn_proto_one, .fn_proto_simple, @@ -3068,6 +3064,13 @@ fn makeScopeInternal(context: ScopeContext, node_idx: Ast.Node.Index) error{OutO try makeScopeInternal(context, ptr_type.ast.align_node); try makeScopeInternal(context, ptr_type.ast.child_type); }, + .array_type_sentinel => { + const array_type: Ast.full.ArrayType = tree.fullArrayType(node_idx).?; + + try makeScopeInternal(context, array_type.ast.elem_count); + try makeScopeInternal(context, array_type.ast.elem_type); + try makeScopeInternal(context, array_type.ast.sentinel); + }, .slice, .slice_open, .slice_sentinel,