mirror of
https://github.com/holub/mame
synced 2025-06-07 13:23:50 +03:00
netlist: add elif processing to preprocessor. [Couriersud]
This commit is contained in:
parent
2dbdd730b1
commit
53ac38cf35
@ -484,6 +484,18 @@ namespace plib {
|
||||
{
|
||||
m_if_flag ^= (1 << m_if_level);
|
||||
}
|
||||
else if (lti[0] == "#elif")
|
||||
{
|
||||
m_if_flag ^= (1 << m_if_level);
|
||||
lt = replace_macros(lt);
|
||||
auto t(simple_iter<ppreprocessor>(this, tokenize(lt.substr(5), m_expr_sep, true, true)));
|
||||
auto val = static_cast<int>(prepro_expr(t, 255));
|
||||
t.skip_ws();
|
||||
if (!t.eod())
|
||||
error("found unprocessed content at end of line");
|
||||
if (val == 0)
|
||||
m_if_flag |= (1 << m_if_level);
|
||||
}
|
||||
else if (lti[0] == "#endif")
|
||||
{
|
||||
m_if_flag &= ~(1 << m_if_level);
|
||||
|
Loading…
Reference in New Issue
Block a user