AK+Libraries: Reduce API surface of GenericLexer a bit

* Remove completely unused methods.
* Deduplicate methods that were overloaded with both StringView and
  char const* parameters.

A future commit will templatize GenericLexer by char type. This patch
serves to make that a tiny bit easier.
This commit is contained in:
Timothy Flynn 2025-08-05 13:22:17 -04:00 committed by Tim Flynn
parent 213683956c
commit 28d9d3a2c7
Notes: github-actions[bot] 2025-08-13 13:58:03 +00:00
9 changed files with 41 additions and 99 deletions

View file

@ -45,7 +45,6 @@ TEST_CASE(should_constexpr_next_is)
{
constexpr GenericLexer sut("abcdef"sv);
static_assert(sut.next_is('a'));
static_assert(sut.next_is("abc"));
static_assert(sut.next_is("abc"sv));
}
@ -124,16 +123,6 @@ TEST_CASE(should_constexpr_ignore_until)
static_assert(sut.peek() == 'd');
}
TEST_CASE(should_constexpr_ignore_until_cstring)
{
constexpr auto sut = [] {
GenericLexer sut("abcdef"sv);
sut.ignore_until("cde");
return sut;
}();
static_assert(sut.peek() == 'c');
}
TEST_CASE(should_constexpr_next_is_pred)
{
constexpr auto pred = [](auto c) {