3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-20 11:22:05 +00:00

read_verilog, ast: use unified locations in errors and simplify dependencies

This commit is contained in:
Emil J. Tywoniak 2025-07-09 15:24:34 +02:00
parent 41d9a1b88e
commit 56058b3ed4
7 changed files with 16 additions and 23 deletions

View file

@ -25,6 +25,12 @@
USING_YOSYS_NAMESPACE
/**
* Legacy behavior is to only track lines. Now we have columns too, but we don't
* report them in errors.
* TODO: report columns, too
*/
[[noreturn]]
static void verr_at(std::string filename, int begin_line, char const *fmt, va_list ap)
{
@ -36,14 +42,6 @@ static void verr_at(std::string filename, int begin_line, char const *fmt, va_li
exit(1);
}
void VERILOG_FRONTEND::err_at_ast(AST::AstSrcLocType loc, char const *fmt, ...)
{
va_list args;
va_start(args, fmt);
verr_at(*loc.begin.filename, loc.begin.line, fmt, args);
va_end(args);
}
[[noreturn]]
void VERILOG_FRONTEND::err_at_loc(location loc, char const *fmt, ...)
{