From 09e987486a38e9e9f94e468b77f4cd7f4aa5259c Mon Sep 17 00:00:00 2001 From: couriersud Date: Tue, 28 Jul 2020 20:42:27 +0200 Subject: netlist: necessary changes towards runtime processing of macro directory --- src/lib/netlist/plib/ppreprocessor.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/lib/netlist/plib/ppreprocessor.h') diff --git a/src/lib/netlist/plib/ppreprocessor.h b/src/lib/netlist/plib/ppreprocessor.h index 9758da6c8ac..d5dcc3d5fa7 100644 --- a/src/lib/netlist/plib/ppreprocessor.h +++ b/src/lib/netlist/plib/ppreprocessor.h @@ -68,10 +68,17 @@ namespace plib { delete rdbuf(); } + /// \brief process stream + /// + /// \param filename a filename or identifier identifying the stream. + /// + /// FIXME: this is sub-optimal. Refactor input_context into pinput_context + /// and pass this to ppreprocessor. + /// template - ppreprocessor & process(T &&istrm) + ppreprocessor & process(T &&istrm, const pstring &filename) { - m_stack.emplace_back(input_context(std::forward(istrm),"","")); + m_stack.emplace_back(input_context(std::forward(istrm),plib::util::path(filename), filename)); process_stack(); return *this; } -- cgit v1.2.3-70-g09d2