mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[yul-phaser] Move stripWhitespace() from Program tests to Common
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
|
||||
#include <libyul/optimiser/Suite.h>
|
||||
|
||||
#include <regex>
|
||||
|
||||
using namespace std;
|
||||
using namespace solidity;
|
||||
using namespace solidity::yul;
|
||||
@@ -32,3 +34,9 @@ map<string, size_t> phaser::test::enumerateOptmisationSteps()
|
||||
|
||||
return stepIndices;
|
||||
}
|
||||
|
||||
string phaser::test::stripWhitespace(string const& input)
|
||||
{
|
||||
regex whitespaceRegex("\\s+");
|
||||
return regex_replace(input, whitespaceRegex, "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user