package ppx_css
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=e60e31aadd820b131f7f05827f369164564400bd4fd51c199d066abf7e68753f
doc/ppx_css.syntax/Ppx_css_syntax/index.html
Module Ppx_css_syntax
Source
This module parses a call to ppx_css
into nicer parts to make the implementation of ppx_css
cleaner.
type t = {
rewrite : Ppxlib.expression Core.String.Map.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 tostylesheet
onppx_css
.css_string : String_constant.t;
(*The contained CSS string. Equivalent to the string parameter given to ppx_css.
*)dont_hash_prefixes : string list;
}
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.
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.
This module contains the parameters sent in via the jbuild/dune file's preprocess
field.