mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 13:30:31 +00:00
LibRegex: Put to dbgln()s behind REGEX_DEBUG
This commit is contained in:
parent
0053816e9d
commit
a4c1860bfc
Notes:
sideshowbarker
2024-07-18 19:11:09 +09:00
1 changed files with 4 additions and 6 deletions
|
@ -86,7 +86,7 @@ RegexResult Matcher<Parser>::match(const Vector<RegexStringView> views, Optional
|
|||
|
||||
if (input.regex_options.has_flag_set(AllFlags::Internal_Stateful)) {
|
||||
if (views.size() > 1 && input.start_offset > views.first().length()) {
|
||||
dbgln("Started with start={}, goff={}, skip={}", input.start_offset, input.global_offset, lines_to_skip);
|
||||
dbgln_if(REGEX_DEBUG, "Started with start={}, goff={}, skip={}", input.start_offset, input.global_offset, lines_to_skip);
|
||||
for (auto& view : views) {
|
||||
if (input.start_offset < view.length() + 1)
|
||||
break;
|
||||
|
@ -94,7 +94,7 @@ RegexResult Matcher<Parser>::match(const Vector<RegexStringView> views, Optional
|
|||
input.start_offset -= view.length() + 1;
|
||||
input.global_offset += view.length() + 1;
|
||||
}
|
||||
dbgln("Ended with start={}, goff={}, skip={}", input.start_offset, input.global_offset, lines_to_skip);
|
||||
dbgln_if(REGEX_DEBUG, "Ended with start={}, goff={}, skip={}", input.start_offset, input.global_offset, lines_to_skip);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -213,10 +213,8 @@ RegexResult Matcher<Parser>::match(const Vector<RegexStringView> views, Optional
|
|||
continue;
|
||||
}
|
||||
|
||||
if constexpr (REGEX_DEBUG) {
|
||||
dbgln("state.string_position={}, view_index={}", state.string_position, view_index);
|
||||
dbgln("[match] Found a match (length={}): '{}'", state.string_position - view_index, input.view.substring_view(view_index, state.string_position - view_index));
|
||||
}
|
||||
dbgln_if(REGEX_DEBUG, "state.string_position={}, view_index={}", state.string_position, view_index);
|
||||
dbgln_if(REGEX_DEBUG, "[match] Found a match (length={}): '{}'", state.string_position - view_index, input.view.substring_view(view_index, state.string_position - view_index));
|
||||
|
||||
++match_count;
|
||||
|
||||
|
|
Loading…
Reference in a new issue