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:
parent
1ac1b2eed5
commit
77d4b5230e
6 changed files with 204 additions and 195 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue