Module Selector.Ast

Abstract syntax tree for parsed selectors.

type simple_selector_type =
  1. | Type_tag
  2. | Type_id
  3. | Type_class
  4. | Type_universal
  5. | Type_attr
  6. | Type_pseudo
type simple_selector = {
  1. selector_type : simple_selector_type;
  2. name : string option;
  3. operator : string option;
  4. value : string option;
  5. arg : string option;
}
type compound_selector = {
  1. selectors : simple_selector list;
}
type complex_selector = {
  1. parts : (string option * compound_selector) list;
}
type selector_list = {
  1. selectors : complex_selector list;
}
type selector =
  1. | Simple of simple_selector
  2. | Compound of compound_selector
  3. | Complex of complex_selector
  4. | List of selector_list
val make_simple : simple_selector_type -> ?name:string -> ?operator:string -> ?value:string -> ?arg:string -> unit -> simple_selector
val make_compound : simple_selector list -> compound_selector
val make_complex : (string option * compound_selector) list -> complex_selector
val make_list : complex_selector list -> selector_list