3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-23 20:58:55 +00:00

ast: Move to a new helper method to print input errors

It's a repeating pattern to print an error message tied to an AST
node. Start using an 'input_error' helper for that. Among other
things this is beneficial in shortening the print lines, which tend
to be long.
This commit is contained in:
Martin Povišer 2023-04-04 11:53:50 +02:00 committed by Zachary Snow
parent 1ac1b2eed5
commit 77d4b5230e
6 changed files with 204 additions and 195 deletions

View file

@ -335,6 +335,9 @@ namespace AST
// Helper for looking up identifiers which are prefixed with the current module name
std::string try_pop_module_prefix() const;
// helper to print errors from simplify/genrtlil code
[[noreturn]] void input_error(const char *format, ...) const YS_ATTRIBUTE(format(printf, 2, 3));
};
// process an AST tree (ast must point to an AST_DESIGN node) and generate RTLIL code