- Subject: Re: C# mode
- From: Marko Mahnic <marko.mahnic@xxxxxxxx>
- Date: Fri, 02 Sep 2005 17:44:59 +0200
MDK wrote:
Well, I might be missing something completely, but I've got problems
with keywords.sl. It seems that some words work, while others don't.
Below is my first shot at the glib mode. Everything works fine except
for "void" , "struct" , "case" , "switch"... no idea why ("if", "do",
"for" work fine).
You should write one block of code for each type of keywords (0, 1, ...).
If you have several blocks for one type of keywords, the later
blocks override the former ones (because of additional calls to
define_keywords_n (..., type)).
Your code for keywords of type 0:
% Keywords
variable wordss = keywords->new_keyword_list();
keywords->add_keywords(wordss, "void switch case goto for if return while until do");
keywords->sort_keywords(wordss);
keywords->strlow_keywords(wordss);
keywords->define_keywords(wordss, "glib", 0);
% Basic types
variable types = keywords->new_keyword_list();
keywords->add_keywords(types, "gboolean gpointer gconstpointer gchar guchar");
keywords->add_keywords(types, "gint guint gshort gushort glong gulong gint8 guint8
gint16 guint16 gint32 guint32");
keywords->add_keywords(types, "gint64 guint64 gfloat gdouble gsize gssize");
keywords->sort_keywords(types);
keywords->strlow_keywords(types);
keywords->define_keywords(types, "glib", 0);
....
should be:
variable wordss = keywords->new_keyword_list();
% Keywords
keywords->add_keywords(wordss, "void switch case goto for if return while until do");
% Basic types
keywords->add_keywords(types, "gboolean gpointer gconstpointer gchar guchar");
keywords->add_keywords(types, "gint guint gshort gushort glong gulong gint8 guint8
gint16 guint16 gint32 guint32");
keywords->add_keywords(types, "gint64 guint64 gfloat gdouble gsize gssize");
.....
keywords->sort_keywords(wordss);
keywords->strlow_keywords(wordss);
keywords->define_keywords(wordss, "glib", 0); % keyword type=0
variable wordss1 = keywords->new_keyword_list();
....
keywords->define_keywords(wordss1, "glib", 1); % keyword type=1
Marko Mahnic
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2005 date index]
[2005 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]