package tiny_languages

  1. Overview
  2. Docs
Small languages from scratch: Scheme, Lisp, Smalltalk-80, Pascal, BASIC, JavaScript, HTML, CSS and more

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.3.6.tar.gz
md5=7c636383d146d30ac6f2fa234a6253c8
sha512=c79f3823c5f8f57e5038eb640d487c61168b84aa07c61999d6622ef9fd0c890e2b03b4c6a7cdbbe9352a49e25dda00ac7bb14693cee8e3d7beeed251351a2af0

doc/tiny_languages.lang_css/Css_syntax/index.html

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