#include <cstddef>#include <functional>#include <optional>#include <span>#include <string_view>#include <vector>#include "donner/css/ComponentValue.h"Classes | |
| struct | donner::css::VariableSubstitutionLimits |
| Per-value limits in addition to any enclosing cascade work limits. More... | |
| struct | donner::css::VariableSubstitutionResult |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
| namespace | donner::css |
| Donner CSS library, a standalone composable CSS parser. | |
Typedefs | |
| using | donner::css::VariableLookup |
| A lookup returns an already computed token sequence. Its storage must outlive substitution. An engaged empty span is a valid empty value; a missing name is guaranteed-invalid. | |
Enumerations | |
| enum class | donner::css::VariableReferences { None , Valid , Invalid } |
| Classification of variable references, including references nested in functions and blocks. | |
| enum class | donner::css::VariableSubstitutionStatus { Resolved , Invalid , LimitExceeded } |
| A rejected expansion has no partially substituted output. | |
Functions | |
| VariableReferences | donner::css::InspectVariableReferences (std::span< const ComponentValue > values) |
| Inspect the token tree without substituting or looking up any name. | |
| bool | donner::css::VisitVariableReferences (std::span< const ComponentValue > values, const std::function< void(std::string_view)> &visit) |
| Visit every referenced custom property, including those in unused fallbacks, in token order. Returns false when a var() argument list is invalid. | |
| VariableSubstitutionResult | donner::css::SubstituteVariables (std::span< const ComponentValue > values, const VariableLookup &lookup, VariableSubstitutionLimits limits={}, const std::function< bool(std::size_t, std::size_t)> &admit={}) |
| Substitute already computed variables and selected fallback token sequences. Token boundaries, nesting, and source locations are preserved. The optional callback admits actual output work (component count, source bytes) before each append, and may decline further work. | |
| struct donner::css::VariableSubstitutionLimits |
| struct donner::css::VariableSubstitutionResult |
| Class Members | ||
|---|---|---|
| VariableSubstitutionStatus | status | |
| vector< ComponentValue > | values | |