summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/ptokenizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/plib/ptokenizer.cpp')
-rw-r--r--src/lib/netlist/plib/ptokenizer.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/netlist/plib/ptokenizer.cpp b/src/lib/netlist/plib/ptokenizer.cpp
index 7ccb0ff8ca2..46af36d2bf9 100644
--- a/src/lib/netlist/plib/ptokenizer.cpp
+++ b/src/lib/netlist/plib/ptokenizer.cpp
@@ -151,7 +151,8 @@ namespace plib {
{
if (ret.is_type(token_type::token_type::ENDOFFILE))
return ret;
- else if (m_support_line_markers && ret.is_type(token_type::LINEMARKER))
+
+ if (m_support_line_markers && ret.is_type(token_type::LINEMARKER))
{
bool benter(false);
bool bexit(false);
@@ -215,7 +216,8 @@ namespace plib {
}
if (m_support_line_markers && c == '#')
return token_t(token_type::LINEMARKER, "#");
- else if (m_number_chars_start.find(c) != pstring::npos)
+
+ if (m_number_chars_start.find(c) != pstring::npos)
{
// read number while we receive number or identifier chars
// treat it as an identifier when there are identifier chars in it
@@ -243,10 +245,9 @@ namespace plib {
}
ungetc(c);
auto id = m_tokens.find(tokstr);
- if (id != m_tokens.end())
- return token_t(id->second, tokstr);
- else
- return token_t(token_type::IDENTIFIER, tokstr);
+ return (id != m_tokens.end()) ?
+ token_t(id->second, tokstr)
+ : token_t(token_type::IDENTIFIER, tokstr);
}
else if (c == m_string)
{
@@ -277,10 +278,9 @@ namespace plib {
}
ungetc(c);
auto id = m_tokens.find(tokstr);
- if (id != m_tokens.end())
- return token_t(id->second, tokstr);
- else
- return token_t(token_type::UNKNOWN, tokstr);
+ return (id != m_tokens.end()) ?
+ token_t(id->second, tokstr)
+ : token_t(token_type::UNKNOWN, tokstr);
}
}