mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
More clean up
This commit is contained in:
parent
75e0057388
commit
baa7251f1d
@ -149,7 +149,7 @@ Statement Parser::parseStatement()
|
||||
case Token::LParen:
|
||||
{
|
||||
Expression expr = parseCall(std::move(elementary));
|
||||
return ExpressionStatement{locationOf(expr), expr};
|
||||
return ExpressionStatement{locationOf(expr), move(expr)};
|
||||
}
|
||||
case Token::Comma:
|
||||
case Token::AssemblyAssign:
|
||||
@ -192,7 +192,7 @@ Statement Parser::parseStatement()
|
||||
assignment.value = make_unique<Expression>(parseExpression());
|
||||
assignment.location.end = locationOf(*assignment.value).end;
|
||||
|
||||
return Statement{std::move(assignment)};
|
||||
return Statement{move(assignment)};
|
||||
}
|
||||
default:
|
||||
fatalParserError(6913_error, "Call or assignment expected.");
|
||||
@ -201,13 +201,13 @@ Statement Parser::parseStatement()
|
||||
|
||||
if (holds_alternative<Identifier>(elementary))
|
||||
{
|
||||
Identifier& identifier = std::get<Identifier>(elementary);
|
||||
Identifier identifier = std::get<Identifier>(move(elementary));
|
||||
return ExpressionStatement{identifier.location, { move(identifier) }};
|
||||
}
|
||||
else if (holds_alternative<Literal>(elementary))
|
||||
{
|
||||
Expression expr = std::get<Literal>(elementary);
|
||||
return ExpressionStatement{locationOf(expr), expr};
|
||||
Literal literal = std::get<Literal>(move(elementary));
|
||||
return ExpressionStatement{literal.location, { move(literal) }};
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -411,7 +411,7 @@ FunctionDefinition Parser::parseFunctionDefinition()
|
||||
return funDef;
|
||||
}
|
||||
|
||||
Expression Parser::parseCall(Parser::ElementaryOperation&& _initialOp)
|
||||
FunctionCall Parser::parseCall(Parser::ElementaryOperation&& _initialOp)
|
||||
{
|
||||
RecursionGuard recursionGuard(*this);
|
||||
|
||||
|
@ -87,7 +87,7 @@ protected:
|
||||
ElementaryOperation parseLiteralOrIdentifier();
|
||||
VariableDeclaration parseVariableDeclaration();
|
||||
FunctionDefinition parseFunctionDefinition();
|
||||
Expression parseCall(ElementaryOperation&& _initialOp);
|
||||
FunctionCall parseCall(ElementaryOperation&& _initialOp);
|
||||
TypedName parseTypedName();
|
||||
YulString expectAsmIdentifier();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user