package css

  1. Overview
  2. Docs
module Log : sig ... end

Logging

module T : sig ... end

Types and base definitions.

module U : sig ... end

Utilities for parsing.

module Vp : sig ... end

Value parsers.

module S : sig ... end

Statements.

module Sp : sig ... end

Statement parsers.

module P : sig ... end

Properties

module C : sig ... end

Computing values.

module Kw : sig ... end

All case-sensitive keywords

type 'ns css = 'ns S.statement list

A CSS structure is a list of S.statements.

val parse_string : ?fname:string -> string -> string css

parse_string string parses the given string, creating the required T.ctx to compute locations. Optional argument fname can be used to specify a filename in the fname field of T.pos structures. Raises T.Error in case of error.

type namespaces = Iri.t T.Smap.t

Namespaces map strings to IRIs.

val expand_ns : ?ns:namespaces -> string css -> Iri.t css

expand_ns css expands the namespaces in the given css, according to the namespace statements in css. Some predefined namespaces can be given with ns optional argument. If not specified, the default namespaces are used.

val pp_string_css : Format.formatter -> string css -> unit

Pretty-print the given (non-expanded) CSS to the given formatter.

val pp_iri_css : Format.formatter -> Iri.t css -> unit

Pretty-print the given (expanded) CSS to the given formatter.

val compute_decls : root:C.t -> parent:C.t -> C.t -> P.binding list -> C.t
OCaml

Innovation. Community. Security.