Module syntax

Module syntax 

Source
Expand description

Various structs/enums that represent generic AST nodes.

Structs§

BadDeclaration
BangImportant
Represents a two tokens, the first being Kind::Delim where the char is !, and the second being an Ident with the value important. [CSS defines this as]:
Block
This trait provides an implementation for “consuming a blocks contents”.
CommaSeparated
This is a generic type that can be used for AST nodes representing multiple multiple items separated with commas.
ComponentValues
Declaration
This is a generic type that can be used for AST nodes representing a Declaration, aka “property”. This is defined as:
DeclarationGroup
A group of declarations that can be interleaved with rules.
DeclarationList
A generic struct that can be used for AST nodes representing a rule’s block, that is only capable of having child declarations.
DeclarationRuleList
A generic struct for AST nodes representing a rule’s block that is only capable of having child declarations or at-rules. Qualified Rules are not allowed. This is defined as:
FunctionBlock
NoBlockAllowed
A struct to provide to rules to disallow blocks.
QualifiedRule
RuleList
A struct representing an AST node block that only accepts child “Rules”. This is defined as:
SimpleBlock
UnknownRuleBlock
Wrapper type for using ComponentValues as a rule type parameter in unknown rules. This implements RuleVariants to allow ComponentValues to be used as the block type for unknown qualified rules, where the rule structure is not recognized.

Enums§

ComponentValue
DeclarationOrBad
Either a valid declaration or a bad declaration consumed for error recovery.