mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 14:40:18 +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
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/StringConversions.h>
|
||||
#include <AK/Utf8View.h>
|
||||
#include <LibXML/DOM/Document.h>
|
||||
#include <LibXML/Parser/Parser.h>
|
||||
|
||||
|
@ -523,7 +524,7 @@ ErrorOr<void, ParseError> Parser::parse_processing_instruction()
|
|||
auto target = TRY(parse_processing_instruction_target());
|
||||
ByteString data;
|
||||
if (auto result = skip_whitespace(Required::Yes); !result.is_error())
|
||||
data = m_lexer.consume_until("?>");
|
||||
data = m_lexer.consume_until("?>"sv);
|
||||
TRY(expect("?>"sv));
|
||||
|
||||
append_processing_instruction(target, data);
|
||||
|
@ -1714,7 +1715,7 @@ ErrorOr<StringView, ParseError> Parser::parse_cdata_section()
|
|||
auto accept = accept_rule();
|
||||
|
||||
auto section_start = m_lexer.tell();
|
||||
while (!m_lexer.next_is("]]>")) {
|
||||
while (!m_lexer.next_is("]]>"sv)) {
|
||||
if (m_lexer.is_eof())
|
||||
break;
|
||||
m_lexer.ignore();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue