mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
process some of the feedback
This commit is contained in:
parent
9bd7f3553e
commit
bf9c95f5c9
@ -100,8 +100,13 @@ public:
|
||||
auto scanner = make_shared<Scanner>(charStream);
|
||||
|
||||
if (!m_inputIsCodeBlock && scanner->currentToken() == Token::LBrace)
|
||||
{
|
||||
m_inputIsCodeBlock = true;
|
||||
|
||||
if (!_objectPath.empty())
|
||||
throw runtime_error("Object path argument cannot be used. Input is a code block.");
|
||||
}
|
||||
|
||||
shared_ptr<Object> object = parser.parse(scanner, false);
|
||||
|
||||
if (!object || !errorReporter.errors().empty())
|
||||
@ -262,9 +267,15 @@ public:
|
||||
{
|
||||
if (!m_inputIsCodeBlock)
|
||||
cout << m_object->toString(&m_dialect) << endl;
|
||||
else
|
||||
else {
|
||||
yulAssert(
|
||||
m_object->subObjects.empty(),
|
||||
"Unexpected subObjects found."
|
||||
);
|
||||
|
||||
cout << AsmPrinter{m_dialect}(*m_object->code) << endl;
|
||||
}
|
||||
}
|
||||
|
||||
void resetNameDispenser()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user