mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
Skip defines stream proxy empty lines
This commit is contained in:
parent
1464329245
commit
d0155d426a
@ -1,12 +1,10 @@
|
|||||||
#pragma options TEST(asdf, bla)
|
#pragma options TEST(asdf, bla)
|
||||||
#pragma switch TEST_SWITCH
|
#pragma switch TEST_SWITCH
|
||||||
|
|
||||||
#ifdef TEST_SWITCH
|
#ifdef TEST_SWITCH
|
||||||
#define SVAL "1"
|
#define SVAL "1"
|
||||||
#else
|
#else
|
||||||
#define SVAL "0"
|
#define SVAL "0"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#pragma filename "lemao_" + TEST + SVAL + ".txt"
|
#pragma filename "lemao_" + TEST + SVAL + ".txt"
|
||||||
HAHA TEST
|
HAHA TEST
|
||||||
#ifdef TEST_SWITCH
|
#ifdef TEST_SWITCH
|
||||||
|
@ -351,7 +351,7 @@ bool DefinesStreamProxy::MatchElIfDirective(const ParserLine& line, const unsign
|
|||||||
if (m_modes.top() == BlockMode::BLOCK_BLOCKED)
|
if (m_modes.top() == BlockMode::BLOCK_BLOCKED)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(m_modes.top() == BlockMode::IN_BLOCK)
|
if (m_modes.top() == BlockMode::IN_BLOCK)
|
||||||
{
|
{
|
||||||
m_modes.top() = BlockMode::BLOCK_BLOCKED;
|
m_modes.top() = BlockMode::BLOCK_BLOCKED;
|
||||||
return true;
|
return true;
|
||||||
@ -528,7 +528,7 @@ void DefinesStreamProxy::ExtractParametersFromDefineUsage(const ParserLine& line
|
|||||||
valueHasStarted = false;
|
valueHasStarted = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(c == '(')
|
else if (c == '(')
|
||||||
{
|
{
|
||||||
valueHasStarted = true;
|
valueHasStarted = true;
|
||||||
parenthesisDepth++;
|
parenthesisDepth++;
|
||||||
@ -536,7 +536,7 @@ void DefinesStreamProxy::ExtractParametersFromDefineUsage(const ParserLine& line
|
|||||||
}
|
}
|
||||||
else if (c == ')')
|
else if (c == ')')
|
||||||
{
|
{
|
||||||
if(parenthesisDepth > 0)
|
if (parenthesisDepth > 0)
|
||||||
{
|
{
|
||||||
valueHasStarted = true;
|
valueHasStarted = true;
|
||||||
parenthesisDepth--;
|
parenthesisDepth--;
|
||||||
@ -663,21 +663,23 @@ ParserLine DefinesStreamProxy::NextLine()
|
|||||||
{
|
{
|
||||||
auto line = m_stream->NextLine();
|
auto line = m_stream->NextLine();
|
||||||
|
|
||||||
if (m_in_define)
|
while (true)
|
||||||
{
|
{
|
||||||
ContinueDefine(line);
|
if (m_in_define)
|
||||||
line.m_line.clear();
|
{
|
||||||
|
ContinueDefine(line);
|
||||||
|
line = m_stream->NextLine();
|
||||||
|
}
|
||||||
|
else if (MatchDirectives(line) || !m_modes.empty() && m_modes.top() != BlockMode::IN_BLOCK)
|
||||||
|
{
|
||||||
|
line = m_stream->NextLine();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ExpandDefines(line);
|
||||||
|
return line;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (MatchDirectives(line) || !m_modes.empty() && m_modes.top() != BlockMode::IN_BLOCK)
|
|
||||||
{
|
|
||||||
line.m_line.clear();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ExpandDefines(line);
|
|
||||||
}
|
|
||||||
|
|
||||||
return line;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DefinesStreamProxy::IncludeFile(const std::string& filename)
|
bool DefinesStreamProxy::IncludeFile(const std::string& filename)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user