serenity icon indicating copy to clipboard operation
serenity copied to clipboard

AK: Remove DeprecatedString from GenericLexer

Open kleinesfilmroellchen opened this issue 2 years ago • 5 comments

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.

kleinesfilmroellchen avatar Oct 09 '23 10:10 kleinesfilmroellchen

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!

stale[bot] avatar Nov 01 '23 01:11 stale[bot]

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!

stale[bot] avatar Nov 26 '23 03:11 stale[bot]

We indirectly assume zero-termination at least here.

DanShaders avatar Nov 27 '23 04:11 DanShaders

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!

stale[bot] avatar Dec 20 '23 19:12 stale[bot]

Conflicts with DeprecatedString --> ByteString change

ADKaster avatar Dec 21 '23 01:12 ADKaster

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.

kleinesfilmroellchen avatar Jan 05 '24 23:01 kleinesfilmroellchen