AK: Remove DeprecatedString from GenericLexer
A bunch of users used consume_specific with a constant DeprecatedString literal, which can be replaced by an allocation-free StringView literal.
The generic consume_while overload gains a requires clause so that consume_specific("abc") causes a more understandable and actionable error.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
We indirectly assume zero-termination at least here.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
Conflicts with DeprecatedString --> ByteString change
Is this the last support for ByteString in generic lexer? or was the scope reduced to just the consume_specific function?
Indeed it is. GenericLexer is (supposedly) a real-human-readable-text lexer and therefore should be UTF-8. All users seem to agree. I'll update the commit messages tomorrow.