Enabling --combined-json to output to file

This commit is contained in:
Ali92hm
2017-09-12 21:50:22 +01:00
committed by Alex Beregszaszi
parent 1a9c503e93
commit 487ade1635
+5 -1
View File
@@ -910,7 +910,11 @@ void CommandLineInterface::handleCombinedJSON()
output[g_strSources][sourceCode.first]["AST"] = converter.toJson(m_compiler->ast(sourceCode.first));
}
}
cout << dev::jsonCompactPrint(output) << endl;
if (m_args.count(g_argOutputDir))
createJson("combined", output);
else
cout << dev::jsonCompactPrint(output) << endl;
}
void CommandLineInterface::handleAst(string const& _argStr)