Module Ppx_css_syntax

module String_constant : sig ... end

This module parses a call to ppx_css into nicer parts to make the implementation of ppx_css cleaner.

type t = {
  1. dont_hash : Core.String.Set.t;
    (*

    For a given (key, value) pair, value will "rewrite" itself wherever "key" is roughly: s/$key/$value/g

    Equivalent to the ~rewrite parameter in the call to stylesheet on ppx_css.

    *)
  2. css_string : String_constant.t;
    (*

    The contained CSS string. Equivalent to the string parameter given to ppx_css.

    *)
  3. dont_hash_prefixes : string list;
    (*

    Whether or not we should use the lazy loading optimization for this CSS sheet

    *)
  4. lazy_loading_optimization : Preprocess_arguments.lazy_loading_optimization;
}
val parse_stylesheet_exn : Ppxlib.expression -> t

Given the AST of an expression like stylesheet ~rewrite:[] "" will result in a "parsed" t.

stylesheet is the %css stylesheet {|stylesheet...|} syntax and expands to a module declaration.

val parse_inline_expression_exn : Ppxlib.expression -> t

Given the AST of an expression like "" ~rewrite:[] will result in a "parsed" t

inline is the syntax %css {|declarations...|} and expands to an expression.

val empty_stylesheet : css_string:String_constant.t -> t
module Serializable_options : sig ... end
module Preprocess_arguments : sig ... end

This module contains the parameters sent in via the jbuild/dune file's preprocess field.