1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +00:00

LibWeb: Extract CalculationNode::constant_type_from_string() function

This is needed by some upcoming generated code. Renamed "PI" member to
"Pi" while I was at it.
This commit is contained in:
Sam Atkins 2023-07-08 16:55:06 +01:00 committed by Andreas Kling
parent e4a2bd7a44
commit 136dc7a1c3
3 changed files with 27 additions and 25 deletions

View file

@ -124,11 +124,12 @@ public:
// https://drafts.csswg.org/css-values-4/#calc-error-constants
enum class ConstantType {
E,
PI,
Pi,
NaN,
Infinity,
MinusInfinity,
};
static Optional<ConstantType> constant_type_from_string(StringView);
enum class Type {
Numeric,