package wikitext

  1. Overview
  2. Docs

Module WikitextSource

Sourcemodule Type : sig ... end
Sourcemodule 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.

Sourceexception ParsingError of int * int * string

ParsingError (line, column, lexeme)

Sourceval doc_from_lexbuf : Lexing.lexbuf -> Type.document

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

Sourceval doc_from_string : string -> Type.document
Sourceval doc_from_channel : in_channel -> Type.document
Sourceval doc_from_file : string -> Type.document
Sourceval 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.

Sourceval doc_to_string : Type.document -> string

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

Sourceval doc_to_chan : out_channel -> Type.document -> unit

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

Sourceval 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

OCaml

Innovation. Community. Security.