mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Yul formatting: Reduce multiple consecutive empty lines to a single one.
This commit is contained in:
parent
c7b4fa34bd
commit
f82f167290
@ -59,6 +59,13 @@ string solidity::yul::reindent(string const& _code)
|
||||
for (string& line: lines)
|
||||
boost::trim(line);
|
||||
|
||||
// Reduce multiple consecutive empty lines.
|
||||
lines = fold(lines, vector<string>{}, [](auto&& _lines, auto&& _line) {
|
||||
if (!(_line.empty() && !_lines.empty() && _lines.back().empty()))
|
||||
_lines.emplace_back(std::move(_line));
|
||||
return std::move(_lines);
|
||||
});
|
||||
|
||||
stringstream out;
|
||||
int depth = 0;
|
||||
|
||||
|
@ -16,12 +16,8 @@ object \"C_6\" {
|
||||
codecopy(0, dataoffset(\"C_6_deployed\"), datasize(\"C_6_deployed\"))
|
||||
return(0, datasize(\"C_6_deployed\"))
|
||||
|
||||
|
||||
function constructor_C_6() {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -50,7 +46,6 @@ object \"C_6\" {
|
||||
if iszero(calldatasize()) { }
|
||||
revert(0, 0)
|
||||
|
||||
|
||||
function abi_decode_tuple_(headStart, dataEnd) {
|
||||
if slt(sub(dataEnd, headStart), 0) { revert(0, 0) }
|
||||
|
||||
@ -71,7 +66,6 @@ object \"C_6\" {
|
||||
|
||||
function fun_f_5() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
function shift_right_224_unsigned(value) -> newValue {
|
||||
|
@ -16,12 +16,8 @@ object \"C_10\" {
|
||||
codecopy(0, dataoffset(\"C_10_deployed\"), datasize(\"C_10_deployed\"))
|
||||
return(0, datasize(\"C_10_deployed\"))
|
||||
|
||||
|
||||
function constructor_C_10() {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -50,7 +46,6 @@ object \"C_10\" {
|
||||
if iszero(calldatasize()) { }
|
||||
revert(0, 0)
|
||||
|
||||
|
||||
function abi_decode_tuple_(headStart, dataEnd) {
|
||||
if slt(sub(dataEnd, headStart), 0) { revert(0, 0) }
|
||||
|
||||
@ -81,11 +76,8 @@ object \"C_10\" {
|
||||
|
||||
function array_length_t_string_memory_ptr(value) -> length {
|
||||
|
||||
|
||||
length := mload(value)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {
|
||||
|
@ -16,12 +16,8 @@ object \"C_10\" {
|
||||
codecopy(0, dataoffset(\"C_10_deployed\"), datasize(\"C_10_deployed\"))
|
||||
return(0, datasize(\"C_10_deployed\"))
|
||||
|
||||
|
||||
function constructor_C_10() {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -50,7 +46,6 @@ object \"C_10\" {
|
||||
if iszero(calldatasize()) { }
|
||||
revert(0, 0)
|
||||
|
||||
|
||||
function abi_decode_tuple_(headStart, dataEnd) {
|
||||
if slt(sub(dataEnd, headStart), 0) { revert(0, 0) }
|
||||
|
||||
|
@ -16,12 +16,8 @@ object \"C_10\" {
|
||||
codecopy(0, dataoffset(\"C_10_deployed\"), datasize(\"C_10_deployed\"))
|
||||
return(0, datasize(\"C_10_deployed\"))
|
||||
|
||||
|
||||
function constructor_C_10() {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -50,7 +46,6 @@ object \"C_10\" {
|
||||
if iszero(calldatasize()) { }
|
||||
revert(0, 0)
|
||||
|
||||
|
||||
function abi_decode_tuple_(headStart, dataEnd) {
|
||||
if slt(sub(dataEnd, headStart), 0) { revert(0, 0) }
|
||||
|
||||
|
@ -16,12 +16,8 @@ object \"C_10\" {
|
||||
codecopy(0, dataoffset(\"C_10_deployed\"), datasize(\"C_10_deployed\"))
|
||||
return(0, datasize(\"C_10_deployed\"))
|
||||
|
||||
|
||||
function constructor_C_10() {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -50,7 +46,6 @@ object \"C_10\" {
|
||||
if iszero(calldatasize()) { }
|
||||
revert(0, 0)
|
||||
|
||||
|
||||
function abi_decode_tuple_(headStart, dataEnd) {
|
||||
if slt(sub(dataEnd, headStart), 0) { revert(0, 0) }
|
||||
|
||||
@ -81,11 +76,8 @@ object \"C_10\" {
|
||||
|
||||
function array_length_t_string_memory_ptr(value) -> length {
|
||||
|
||||
|
||||
length := mload(value)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function array_storeLengthForEncoding_t_string_memory_ptr_fromStack(pos, length) -> updated_pos {
|
||||
|
@ -16,12 +16,8 @@ object \"C_10\" {
|
||||
codecopy(0, dataoffset(\"C_10_deployed\"), datasize(\"C_10_deployed\"))
|
||||
return(0, datasize(\"C_10_deployed\"))
|
||||
|
||||
|
||||
function constructor_C_10() {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -50,7 +46,6 @@ object \"C_10\" {
|
||||
if iszero(calldatasize()) { }
|
||||
revert(0, 0)
|
||||
|
||||
|
||||
function abi_decode_tuple_(headStart, dataEnd) {
|
||||
if slt(sub(dataEnd, headStart), 0) { revert(0, 0) }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user