Expand description
Token parser combinators for CSS parsing.
This module provides a monadic parser combinator library for building CSS parsers, with a comprehensive set of parsing tools and combinators.
COMPREHENSIVE PARSING API
This implementation provides a complete parsing API with:
- Return types:
T | Error(using Result<T, CssParseError> in Rust) - Consistent method signatures
- Helper classes: TokenZeroOrMoreParsers, TokenOneOrMoreParsers, etc.
- Fluent APIs with .separated_by() methods
- Static methods return specialized parser types
Modules§
- tokens
- Provides: TokenParser.tokens.Ident, TokenParser.tokens.Whitespace.optional, etc.
Structs§
- Mixed
Sequence Builder - Builder for mixed sequences that can handle optional parsers intelligently
- Separated
Parser - A parser that represents a main parser separated by a separator parser This allows for fluent API like: parser.separatedBy(comma).oneOrMore()
- Sequence
Parsers - SetOf
Parsers - Token
OneOr More Parsers - Token
Optional Parser - Token
Parser - Token
Zero OrMore Parsers - Tokens
- Tokens API providing access to all basic token parsers
Enums§
Functions§
- peek_
tokens - Peek at what the next few tokens would be without consuming them Enhanced debugging utility function
Type Aliases§
- RunFn
- A parser function that takes a TokenList and returns T or Error