mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-08-01 12:50:36 +00:00
fix(parser): allow space before function macro arguments (#933)
This commit is contained in:
@@ -541,10 +541,14 @@ bool DefinesStreamProxy::FindMacroForIdentifier(const std::string& input,
|
||||
void DefinesStreamProxy::ExtractParametersFromMacroUsage(
|
||||
const ParserLine& line, const unsigned& linePos, MacroParameterState& state, const std::string& input, unsigned& inputPos)
|
||||
{
|
||||
if (input[inputPos] != '(')
|
||||
auto parameterStart = inputPos;
|
||||
while (parameterStart < input.size() && isspace(input[parameterStart]))
|
||||
parameterStart++;
|
||||
|
||||
if (parameterStart >= input.size() || input[parameterStart] != '(')
|
||||
return;
|
||||
|
||||
inputPos++;
|
||||
inputPos = parameterStart + 1u;
|
||||
state.m_parameter_state = ParameterState::AFTER_OPEN;
|
||||
state.m_parameters = std::vector<std::string>();
|
||||
state.m_current_parameter.clear();
|
||||
|
||||
Reference in New Issue
Block a user