Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
GtkSourceView2.0 syntax highlighting
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-05-29 (21:37)
From: Robert Roessler <roessler@r...>
Subject: Re: [Caml-list] GtkSourceView2.0 syntax highlighting
Edgar Friendly wrote:
> The upcoming version of GtkSourceView, the library used by many Gnome
> text editors for syntax highlighting, supports new and more powerful
> language parsing.  I volunteer to update the language definition for
> Ocaml, and would like some feedback from the community regarding useful
> things to highlight.

A "gotcha" to be aware of (if you aren't already handling this): don't 
forget that OCaml comments nest. ;)

Also, from my OCaml lexer in the Scintilla distribution:

# suggested; more could come from, say, Pervasives
keywordoptional1.caml= \
option Some None ignore ref lnot succ pred

# suggested; more could come from, say, user-defined types
keywordoptional2.caml= \
array bool char float int list string unit

The full set (including default coloring values) may be found in the file in a Scintilla source tree.

Robert Roessler