Commit graph

6 commits

Author SHA1 Message Date
Benoit Lormeau e4da2875c5 AK: Use templates instead of Function for Conditions in the GenericLexer
Since commit 1ec59f28ce turns the ctype macros
into functions we can now feed them directly to a GenericLexer! This will lead to
removing the ctype adapters that were kind-of excessive boilerplate, but needed as
the Kernel doesn't compile with the LibC.
2020-09-27 21:15:25 +02:00
Benoit Lormeau 8f34b493e4 AK: Enhance GenericLexer's string consumption
The `consume_quoted_string()` can now take an escape character. This allows it
(for example) to capture a string's enclosing quotes. The escape character is
optional by default.

You can also consume and unescape a quoted string with the eponymous method
`consume_and_unescape_string()`. It takes an escape character as parameter
(backslash by default). It builds a String in which common escape sequences
get... unescaped :^) (e.g. \n, \r, \t...).
2020-09-26 17:17:53 +02:00
Benoit Lormeau 1ab6dd67e9 AK: Alphabetically sort the ctype adapters 2020-09-26 17:17:53 +02:00
Ben Wiederhake 8940bc3503 Meta+AK: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Nico Weber 064159d215 LibWeb: Use GenericLexer in WrapperGenerator 2020-08-21 16:01:48 +02:00
Benoît Lormeau 7b356c33cb
AK: Add a GenericLexer and extend the JsonParser with it (#2696) 2020-08-09 11:34:26 +02:00