Skip to content

Commit

Permalink
Fix not ignoring whitespace after macro parameter comma
Browse files Browse the repository at this point in the history
  • Loading branch information
Laupetin committed Dec 30, 2023
1 parent d3519c2 commit 799fa37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Parser/Parsing/Impl/DefinesStreamProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 == '{')
Expand Down
4 changes: 2 additions & 2 deletions test/ParserTests/Parsing/Impl/DefinesStreamProxyTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit 799fa37

Please sign in to comment.