const2ast: handle constant parsing from the command-line again

This commit is contained in:
Emil J. Tywoniak 2026-07-15 11:32:07 +02:00 committed by nella
parent 4821ed17b4
commit 766a20a0a7
1 changed files with 4 additions and 2 deletions

View File

@ -45,11 +45,13 @@ using namespace AST;
using namespace VERILOG_FRONTEND;
void ConstParser::log_maybe_loc_error(std::string msg) {
log_file_error(*loc.begin.filename, loc.begin.line, "%s", msg);
log_file_error(loc.begin.filename ? loc.begin.filename->c_str() : "INTERNAL",
loc.begin.line, "%s", msg);
}
void ConstParser::log_maybe_loc_warn(std::string msg) {
log_file_warning(*loc.begin.filename, loc.begin.line, "%s", msg);
log_file_warning(loc.begin.filename ? loc.begin.filename->c_str() : "INTERNAL",
loc.begin.line, "%s", msg);
}
// divide an arbitrary length decimal number by two and return the rest