|
slang-netlist
0.10.0
|
#include <ReportVisitorBase.hpp>
Public Member Functions | |
| ReportVisitorBase (ast::Compilation &compilation) | |
| void | setNameFilters (std::vector< std::string > filters) |
| void | report (FormatBuffer &buffer) |
| Render the collected information as a human-readable table. | |
| void | report (JsonWriter &writer) |
| Render the collected information as a JSON array of objects. | |
Protected Member Functions | |
| auto | locationStr (SourceLocation loc) const -> std::string |
| Format a source location using the compilation's SourceManager. | |
| auto | nameMatches (std::string_view name) const -> bool |
Protected Attributes | |
| ast::Compilation & | compilation |
| std::vector< Info > | items |
| std::vector< std::string > | nameFilters |
CRTP base for the report visitors. Owns the shared Compilation& reference and the collected-item storage, and provides the table and JSON rendering loops that delegate per-item formatting to the derived class.
A derived class D with item type Info must provide:
|
inlineexplicit |
|
inlineprotected |
Format a source location using the compilation's SourceManager.
|
inlineprotected |
Return true if no name filters are set, or if name matches at least one of them (glob syntax per netlist::wildcardMatch).
|
inline |
Render the collected information as a human-readable table.
|
inline |
Render the collected information as a JSON array of objects.
|
inline |
Restrict reporting to symbols whose hierarchical path matches at least one of filters (glob syntax per netlist::wildcardMatch: */? stay within a single path segment, **/... cross boundaries). An empty list disables filtering.
|
protected |
|
protected |
|
protected |