English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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 
caml.properties file in a Scintilla source tree.

Robert Roessler