package tiny_languages

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Css_syntaxSource

Sourcetype 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
Sourcetype component =
  1. | Token of token
  2. | Block of char * component list
  3. | Func of string * component list
Sourcetype declaration = {
  1. name : string;
  2. value : component list;
  3. important : bool;
}
Sourcetype 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;
    }
Sourceval tokenize : string -> token list
Sourceval components_of : string -> component list
Sourceval trim : component list -> component list
Sourceval split_on : token -> component list -> component list list
Sourceval parse_stylesheet : string -> rule list
Sourceval parse_declarations : string -> declaration list
Sourceval rules_of_block : component list -> rule list
Sourceval declarations_of_block : component list -> declaration list
Sourceval to_string : component list -> string