1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

LibRegex: Add RegexStringView wrapper to support utf8 and utf32 views

This commit is contained in:
Emanuel Sprung 2020-06-09 00:15:09 +02:00 committed by Andreas Kling
parent 12dd40a2a5
commit 4a630d4b63
11 changed files with 596 additions and 304 deletions

View file

@ -407,7 +407,6 @@ protected:
Optional<MatchState*> m_state;
};
class OpCode_Exit final : public OpCode {
public:
OpCode_Exit(ByteCode& bytecode)
@ -567,10 +566,10 @@ public:
const Vector<String> variable_arguments_to_string(Optional<MatchInput> input = {}) const;
private:
ALWAYS_INLINE void compare_char(const MatchInput& input, MatchState& state, char& ch, bool inverse, bool& inverse_matched) const;
ALWAYS_INLINE bool compare_string(const MatchInput& input, MatchState& state, const char* str, size_t length) const;
ALWAYS_INLINE void compare_character_class(const MatchInput& input, MatchState& state, CharClass character_class, char ch, bool inverse, bool& inverse_matched) const;
ALWAYS_INLINE void compare_character_range(const MatchInput& input, MatchState& state, char from, char to, char ch, bool inverse, bool& inverse_matched) const;
ALWAYS_INLINE static void compare_char(const MatchInput& input, MatchState& state, u32 ch1, bool inverse, bool& inverse_matched);
ALWAYS_INLINE static bool compare_string(const MatchInput& input, MatchState& state, const char* str, size_t length);
ALWAYS_INLINE static void compare_character_class(const MatchInput& input, MatchState& state, CharClass character_class, char ch, bool inverse, bool& inverse_matched);
ALWAYS_INLINE static void compare_character_range(const MatchInput& input, MatchState& state, char from, char to, char ch, bool inverse, bool& inverse_matched);
};
template<typename T>