mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5010 from liangdzou/code_format_problems
fix code format problems
This commit is contained in:
commit
37fa0c85ec
@ -90,7 +90,8 @@ std::string dev::lll::compileLLLToAsm(std::string const& _src, EVMVersion _evmVe
|
|||||||
}
|
}
|
||||||
catch (std::exception const& _e)
|
catch (std::exception const& _e)
|
||||||
{
|
{
|
||||||
if (_errors) {
|
if (_errors)
|
||||||
|
{
|
||||||
_errors->push_back("Parse exception.");
|
_errors->push_back("Parse exception.");
|
||||||
_errors->push_back(boost::diagnostic_information(_e));
|
_errors->push_back(boost::diagnostic_information(_e));
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,8 @@ void dev::lll::parseTreeLLL(string const& _s, sp::utree& o_out)
|
|||||||
BOOST_THROW_EXCEPTION(ParserException() << errinfo_comment(reason));
|
BOOST_THROW_EXCEPTION(ParserException() << errinfo_comment(reason));
|
||||||
}
|
}
|
||||||
for (auto i = ret; i != s.cend(); ++i)
|
for (auto i = ret; i != s.cend(); ++i)
|
||||||
if (!isspace(*i)) {
|
if (!isspace(*i))
|
||||||
|
{
|
||||||
BOOST_THROW_EXCEPTION(ParserException() << errinfo_comment("Non-whitespace left in parser"));
|
BOOST_THROW_EXCEPTION(ParserException() << errinfo_comment("Non-whitespace left in parser"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,8 @@ Json::Value Natspec::devDocumentation(ContractDefinition const& _contractDef)
|
|||||||
doc["details"] = Json::Value(dev);
|
doc["details"] = Json::Value(dev);
|
||||||
|
|
||||||
auto constructorDefinition(_contractDef.constructor());
|
auto constructorDefinition(_contractDef.constructor());
|
||||||
if (constructorDefinition) {
|
if (constructorDefinition)
|
||||||
|
{
|
||||||
Json::Value constructor(devDocumentation(constructorDefinition->annotation().docTags));
|
Json::Value constructor(devDocumentation(constructorDefinition->annotation().docTags));
|
||||||
if (!constructor.empty())
|
if (!constructor.empty())
|
||||||
// add the constructor, only if we have any documentation to add
|
// add the constructor, only if we have any documentation to add
|
||||||
|
@ -59,7 +59,8 @@ void SourceReferenceFormatter::printSourceLocation(SourceLocation const* _locati
|
|||||||
line = line.substr(max(0, startColumn - 35), min(startColumn, 35) + min(locationLength + 35, len - startColumn));
|
line = line.substr(max(0, startColumn - 35), min(startColumn, 35) + min(locationLength + 35, len - startColumn));
|
||||||
if (startColumn + locationLength + 35 < len)
|
if (startColumn + locationLength + 35 < len)
|
||||||
line += " ...";
|
line += " ...";
|
||||||
if (startColumn > 35) {
|
if (startColumn > 35)
|
||||||
|
{
|
||||||
line = " ... " + line;
|
line = " ... " + line;
|
||||||
startColumn = 40;
|
startColumn = 40;
|
||||||
}
|
}
|
||||||
|
@ -742,7 +742,8 @@ bool CommandLineInterface::processInput()
|
|||||||
// path will have it's last component set to '.'. This breaks
|
// path will have it's last component set to '.'. This breaks
|
||||||
// path comparison in later parts of the code, so we need to strip
|
// path comparison in later parts of the code, so we need to strip
|
||||||
// it.
|
// it.
|
||||||
if (filesystem_path.filename() == ".") {
|
if (filesystem_path.filename() == ".")
|
||||||
|
{
|
||||||
filesystem_path.remove_filename();
|
filesystem_path.remove_filename();
|
||||||
}
|
}
|
||||||
m_allowedDirectories.push_back(filesystem_path);
|
m_allowedDirectories.push_back(filesystem_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user