package wikitext

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Type : sig ... end
module Mapper : sig ... end

mapper allows to implement AST rewriting using open recursion. A typical mapper would be based on default_mapper, a deep identity mapper, and will fall back on it for handling the syntax it does not modify.

exception ParsingError of int * int * string

ParsingError (line, column, lexeme)

val doc_from_lexbuf : Stdlib.Lexing.lexbuf -> Type.document

doc_from_lexbuf lex parse lex and return the resulting Type.document. Raise ParsingError in case of failure

val doc_from_string : string -> Type.document
val doc_from_channel : Stdlib.in_channel -> Type.document
val doc_from_file : string -> Type.document
val output_document : (string -> unit) -> Type.document -> unit

output_document out doc Run through the parsed tree doc and print its content translated into HTML code using the out function.

val doc_to_string : Type.document -> string

doc_to_string doc Return the HTML version of doc, as a string.

val doc_to_chan : Stdlib.out_channel -> Type.document -> unit

doc_to_chan chan doc Print doc (as HTML) to chan. See output_document

val doc_to_file : string -> Type.document -> unit

doc_to_file filename doc Create (or open and truncate) filename and write doc (as HTML) into it. See output_document