Module Css_syntax

type token =
  1. | Ident of string
  2. | Function of string
  3. | At_keyword of string
  4. | Hash of string
  5. | String of string
  6. | Url of string
  7. | Delim of char
  8. | Number of float
  9. | Percentage of float
  10. | Dimension of float * string
  11. | Whitespace
  12. | Colon
  13. | Semicolon
  14. | Comma
type component =
  1. | Token of token
  2. | Block of char * component list
  3. | Func of string * component list
type declaration = {
  1. name : string;
  2. value : component list;
  3. important : bool;
}
type rule =
  1. | Style_rule of {
    1. prelude : component list;
    2. declarations : declaration list;
    }
  2. | At_rule of {
    1. name : string;
    2. prelude : component list;
    3. block : component list option;
    }
val tokenize : string -> token list
val components_of : string -> component list
val trim : component list -> component list
val split_on : token -> component list -> component list list
val parse_stylesheet : string -> rule list
val parse_declarations : string -> declaration list
val rules_of_block : component list -> rule list
val declarations_of_block : component list -> declaration list
val to_string : component list -> string