This commit is contained in:
Christopher Dunn 2015-01-23 11:06:27 -06:00
parent 942e2c999a
commit 05810a7607

View File

@ -257,21 +257,20 @@ int main(int argc, const char* argv[]) {
Json::Value root; Json::Value root;
exitCode = parseAndSaveValueTree( exitCode = parseAndSaveValueTree(
input, actualPath, "input", root, features, parseOnly); input, actualPath, "input", root, features, parseOnly);
if (exitCode != 0 || parseOnly) { if (exitCode || parseOnly) {
return exitCode; return exitCode;
} }
std::string rewrite; std::string rewrite;
exitCode = rewriteValueTree(rewritePath, root, rewrite); exitCode = rewriteValueTree(rewritePath, root, rewrite);
if (exitCode =! 0) { if (exitCode) {
return exitCode; return exitCode;
} }
Json::Value rewriteRoot; Json::Value rewriteRoot;
exitCode = parseAndSaveValueTree(rewrite, exitCode = parseAndSaveValueTree(
rewriteActualPath, rewrite, rewriteActualPath, "rewrite", rewriteRoot, features, parseOnly);
"rewrite", if (exitCode) {
rewriteRoot, return exitCode;
features, }
parseOnly);
} }
catch (const std::exception& e) { catch (const std::exception& e) {
printf("Unhandled exception:\n%s\n", e.what()); printf("Unhandled exception:\n%s\n", e.what());