From 12b95ab4c6fe8d8843db0dd897f0188d786c7253 Mon Sep 17 00:00:00 2001 From: hrzlgnm Date: Sun, 1 Sep 2024 13:18:14 +0200 Subject: [PATCH] chore(codeql): make codeql happy (#92) --- source/parser/parser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/parser/parser.cpp b/source/parser/parser.cpp index 00d6667..fca7bc5 100644 --- a/source/parser/parser.cpp +++ b/source/parser/parser.cpp @@ -295,11 +295,13 @@ auto parser::parse_function_parameters() -> std::vector return parameters; } next_token(); - parameters.push_back(parse_identifier()->value); + auto param = parse_identifier(); + parameters.push_back(param->value); while (peek_token_is(comma)) { next_token(); next_token(); - parameters.push_back(parse_identifier()->value); + param = parse_identifier(); + parameters.push_back(param->value); } if (!get(rparen)) { return {};