mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-29 07:27:58 +00:00
Docs: Proto doc_string approach for cmd help
Add `doc_string` field to `Pass` constructor Add `docs/util/newcmdref.py` to contain command domain Update `docs/util/cmdref.py` with `cmd:usage` and `cmd:optiongroup` for describing commands. Functional, but WIP.
This commit is contained in:
parent
5ce097ed3d
commit
714790c70b
5 changed files with 635 additions and 43 deletions
|
@ -40,8 +40,10 @@ struct PassUsageBlock {
|
|||
struct Pass
|
||||
{
|
||||
std::string pass_name, short_help;
|
||||
const vector<std::string> doc_string;
|
||||
const vector<PassUsageBlock> pass_usages;
|
||||
Pass(std::string name, std::string short_help = "** document me **",
|
||||
const vector<std::string> doc_string = {},
|
||||
const vector<PassUsageBlock> usages = {});
|
||||
// Prefer overriding 'Pass::on_shutdown()' if possible
|
||||
virtual ~Pass();
|
||||
|
@ -62,6 +64,10 @@ struct Pass
|
|||
return !pass_usages.empty();
|
||||
}
|
||||
|
||||
bool HasDocstring() {
|
||||
return !doc_string.empty();
|
||||
}
|
||||
|
||||
struct pre_post_exec_state_t {
|
||||
Pass *parent_pass;
|
||||
int64_t begin_ns;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue