[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-source-highlight] C-sharp style of surce-highlight
From: |
HEMMI, Shigeru |
Subject: |
[Help-source-highlight] C-sharp style of surce-highlight |
Date: |
Wed, 19 Apr 2006 08:41:22 +0900 |
Hello,
I wanted to add a C-sharp (C#) style of source-highight.
What I did was:
1. cp cpp.lang csharp.lang
2. Edit csharp.lang only in keyword and type; other fields not changed.
3. Edit lang.map, Makefile.am and Makefile.in so that csharp.lang is included.
4. Make install
It seems OK at a glance.
However, I am wondering if there is a better way or I made somthing
mistakes in it.
Let me know if there is points to improve/correct.
----- FYI, my csharp.lang is as follows:
--------------------------------------------------------
# definitions for C-sharp
# by S. HEMMI, this is not authorized.
include "c_comment.lang"
state preproc start '^[[:blank:]]*#(?:[[:blank:]]*include)' begin
string delim "<" ">"
string delim "\"" "\"" escape "\\"
include "c_comment.lang"
end
preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)'
include "number.lang"
include "c_string.lang"
keyword = "abstract|event|new|struct ",
"as|explicit|null|switch",
"base|extern|object|this ",
"bool|false|operator|throw ",
"break|finally|out|true ",
"byte|fixed|override|try ",
"case|float|params|typeof ",
"catch|for|private|uint ",
"char|foreach|protected|ulong ",
"checked|goto|public|unchecked ",
"class|if|readonly|unsafe ",
"const|implicit|ref|ushort ",
"continue|in|return|using ",
"decimal|int|sbyte|virtual ",
"default|interface|sealed|volatile ",
"delegate|internal|short|void ",
"do|is|sizeof|while ",
"double|lock|stackalloc ",
"else|long|static ",
"enum|namespace|string ",
"get|partial|set ",
"value|where|yield "
type = "bool|byte|sbyte|char|decimal|double",
"float|int|uint|long|ulong|object",
"short|ushort|string"
include "symbols.lang"
cbracket = "{|}"
include "function.lang"
####
Best regards,
- [Help-source-highlight] C-sharp style of surce-highlight,
HEMMI, Shigeru <=