[Fwd: gtksourceview csharp.lang]



-----Forwarded Message-----

From: John Luke <jluke cfl rr com>
To: gustavo giraldez gmx net
Cc: paolo maggi polito it
Subject: gtksourceview csharp.lang
Date: 12 Jun 2003 14:10:02 -0400

Hello,

I have been playing around with a csharp.lang file for gtksourceview.  I
used the java one as a base, and it seems to work ok.  I also, used the
csharp.vim to help make sure I covered the major keywords.

I am stuck figuring out how to highlight attributes (regex?), which look
like:
[SomeAttribute]
and also was wondering if there is a list of styles that are used and if
it is possible to control the colors.  Perhaps the color-style is not
language specific?

I am sending this directly to you because I did not find a list for
gtksourceview, perhaps I missed it.

Thanks,
John Luke
----


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language _name="C#" version="1.0" _section="Sources" mimetypes="text/x-csharp">
	
	<string _name = "String" style = "String" end-at-line-end = "TRUE">
		<start-regex>&quot;</start-regex>
		<end-regex>&quot;</end-regex>
	</string>

	<string _name = "String 2" style = "String" end-at-line-end = "TRUE">
		<start-regex>&apos;</start-regex>
		<end-regex>&apos;</end-regex>
	</string>

	<line-comment _name = "Line Comment" style= "Comment">
		<start-regex>//</start-regex>
	</line-comment>

	<block-comment _name = "Block Comment" style = "Comment">
		<start-regex>/\*</start-regex>
        	<end-regex>\*/</end-regex>
	</block-comment>
	
	<keyword-list _name = "Declarations" style = "Keyword" case-sensitive="TRUE">
		<keyword>using</keyword>
		<keyword>namespace</keyword>
		<keyword>class</keyword>
		<keyword>struct</keyword>
		<keyword>interface</keyword>
		<keyword>delegate</keyword>
		<keyword>enum</keyword>
		<keyword>readonly</keyword>
		<keyword>virtual</keyword>
		<keyword>override</keyword>
		<keyword>extern</keyword>
		<keyword>unsafe</keyword>
	</keyword-list>

	<keyword-list _name = "Primitives" style = "Data Type" case-sensitive="TRUE">
		<keyword>boolean</keyword>
		<keyword>bool</keyword>
		<keyword>byte</keyword>
		<keyword>char</keyword>
		<keyword>double</keyword>
		<keyword>float</keyword>
		<keyword>int</keyword>
		<keyword>uint</keyword>
		<keyword>decimal</keyword>
		<keyword>long</keyword>
		<keyword>ulong</keyword>
		<keyword>short</keyword>
		<keyword>string</keyword>
	</keyword-list>

	<keyword-list _name = "Flow" style = "Keyword" case-sensitive="TRUE">
		<keyword>if</keyword>
      	<keyword>else</keyword>
		<keyword>switch</keyword>
		<keyword>break</keyword>
		<keyword>continue</keyword>
		<keyword>return</keyword>
		<keyword>case</keyword>
		<keyword>for</keyword>
		<keyword>do</keyword>
		<keyword>while</keyword>
		<keyword>foreach</keyword>
		<keyword>this</keyword>
		<keyword>base</keyword>
		<keyword>super</keyword>
		<keyword>new</keyword>
		<keyword>try</keyword>
		<keyword>catch</keyword>
	</keyword-list>

	<keyword-list _name = "Modifiers" style = "Keyword" case-sensitive="TRUE">
		<keyword>static</keyword>
		<keyword>public</keyword>
		<keyword>protected</keyword>
		<keyword>internal</keyword>
		<keyword>private</keyword>
		<keyword>abstract</keyword>
		<keyword>sealed</keyword>
	</keyword-list>

	<keyword-list _name = "Memory" style = "Others" case-sensitive="TRUE">
		<keyword>as</keyword>
		<keyword>is</keyword>
		<keyword>typeof</keyword>
		<keyword>null</keyword>
		<keyword>void</keyword>
		<keyword>false</keyword>
		<keyword>true</keyword>
	</keyword-list>

</language>





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]