Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] GtkSourceView2.0 syntax highlighting
On Tue, 2007-05-29 at 14:04 -0500, Edgar Friendly wrote:

> The reasonably large list of keywords has been broken into four
> sections.  (I encourage comments on this division.)
> 
> 1) booleans
> 	true	false
> 
> 2) flow control & common keywords
> 	and	assert	begin	do	done	downto	else
> 	end	for	fun	function	if	in
> 	let	match	rec	then	to	try	val
> 	when	while	with
> 
> 3) types, objects & modules
> 	as	class	constraint	exception	external
> 	functor	include	inherit	initializer	method	module
> 	mutable	new	object	of	open	private	struct
> 	sig	type	virtual
> 
> 4) function-like keywords
> 	asr	land	lazy	lor	lsl	lsr	lxor
> 	mod	or
> 


I would do this slightly differently. The 'most important'
keywords are used in binders which often denote something
part of an interface: These are (roughly):

type, let, module, class, and, in, rec, val, exception
external functor

and these should be in a heavy font. Flow control is an implementation
detail and should be lighter weight. inherit, include, and open are
"directives", perhaps a weak color (boring houskeeping ..)



-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net