liblangutil: refactors SourceReferenceFormatter error formatting for pretty and colored output.

* Refactors output format in a way it is (or should at least be) more readable.
  (NB.: As source of inspiration, I chose the rustc compiler output.)
* Adds color support to the stream output.
* Also improves multiline source formatting
  (i.e. truncating too long lines, like done with single lines already)
* solc: adds flags --color (force terminal colors) and --no-color (disable autodetection)
* solc: adds --new-reporter to give output in *new* formatting (colored or not)
* Changelog adapted accordingly.
This commit is contained in:
Christian Parpart
2019-02-07 12:55:14 +01:00
committed by chriseth
parent ef6a76ce67
commit 3d4b0f45da
7 changed files with 264 additions and 12 deletions
+2
View File
@@ -109,6 +109,8 @@ private:
std::unique_ptr<dev::solidity::CompilerStack> m_compiler;
/// EVM version to use
EVMVersion m_evmVersion;
/// Whether or not to colorize diagnostics output.
bool m_coloredOutput = true;
};
}