aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-10-18 19:32:34 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-10-18 19:55:06 +0800
commitf67d34e4ec379aeed3ee2c05227a228c748b4d9d (patch)
treed7092065f7b894a4b9e516e4af79e18368cbd5a4
parentfda8499c1549dee11dea4207d7f0ed4ab75c7856 (diff)
downloaddexon-solidity-f67d34e4ec379aeed3ee2c05227a228c748b4d9d.tar.gz
dexon-solidity-f67d34e4ec379aeed3ee2c05227a228c748b4d9d.tar.zst
dexon-solidity-f67d34e4ec379aeed3ee2c05227a228c748b4d9d.zip
Indentation fixes in lllc
-rw-r--r--lllc/main.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/lllc/main.cpp b/lllc/main.cpp
index 912ce16a..8b990eec 100644
--- a/lllc/main.cpp
+++ b/lllc/main.cpp
@@ -35,15 +35,15 @@ using namespace dev::solidity;
using namespace dev::eth;
static string const VersionString =
- string(ETH_PROJECT_VERSION) +
- (string(SOL_VERSION_PRERELEASE).empty() ? "" : "-" + string(SOL_VERSION_PRERELEASE)) +
- (string(SOL_VERSION_BUILDINFO).empty() ? "" : "+" + string(SOL_VERSION_BUILDINFO));
+ string(ETH_PROJECT_VERSION) +
+ (string(SOL_VERSION_PRERELEASE).empty() ? "" : "-" + string(SOL_VERSION_PRERELEASE)) +
+ (string(SOL_VERSION_BUILDINFO).empty() ? "" : "+" + string(SOL_VERSION_BUILDINFO));
static void help()
{
cout
<< "Usage lllc [OPTIONS] <file>" << endl
- << "Options:" << endl
+ << "Options:" << endl
<< " -b,--binary Parse, compile and assemble; output byte code in binary." << endl
<< " -x,--hex Parse, compile and assemble; output byte code in hex." << endl
<< " -a,--assembly Only parse and compile; show assembly." << endl
@@ -51,12 +51,12 @@ static void help()
<< " -o,--optimise Turn on/off the optimiser; off by default." << endl
<< " -h,--help Show this help message and exit." << endl
<< " -V,--version Show the version and exit." << endl;
- exit(0);
+ exit(0);
}
static void version()
{
- cout << "LLLC, the Lovely Little Language Compiler " << endl;
+ cout << "LLLC, the Lovely Little Language Compiler" << endl;
cout << "Version: " << VersionString << endl;
exit(0);
}
@@ -131,7 +131,9 @@ int main(int argc, char** argv)
vector<string> errors;
if (src.empty())
+ {
errors.push_back("Empty file.");
+ }
else if (mode == Disassemble)
{
cout << disassemble(fromHex(src)) << endl;
@@ -145,12 +147,17 @@ int main(int argc, char** argv)
cout.write((char const*)bs.data(), bs.size());
}
else if (mode == ParseTree)
+ {
cout << parseLLL(src) << endl;
+ }
else if (mode == Assembly)
+ {
cout << compileLLLToAsm(src, optimise ? true : false, &errors, contentsString) << endl;
+ }
+
for (auto const& i: errors)
cerr << i << endl;
- if ( errors.size() )
+ if (errors.size())
return 1;
return 0;
}