From 799fa37c44b9efba71fc4510adbde37f9c8d359c Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 30 Dec 2023 14:16:49 +0100 Subject: [PATCH] Fix not ignoring whitespace after macro parameter comma --- src/Parser/Parsing/Impl/DefinesStreamProxy.cpp | 2 +- test/ParserTests/Parsing/Impl/DefinesStreamProxyTests.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp b/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp index 0d714ef01..59dbe34a7 100644 --- a/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp +++ b/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp @@ -685,7 +685,7 @@ void DefinesStreamProxy::ContinueMacroParameters( state.m_parameters.emplace_back(state.m_current_parameter.str()); state.m_current_parameter.clear(); state.m_current_parameter.str(std::string()); - m_parameter_state = ParameterState::AFTER_COMMA; + state.m_parameter_state = ParameterState::AFTER_COMMA; } } else if (c == '(' || c == '[' || c == '{') diff --git a/test/ParserTests/Parsing/Impl/DefinesStreamProxyTests.cpp b/test/ParserTests/Parsing/Impl/DefinesStreamProxyTests.cpp index 3443d0575..f7253f502 100644 --- a/test/ParserTests/Parsing/Impl/DefinesStreamProxyTests.cpp +++ b/test/ParserTests/Parsing/Impl/DefinesStreamProxyTests.cpp @@ -959,8 +959,8 @@ namespace test::parsing::impl::defines_stream_proxy ExpectLine(&proxy, 1, ""); ExpectLine(&proxy, 2, ""); ExpectLine(&proxy, 3, ""); - ExpectLine(&proxy, 4, "TEST"); - ExpectLine(&proxy, 5, "TESTTWO(testArg)"); + ExpectLine(&proxy, 4, "\"TEST\""); + ExpectLine(&proxy, 5, "\"TESTTWO(testArg)\""); REQUIRE(proxy.Eof()); }