summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/ppreprocessor.h
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-07-28 20:42:27 +0200
committer couriersud <couriersud@gmx.org>2020-07-28 20:42:30 +0200
commit09e987486a38e9e9f94e468b77f4cd7f4aa5259c (patch)
treef6d507252ab4c41e3610a050d0ea09b41781d421 /src/lib/netlist/plib/ppreprocessor.h
parentc00cbad238a86afd03dcc458b679737530d067c3 (diff)
netlist: necessary changes towards runtime processing of macro directory
Diffstat (limited to 'src/lib/netlist/plib/ppreprocessor.h')
-rw-r--r--src/lib/netlist/plib/ppreprocessor.h11
1 files changed, 9 insertions, 2 deletions
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 <typename T>
- ppreprocessor & process(T &&istrm)
+ ppreprocessor & process(T &&istrm, const pstring &filename)
{
- m_stack.emplace_back(input_context(std::forward<T>(istrm),"","<stream>"));
+ m_stack.emplace_back(input_context(std::forward<T>(istrm),plib::util::path(filename), filename));
process_stack();
return *this;
}