marianoguerra/css/ast does not have a README file
pub(all) enum ComponentValue {
Ident(String)
Str(String)
Num(Number)
Dimension(Number, String)
Percentage(Number)
Hex(String)
Url(String)
Function(String, Array[ComponentValue])
Paren(Array[ComponentValue])
Bracket(Array[ComponentValue])
Comma
Slash
Delim(String)
Bogus(Bogus)
} derive(Eq, Debug)pub(all) enum CssRule {
Style(StyleRule)
Media(MediaRule)
Supports(SupportsRule)
Container(ContainerRule)
Layer(LayerRule)
Keyframes(KeyframesRule)
FontFace(DeclBlock)
Page(PageRule)
Property(PropertyRule)
Import(ImportRule)
Charset(String, Span)
Namespace(NamespaceRule)
Scope(ScopeRule)
StartingStyle(Array[BlockItem], Span)
CounterStyle(String, DeclBlock)
Unknown(UnknownAtRule)
Bogus(Bogus)
} derive(Eq, Debug)pub(all) struct Declaration {
property : PropertyName
value : Array[ComponentValue]
important : Bool
span : Span
} derive(Eq, Debug)pub(all) enum Feature {
Boolean(String)
Plain(String, Array[ComponentValue])
Range(String, RangeOp, Array[ComponentValue])
Interval(Array[ComponentValue], RangeOp, String, RangeOp, Array[ComponentValue])
} derive(Eq, Debug)pub(all) struct KeyframesRule {
name : KeyframesName
frames : Array[KeyframeBlock]
span : Span
} derive(Eq, Debug)pub(all) struct MediaQuery {
qualifier : MediaQualifier?
media_type : String?
condition : Condition?
} derive(Eq, Debug)pub(all) enum Qualifier {
Class(String)
Id(String)
Attr(AttrSelector)
Pseudo(PseudoClass)
Element(PseudoElement)
Nesting
Bogus(Bogus)
} derive(Eq, Debug)pub(all) enum Selector {
Simple(Compound)
Complex(Selector, Combinator, Compound)
Relative(Combinator, Selector)
Bogus(Bogus)
} derive(Eq, Debug)Install
Download zipA semantic CSS syntax tree for MoonBit: a tolerant parser, a printer with pretty, compact and minified modes, and structured diagnostics
Dependencies