mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add location for member in MemberAccess ASTNode
This commit is contained in:
@@ -1897,7 +1897,9 @@ ASTPointer<Expression> Parser::parseLeftHandSideExpression(
|
||||
{
|
||||
advance();
|
||||
nodeFactory.markEndPosition();
|
||||
expression = nodeFactory.createNode<MemberAccess>(expression, expectIdentifierTokenOrAddress());
|
||||
SourceLocation memberLocation = currentLocation();
|
||||
ASTPointer<ASTString> memberName = expectIdentifierTokenOrAddress();
|
||||
expression = nodeFactory.createNode<MemberAccess>(expression, std::move(memberName), std::move(memberLocation));
|
||||
break;
|
||||
}
|
||||
case Token::LParen:
|
||||
@@ -2335,7 +2337,8 @@ ASTPointer<Expression> Parser::expressionFromIndexAccessStructure(
|
||||
Identifier const& identifier = dynamic_cast<Identifier const&>(*_iap.path[i]);
|
||||
expression = nodeFactory.createNode<MemberAccess>(
|
||||
expression,
|
||||
make_shared<ASTString>(identifier.name())
|
||||
make_shared<ASTString>(identifier.name()),
|
||||
identifier.location()
|
||||
);
|
||||
}
|
||||
for (auto const& index: _iap.indices)
|
||||
|
||||
Reference in New Issue
Block a user