mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:17:45 +00:00
LibRegex: Put to dbgln()s behind REGEX_DEBUG
This commit is contained in:
parent
0053816e9d
commit
a4c1860bfc
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 (input.regex_options.has_flag_set(AllFlags::Internal_Stateful)) {
|
||||||
if (views.size() > 1 && input.start_offset > views.first().length()) {
|
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) {
|
for (auto& view : views) {
|
||||||
if (input.start_offset < view.length() + 1)
|
if (input.start_offset < view.length() + 1)
|
||||||
break;
|
break;
|
||||||
|
@ -94,7 +94,7 @@ RegexResult Matcher<Parser>::match(const Vector<RegexStringView> views, Optional
|
||||||
input.start_offset -= view.length() + 1;
|
input.start_offset -= view.length() + 1;
|
||||||
input.global_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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (REGEX_DEBUG) {
|
dbgln_if(REGEX_DEBUG, "state.string_position={}, view_index={}", state.string_position, view_index);
|
||||||
dbgln("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));
|
||||||
dbgln("[match] Found a match (length={}): '{}'", state.string_position - view_index, input.view.substring_view(view_index, state.string_position - view_index));
|
|
||||||
}
|
|
||||||
|
|
||||||
++match_count;
|
++match_count;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue