mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 09:05:32 +00:00
Added ";;" as shortcut for "; clean;"
This commit is contained in:
parent
6068b8902f
commit
080f0aac34
2 changed files with 7 additions and 1 deletions
|
@ -149,12 +149,15 @@ void Pass::call(RTLIL::Design *design, std::string command)
|
|||
std::string str = p;
|
||||
int strsz = str.size();
|
||||
if (strsz > 0 && str[strsz-1] == ';') {
|
||||
int num_semikolon = 0;
|
||||
while (strsz > 0 && str[strsz-1] == ';')
|
||||
strsz--;
|
||||
strsz--, num_semikolon++;
|
||||
if (strsz > 0)
|
||||
args.push_back(str.substr(0, strsz));
|
||||
call(design, args);
|
||||
args.clear();
|
||||
if (num_semikolon == 2)
|
||||
call(design, "clean");
|
||||
} else
|
||||
args.push_back(str);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue