ConstParser instead of const2ast using global state

This commit is contained in:
Emil J. Tywoniak
2025-05-26 17:16:24 +02:00
parent 24cd4aadd1
commit 33376da034
5 changed files with 77 additions and 31 deletions
+2 -3
View File
@@ -5704,9 +5704,8 @@ bool RTLIL::SigSpec::parse(RTLIL::SigSpec &sig, RTLIL::Module *module, std::stri
if (('0' <= netname[0] && netname[0] <= '9') || netname[0] == '\'') {
cover("kernel.rtlil.sigspec.parse.const");
// TODO fix
// AST::get_line_num = sigspec_parse_get_dummy_line_num;
auto ast = VERILOG_FRONTEND::const2ast(netname);
VERILOG_FRONTEND::ConstParser p;
auto ast = p.const2ast(netname);
if (ast == nullptr)
return false;
sig.append(RTLIL::Const(ast->bits));