From ec2d29ef185264bd86fce6e0d30ec07be9217ee6 Mon Sep 17 00:00:00 2001 From: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com> Date: Fri, 28 Oct 2022 13:07:27 +0300 Subject: [PATCH] fix: location of type is incorrect --- src/compiler/treeifier/ast/parsers/type.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/compiler/treeifier/ast/parsers/type.cc b/src/compiler/treeifier/ast/parsers/type.cc index 483e216..eebcabf 100644 --- a/src/compiler/treeifier/ast/parsers/type.cc +++ b/src/compiler/treeifier/ast/parsers/type.cc @@ -17,7 +17,9 @@ bool ast::parse_type(ast_ctx_t &ctx, size_t &res_i, map_t &out) { auto &nmsp_arr = nmsp["content"].array(); + h.i--; out["location"] = conv::loc_to_map(h.res_loc()); + h.i++; out["name"] = nmsp_arr.back(); out["ptr_n"] = (float)ptr_n; nmsp_arr.pop_back();