1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:48:14 +00:00

LibCpp: Fix positional information of Pointer types

This commit is contained in:
Itamar 2021-07-03 11:34:18 +03:00 committed by Andreas Kling
parent 1dfdfcf820
commit 9a31fb6673
3 changed files with 8 additions and 8 deletions

View file

@ -1189,7 +1189,7 @@ NonnullRefPtr<Type> Parser::parse_type(ASTNode& parent)
while (!eof() && peek().type() == Token::Type::Asterisk) {
type->set_end(position());
auto asterisk = consume();
auto ptr = create_ast_node<Pointer>(parent, asterisk.start(), asterisk.end());
auto ptr = create_ast_node<Pointer>(parent, type->start(), asterisk.end());
type->set_parent(*ptr);
ptr->m_pointee = type;
ptr->set_end(position());