From be7b30979081f54a6ce6acc17c8f18a28b707302 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Tue, 31 Dec 2024 21:50:21 +0100 Subject: [PATCH] Parser.hpp: Put the condition for definitions on one line Signed-off-by: Username404-59 --- src/headers/parsing/Parser.hpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/headers/parsing/Parser.hpp b/src/headers/parsing/Parser.hpp index 1339ecc..d7fb1f8 100644 --- a/src/headers/parsing/Parser.hpp +++ b/src/headers/parsing/Parser.hpp @@ -142,12 +142,7 @@ namespace Parser { const auto end = find_if(beginning, lexed.end(), [¤t](const tok& it){ return it.toktype == SEMICOLON || it.line != current.line; }); - if (isFinalDefine) { - parseTree << Define(current.toktext, parse(beginning, end)); - } else { - parseTree << Define(current.toktext, parse(beginning, end)); - } - + parseTree << isFinalDefine ? Define(current.toktext, parse(beginning, end)) : Define(current.toktext, parse(beginning, end)); i += 1 + isFinalDefine + distance(beginning, end); } else { const bool method = nextAre({DOT, IDENTIFIER, LPAR});