mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 06:49:28 -05:00
Ensure not closing macro definition parameters throws an error
This commit is contained in:
@ -148,6 +148,9 @@ void DefinesStreamProxy::ContinueDefine(const ParserLine& line, const unsigned c
|
||||
const auto lineEndEscapePos = GetLineEndEscapePos(line);
|
||||
if (lineEndEscapePos < 0)
|
||||
{
|
||||
if (m_parameter_state != ParameterState::NOT_IN_PARAMETERS)
|
||||
throw ParsingException(CreatePos(line, currentPos), "Unclosed macro parameters");
|
||||
|
||||
if (currentPos <= 0)
|
||||
m_current_define_value << line.m_line;
|
||||
else
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
class ParsingException final : std::exception
|
||||
class ParsingException final : public std::exception
|
||||
{
|
||||
TokenPos m_pos;
|
||||
std::string m_message;
|
||||
|
Reference in New Issue
Block a user