mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Simple tuple expressions.
This commit is contained in:
parent
c604481cef
commit
f68c09272b
@ -131,6 +131,21 @@ bool IRGeneratorForStatements::visit(Assignment const& _assignment)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IRGeneratorForStatements::visit(TupleExpression const& _tuple)
|
||||
{
|
||||
if (_tuple.isInlineArray())
|
||||
solUnimplementedAssert(false, "");
|
||||
else
|
||||
{
|
||||
solUnimplementedAssert(!_tuple.annotation().lValueRequested, "");
|
||||
solUnimplementedAssert(_tuple.components().size() == 1, "");
|
||||
solAssert(_tuple.components().front(), "");
|
||||
_tuple.components().front()->accept(*this);
|
||||
defineExpression(_tuple) << m_context.variable(*_tuple.components().front()) << "\n";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IRGeneratorForStatements::visit(ForStatement const& _for)
|
||||
{
|
||||
m_code << "for {\n";
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
|
||||
void endVisit(VariableDeclarationStatement const& _variableDeclaration) override;
|
||||
bool visit(Assignment const& _assignment) override;
|
||||
bool visit(TupleExpression const& _tuple) override;
|
||||
bool visit(ForStatement const& _forStatement) override;
|
||||
bool visit(Continue const& _continueStatement) override;
|
||||
bool visit(Break const& _breakStatement) override;
|
||||
|
Loading…
Reference in New Issue
Block a user