mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
Added support for macros as include file names
This commit is contained in:
parent
c7f6fb6e17
commit
ecdc22b06c
|
@ -292,6 +292,8 @@ std::string frontend_verilog_preproc(std::istream &f, std::string filename, cons
|
||||||
if (tok == "`include") {
|
if (tok == "`include") {
|
||||||
skip_spaces();
|
skip_spaces();
|
||||||
std::string fn = next_token(true);
|
std::string fn = next_token(true);
|
||||||
|
while (fn.size() > 1 && fn[0] == '`' && defines_map.count(fn.substr(1)) > 0)
|
||||||
|
fn = defines_map.at(fn.substr(1));
|
||||||
while (1) {
|
while (1) {
|
||||||
size_t pos = fn.find('"');
|
size_t pos = fn.find('"');
|
||||||
if (pos == std::string::npos)
|
if (pos == std::string::npos)
|
||||||
|
|
Loading…
Reference in a new issue