Change position

This commit is contained in:
augustin64 2023-11-15 15:38:53 +01:00
parent ced173d80f
commit b407b21cde

View File

@ -229,7 +229,7 @@ ParseReturn parse_expr(vector<Token> tokens) {
InnerNode new_node = { InnerNode new_node = {
.type=type, .type=type,
.children={node, ret.node}, .children={node, ret.node},
.pos=get_node_pos(ret.node) .pos=last_token.pos
}; };
node = new_node; node = new_node;
} catch (const ParseException& pex) { } catch (const ParseException& pex) {
@ -290,7 +290,7 @@ ParseReturn parse_t(vector<Token> tokens) {
InnerNode new_node = { InnerNode new_node = {
.type=type, .type=type,
.children={node, ret.node}, .children={node, ret.node},
.pos=get_node_pos(ret.node) .pos=last_token.pos
}; };
node = new_node; node = new_node;
} catch (const ParseException& pex) { } catch (const ParseException& pex) {