Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex engine diagnostics and style cleanups #22982

Merged
merged 5 commits into from
Feb 11, 2025

Conversation

demerphq
Copy link
Collaborator

@demerphq demerphq commented Feb 9, 2025

This patch sequence primarily changes diagnostic output or makes style changes to remove artifacts from my older coding style.
The only non-debugging code this changes is to use a boolean for a variable that used to use an int and values of 1/0,

One part of the change enhances the TRIE and AHO-CORASICK diagnostics so they are consistent with each other and include a bit more information than they used to.

The other part reworks the style of assignment and (in)equality operators and a few other minor whitespace changes so that as much as possible the form used for an equivalency check is the same unhugged form everywhere.

This patch was motivated by some frustration I encountered while debugging #22892 and writing #22978

Noticed by mauke in #22978

I didn't make the change in that commit to keep it minimal for
the purpose of fixing a bug, but the failed var should be a bool
not an integer.
Add color support, and clean up the output to use hex, add word
data, show the character for ASCII characters.
and add a bit of extra metadata to both. I used a cruder version
of this to debug #22892
use "flags:" instead of "flags=" as this makes it easier
to distinguish cases where we are debugging the value of
flags versus assigning to it.
In some of my older patches I left hugged assignements, and sometimes
I tightly hugged (in)equality operators, and sometime I did not. There
is also some level of inconsistency with some other contributors.

This patch tries to make all such cases consistent, with no hugging.

No actual logic changes should be present in this patch.
@demerphq demerphq force-pushed the yves/reg_diag_and_style_cleanups branch from 08bde9f to 5407d3d Compare February 11, 2025 03:09
@demerphq demerphq merged commit 59755da into blead Feb 11, 2025
@demerphq demerphq deleted the yves/reg_diag_and_style_cleanups branch February 11, 2025 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants