mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibRegex: Early return in Parser::try_skip()
No functional changes.
This commit is contained in:
parent
a6dfc6cdff
commit
3db7d802db
|
|
@ -120,10 +120,9 @@ ALWAYS_INLINE Optional<u32> Parser::consume_escaped_code_point(bool unicode)
|
|||
|
||||
ALWAYS_INLINE bool Parser::try_skip(StringView str)
|
||||
{
|
||||
if (str.starts_with(m_parser_state.current_token.value()))
|
||||
str = str.substring_view(m_parser_state.current_token.value().length(), str.length() - m_parser_state.current_token.value().length());
|
||||
else
|
||||
if (!str.starts_with(m_parser_state.current_token.value()))
|
||||
return false;
|
||||
str = str.substring_view(m_parser_state.current_token.value().length(), str.length() - m_parser_state.current_token.value().length());
|
||||
|
||||
size_t potentially_go_back { 0 };
|
||||
for (auto ch : str) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user