From 880e8c45c5621ed8432b74a0cf4f212b9c14aade Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 13 Jun 2026 19:23:10 +0200 Subject: finally, perfect .clang-format settings? --- server/lexer/details/parse.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'server/lexer/details/parse.cpp') diff --git a/server/lexer/details/parse.cpp b/server/lexer/details/parse.cpp index 75072a4..5df6254 100644 --- a/server/lexer/details/parse.cpp +++ b/server/lexer/details/parse.cpp @@ -63,7 +63,8 @@ protected: // numbers using a regex (the tests seem to pass though). // A proper NFA would be better, I guess. static constexpr std::string_view NUMBER_REGEX{ - R"REGEX(^(?:\d+(?:\.\d*)?|\.\d+)(e[+-]?(\d*))?)REGEX"}; + R"REGEX(^(?:\d+(?:\.\d*)?|\.\d+)(e[+-]?(\d*))?)REGEX" + }; private: bool matched_e() const { @@ -108,9 +109,11 @@ private: }; template -std::optional parse_number(std::string_view input, - RegexNumberMatcher&& matcher, - std::string_view& token) { +std::optional parse_number( + std::string_view input, + RegexNumberMatcher&& matcher, + std::string_view& token +) { if (!matcher.match(input)) { return {}; } @@ -162,8 +165,10 @@ private: }; template -std::string_view parse_whitespace(std::string_view input, - RegexWhitespaceMatcher&& matcher) { +std::string_view parse_whitespace( + std::string_view input, + RegexWhitespaceMatcher&& matcher +) { if (matcher.match_regex(input)) { return matcher.to_view(); } -- cgit v1.3