module Camlhighlight_parser: sig .. end
Facilities for converting source code into highlighted code.
Exceptions
exception Cannot_initialize_hiliter
exception Cannot_initialize_mapper
exception Uninitialized
exception Unknown_language of Camlhighlight_core.lang_t
exception Hiliter_error of string
Public functions and values
val set_tabspaces : int -> unit
Sets the number of spaces per TAB character.
val get_available_langs : unit -> Camlhighlight_core.lang_t list
val is_available_lang : Camlhighlight_core.lang_t -> bool
Returns a boolean indicating whether syntax highlighting is available for
the given language.
val from_string : ?lang:Camlhighlight_core.lang_t -> string -> Camlhighlight_core.t
An invocation of
from_string ~lang source will create a value of type
Camlhighlight_core.t containing the syntax-highlighted version of
the source-code in string format passed in the
source parameter.
The optional parameter
lang tells the highlighter which language
conventions should be used for highlighting. This parameter expects
a value of type
Camlhighlight_core.lang_t; no actual highlighting
will be done if it is not provided (in fact equivalent to specifying
"txt" as the language).