More clean up

This commit is contained in:
Alex Beregszaszi 2020-08-31 15:29:12 +01:00 committed by chriseth
parent 75e0057388
commit baa7251f1d
2 changed files with 7 additions and 7 deletions

View File

@ -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);

View File

@ -87,7 +87,7 @@ protected:
ElementaryOperation parseLiteralOrIdentifier();
VariableDeclaration parseVariableDeclaration();
FunctionDefinition parseFunctionDefinition();
Expression parseCall(ElementaryOperation&& _initialOp);
FunctionCall parseCall(ElementaryOperation&& _initialOp);
TypedName parseTypedName();
YulString expectAsmIdentifier();