From b407b21cde5bdb11f49876f99318ef55608bc3c1 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Wed, 15 Nov 2023 15:38:53 +0100 Subject: [PATCH] Change position --- src/parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser.cpp b/src/parser.cpp index 06d63ab..a360afe 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -229,7 +229,7 @@ ParseReturn parse_expr(vector tokens) { InnerNode new_node = { .type=type, .children={node, ret.node}, - .pos=get_node_pos(ret.node) + .pos=last_token.pos }; node = new_node; } catch (const ParseException& pex) { @@ -290,7 +290,7 @@ ParseReturn parse_t(vector tokens) { InnerNode new_node = { .type=type, .children={node, ret.node}, - .pos=get_node_pos(ret.node) + .pos=last_token.pos }; node = new_node; } catch (const ParseException& pex) {