mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:37:34 +00:00
LibRegex: Display correct position for Compare in REGEX_DEBUG
When REGEX_DEBUG is enabled, LibRegex dumps a table of information regarding the state of the regex bytecode execution. The Compare opcode manipulates state.string_position directly, so the string_position value cannot be used to display where the comparison started; therefore, this patch introduces a new variable to keep track of where we were before the comparison happened.
This commit is contained in:
parent
6b2e264093
commit
74d76528d6
2 changed files with 10 additions and 7 deletions
|
@ -256,6 +256,7 @@ struct MatchInput {
|
|||
};
|
||||
|
||||
struct MatchState {
|
||||
size_t string_position_before_match { 0 };
|
||||
size_t string_position { 0 };
|
||||
size_t instruction_position { 0 };
|
||||
size_t fork_at_position { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue