package higlo

  1. Overview
  2. Docs
Syntax highlighting library

Install

Dune Dependency

Authors

Maintainers

Sources

higlo-0.8.tar.bz2
md5=8a92052d66ad8afe241d66274d58a0b9
sha512=5f82c286eb9a4f5e18ea2df23f943907403c593f8dbfecb10c12aa2c40aa0264ac63030e0ee5e133240e36178e1bfc2eb3e9fba64ebc885bb2c2eaf964ee389c

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