mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adds fmtlib as 3rdparty dependency for easier string composition.
This commit is contained in:
+10
-14
@@ -37,6 +37,8 @@
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
|
||||
@@ -643,7 +645,7 @@ void AsmAnalyzer::expectValidType(YulString _type, SourceLocation const& _locati
|
||||
m_errorReporter.typeError(
|
||||
5473_error,
|
||||
_location,
|
||||
"\"" + _type.str() + "\" is not a valid type (user defined types are not yet supported)."
|
||||
fmt::format("\"{}\" is not a valid type (user defined types are not yet supported).", _type)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -653,11 +655,7 @@ void AsmAnalyzer::expectType(YulString _expectedType, YulString _givenType, Sour
|
||||
m_errorReporter.typeError(
|
||||
3781_error,
|
||||
_location,
|
||||
"Expected a value of type \"" +
|
||||
_expectedType.str() +
|
||||
"\" but got \"" +
|
||||
_givenType.str() +
|
||||
"\""
|
||||
fmt::format("Expected a value of type \"{}\" but got \"{}\".", _expectedType, _givenType)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -689,14 +687,12 @@ bool AsmAnalyzer::validateInstructions(evmasm::Instruction _instr, SourceLocatio
|
||||
m_errorReporter.typeError(
|
||||
_errorId,
|
||||
_location,
|
||||
"The \"" +
|
||||
boost::to_lower_copy(instructionInfo(_instr).name)
|
||||
+ "\" instruction is " +
|
||||
vmKindMessage +
|
||||
" VMs " +
|
||||
"(you are currently compiling for \"" +
|
||||
m_evmVersion.name() +
|
||||
"\")."
|
||||
fmt::format(
|
||||
"The \"{instruction}\" instruction is {kind} VMs (you are currently compiling for \"{version}\").",
|
||||
fmt::arg("instruction", boost::to_lower_copy(instructionInfo(_instr).name)),
|
||||
fmt::arg("kind", vmKindMessage),
|
||||
fmt::arg("version", m_evmVersion.name())
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user