mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
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:
parent
213683956c
commit
28d9d3a2c7
Notes:
github-actions[bot]
2025-08-13 13:58:03 +00:00
Author: https://github.com/trflynn89
Commit: 28d9d3a2c7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5762
9 changed files with 41 additions and 99 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue