p4c
p4c copied to clipboard
Allow extending ToP4, clean its constructors
- Replaced the
cstringargument inToP4withstd::filesystem::path. This is the breaking change. - Cleaned up its constructors to avoid duplication.
- Allow re-using the dumper in
ParserOptionswith a descendant ofToP4-- the way I did this is not exactly nice, but I don't see other clear way to create the instance on demand. - The
ToP4pass is a good candidate for larger refactoring, but I don't have time for that now.
but I don't see other clear way to create the instance on demand.
We'd probably go with some value-based semantics here. But it seems pretty heavyweight for a task. And essentially the same wrapped smart pointer. :)