package higlo

  1. Overview
  2. Docs
Syntax highlighting library

Install

Dune Dependency

Authors

Maintainers

Sources

higlo-0.9.tar.bz2
md5=d8bfa60efe79037f3aa206a27e0e72c5
sha512=725257959797b13814e5ba90ccf500770bc8cfba58916c07c64babf84d76074195a7c38e3e0593719f20b02888d7316df2c9451343c30af8a20a07868c076255

doc/index.html

Higlo

Higlo is an OCaml library for syntax highlighting. Higlo could mean Highlighting in Ocaml.

The purpose of Higlo is not to provide syntax highlighting for every language, nor target every format (HTML, LaTeX, ...). It provides a simple way to support additional languages and develop the generator for the output format you need.

By now, only some input languages are supported (OCaml, XML, JSON and Graphviz/dot), and it only generates Xtmpl.Rewrite.tree to highlight code in XML. Developing support for additional input languages is just a matter of writing a Sedlex lexer. Supporting another output format only requires mapping values of type Higlo.Lang.token.

See the OCaml lexer for an example of Higlo Sedlex lexer.

API

The API consists in these modules: Higlo.Lang, Higlo.Printers.

OCaml

Innovation. Community. Security.

On This Page
  1. API