types.ml 944 B

12345678910111213141516171819202122232425262728293031
  1. type value =
  2. | Lit of string
  3. | Str of string
  4. | Lst of value list
  5. | Dim of float * string
  6. | Fn of string * value
  7. | Imp
  8. type prop = string * value
  9. type selector = string list
  10. type decl =
  11. | Group of selector list * prop list (* <selectors> { <props> } *)
  12. | Media of string list * decl list (* @media <queries> { <groups> } *)
  13. | Import of string * string list (* @import "<file>" [<media>]; *)
  14. | Charset of string (* @charset "<charset>"; *)
  15. | Page of string option * prop list (* @page [<query>] { <props> } *)
  16. | Fontface of prop list (* @font-face { <props> } *)
  17. | Namespace of string option * string (* @namespace [<prefix>] "<uri>"; *)
  18. (* TODO: @document, @keyframes, @supports *)
  19. type args = {
  20. mutable infiles : string list;
  21. mutable outfile : string option;
  22. mutable verbose : int;
  23. }
  24. type loc = string * int * int * int * int
  25. exception LocError of loc * string