ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
ZenitUI::ZMarkup::StyleParser Class Reference

Hand-written recursive-descent CSS-like parser. More...

#include <StyleParser.hpp>

Public Member Functions

 StyleParser (std::string_view src, std::string fileName)
 Construct a parser logging warnings through Logger.
 StyleParser (std::string_view src, std::string fileName, DiagnosticSink &sink)
 Construct a parser reporting diagnostics into sink.
void setStrict (bool s) noexcept
 Enable strict mode: unknown properties and pseudo-classes become errors.
void setRegistry (const Registry *reg) noexcept
 Use a specific Registry for ::part validation (defaults to global registry).
StyleSheet parse ()
 Parse the whole source into a StyleSheet.

Detailed Description

Hand-written recursive-descent CSS-like parser.

Stateful; create one instance per source. Tracks line / column for accurate SourceSpans in diagnostics.


The documentation for this class was generated from the following file: