diff options
| author | Clifford Wolf <clifford@clifford.at> | 2014-12-29 03:49:45 +0100 | 
|---|---|---|
| committer | Clifford Wolf <clifford@clifford.at> | 2014-12-29 03:49:45 +0100 | 
| commit | 662cb549e4e11d15b9c1c7e4d3944a05dab2447f (patch) | |
| tree | 6f46d321258b59ab51e994c6de9d312f35d2f683 | |
| parent | 90bc71dd906935def78048e13e7c9f214af0486c (diff) | |
| download | yosys-662cb549e4e11d15b9c1c7e4d3944a05dab2447f.tar.gz yosys-662cb549e4e11d15b9c1c7e4d3944a05dab2447f.tar.bz2 yosys-662cb549e4e11d15b9c1c7e4d3944a05dab2447f.zip  | |
Added newline support to Pass::call() parser
| -rw-r--r-- | kernel/register.cc | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/register.cc b/kernel/register.cc index 2927a333e..7086e1424 100644 --- a/kernel/register.cc +++ b/kernel/register.cc @@ -182,6 +182,18 @@ void Pass::call(RTLIL::Design *design, std::string command)  				call(design, "clean -purge");  		} else  			args.push_back(tok); +		bool found_nl = false; +		for (auto c : cmd_buf) { +			if (c == ' ' || c == '\t') +				continue; +			if (c == '\r' || c == '\n') +				found_nl = true; +			break; +		} +		if (found_nl) { +			call(design, args); +			args.clear(); +		}  		tok = next_token(cmd_buf, " \t\r\n");  	}  | 
