mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 06:32:26 +02:00
Frequently we want to parse "anything that's a `<length-percentage>`" or similar, which could be a constant value or a calculation, but didn't have a nice way of doing so. That meant repeating the same "try and parse a dimension, see if it's the right type, then maybe try and parse a calculation and see if that's the right type" boilerplate code. Or more often, forgetting about calculations entirely. These helpers should make that a lot more convenient to do. And they also use TokenStream, so we can eventually drop the old `parse_length()` method.
18 KiB
18 KiB