1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 09:18:11 +00:00

AK+Everywhere: Make GenericLexer::ignore_until() stop before the value

`consume_until(foo)` stops before foo, and so does
`ignore_until(Predicate)`, so let's make the other `ignore_until()`
overloads consistent with that so they're less confusing.
This commit is contained in:
Sam Atkins 2023-02-28 11:11:39 +00:00 committed by Sam Atkins
parent 0511059d60
commit c06f4ac6f5
5 changed files with 13 additions and 16 deletions

View file

@ -107,7 +107,7 @@ TEST_CASE(should_constexpr_ignore_until)
sut.ignore_until('d');
return sut;
}();
static_assert(sut.peek() == 'e');
static_assert(sut.peek() == 'd');
}
TEST_CASE(should_constexpr_ignore_until_cstring)
@ -117,7 +117,7 @@ TEST_CASE(should_constexpr_ignore_until_cstring)
sut.ignore_until("cde");
return sut;
}();
static_assert(sut.peek() == 'f');
static_assert(sut.peek() == 'c');
}
TEST_CASE(should_constexpr_next_is_pred)