mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
Everywhere: Turn #if *_DEBUG into dbgln_if/if constexpr
This commit is contained in:
parent
4e6f03a860
commit
6cf59b6ae9
58 changed files with 315 additions and 469 deletions
|
@ -148,9 +148,8 @@ Parser::Result Parser::parse(Optional<AllOptions> regex_options)
|
|||
else
|
||||
set_error(Error::InvalidPattern);
|
||||
|
||||
#if REGEX_DEBUG
|
||||
fprintf(stderr, "[PARSER] Produced bytecode with %lu entries (opcodes + arguments)\n", m_parser_state.bytecode.size());
|
||||
#endif
|
||||
if constexpr (REGEX_DEBUG)
|
||||
fprintf(stderr, "[PARSER] Produced bytecode with %lu entries (opcodes + arguments)\n", m_parser_state.bytecode.size());
|
||||
return {
|
||||
move(m_parser_state.bytecode),
|
||||
move(m_parser_state.capture_groups_count),
|
||||
|
@ -461,9 +460,8 @@ ALWAYS_INLINE bool PosixExtendedParser::parse_sub_expression(ByteCode& stack, si
|
|||
if (match(TokenType::EscapeSequence)) {
|
||||
length = 1;
|
||||
Token t = consume();
|
||||
#if REGEX_DEBUG
|
||||
printf("[PARSER] EscapeSequence with substring %s\n", String(t.value()).characters());
|
||||
#endif
|
||||
if constexpr (REGEX_DEBUG)
|
||||
printf("[PARSER] EscapeSequence with substring %s\n", String(t.value()).characters());
|
||||
|
||||
bytecode.insert_bytecode_compare_values({ { CharacterCompareType::Char, (u32)t.value().characters_without_null_termination()[1] } });
|
||||
should_parse_repetition_symbol = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue