208 lines
6.5 KiB
Plaintext
Raw Normal View History

2006-08-26 04:46:29 -05:00
<?xml version="1.0" encoding="UTF-8"?>
2007-06-18 00:03:03 -05:00
<!--
Author: John Luke <jluke@cfl.rr.com>
Copyright (C) 2003 John Luke <jluke@cfl.rr.com>
Copyright (C) 2004 Jeroen Zwartepoorte <jeroen@xs4all.nl>
2007-06-20 23:37:33 -05:00
Copyright (C) 2004 Alessio Frusciante <algol@firenze.linux.it>
2007-06-18 00:03:03 -05:00
Copyright (C) 2005 Brion Vibber <brion@pobox.com>
2007-06-20 23:37:33 -05:00
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
2007-06-18 00:03:03 -05:00
2007-06-20 23:37:33 -05:00
This library is distributed in the hope that it will be useful,
2007-06-18 00:03:03 -05:00
but WITHOUT ANY WARRANTY; without even the implied warranty of
2007-06-20 23:37:33 -05:00
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
2007-06-18 00:03:03 -05:00
2007-06-20 23:37:33 -05:00
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
2007-06-18 00:03:03 -05:00
-->
<language id="c-sharp" _name="C#" version="2.0" _section="Sources">
<metadata>
<property name="mimetypes">text/x-csharpsrc;text/x-csharp</property>
<property name="globs">*.cs</property>
</metadata>
2006-08-26 04:46:29 -05:00
<styles>
<style id="comment" _name="Comment" map-to="def:comment"/>
2007-05-06 07:51:26 -05:00
<style id="error" _name="Error" map-to="def:error"/>
<style id="data-type" _name="Data Type" map-to="def:data-type"/>
<style id="string" _name="String" map-to="def:string"/>
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
<style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
</styles>
2006-08-26 04:46:29 -05:00
<definitions>
2007-05-06 07:51:26 -05:00
<context id="line-comment" style-ref="comment" end-at-line-end="true">
2007-06-20 23:37:33 -05:00
<start>//</start>
<include>
2007-05-06 07:51:26 -05:00
<context ref="def:in-line-comment"/>
</include>
</context>
2007-05-06 07:51:26 -05:00
<context id="multiline-comment" style-ref="comment">
2007-06-20 23:37:33 -05:00
<start>/\*</start>
<end>\*/</end>
<include>
2007-05-06 07:51:26 -05:00
<context ref="def:in-comment"/>
</include>
</context>
2007-05-06 07:51:26 -05:00
<context id="close-comment-outside-comment" style-ref="error">
2007-06-20 23:37:33 -05:00
<match>\*/(?!\*)</match>
2007-05-06 07:51:26 -05:00
</context>
<define-regex id="preproc-start">^\s*#\s*</define-regex>
<context id="if-false-comment" style-ref="comment">
<start>\%{preproc-start}if\s*false\b</start>
<end>\%{preproc-start}(endif|else|elif)\b</end>
<include>
2007-05-06 07:51:26 -05:00
<context id="if-in-if-false">
<start>\%{preproc-start}if(n?def)?\b</start>
<end>\%{preproc-start}endif\b</end>
<include>
<context ref="if-in-if-false"/>
<context ref="def:in-comment"/>
</include>
</context>
<context ref="def:in-comment"/>
</include>
</context>
2007-05-06 07:51:26 -05:00
<context id="preprocessor" style-ref="preprocessor" end-at-line-end="true">
<start extended="true">
\%{preproc-start}
(define|undef|if(n?def)?|else|elif|endif|line|error|warning|region|endregion)
\b
</start>
<include>
2007-05-06 07:51:26 -05:00
<context ref="line-comment"/>
<context ref="multiline-comment"/>
</include>
</context>
2007-05-06 07:51:26 -05:00
<context id="multiline-string" style-ref="string">
<start>@"([^"]|"")*</start>
<end>"</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
</include>
</context>
2007-05-06 07:51:26 -05:00
<context id="keywords" style-ref="keyword">
<keyword>class</keyword>
<keyword>delegate</keyword>
<keyword>enum</keyword>
<keyword>event</keyword>
<keyword>interface</keyword>
<keyword>namespace</keyword>
<keyword>struct</keyword>
<keyword>using</keyword>
<keyword>abstract</keyword>
<keyword>const</keyword>
<keyword>explicit</keyword>
<keyword>extern</keyword>
<keyword>fixed</keyword>
<keyword>implicit</keyword>
<keyword>internal</keyword>
<keyword>lock</keyword>
<keyword>out</keyword>
<keyword>override</keyword>
<keyword>params</keyword>
<keyword>private</keyword>
<keyword>protected</keyword>
<keyword>public</keyword>
<keyword>ref</keyword>
<keyword>sealed</keyword>
<keyword>static</keyword>
<keyword>readonly</keyword>
<keyword>unsafe</keyword>
<keyword>virtual</keyword>
<keyword>volatile</keyword>
<keyword>add</keyword>
<keyword>as</keyword>
<keyword>assembly</keyword>
<keyword>base</keyword>
<keyword>break</keyword>
<keyword>case</keyword>
<keyword>catch</keyword>
<keyword>checked</keyword>
<keyword>continue</keyword>
<keyword>default</keyword>
<keyword>do</keyword>
<keyword>else</keyword>
<keyword>false</keyword>
<keyword>finally</keyword>
<keyword>for</keyword>
<keyword>foreach</keyword>
<keyword>get</keyword>
<keyword>goto</keyword>
<keyword>if</keyword>
<keyword>in</keyword>
<keyword>is</keyword>
<keyword>new</keyword>
<keyword>null</keyword>
<keyword>remove</keyword>
<keyword>return</keyword>
<keyword>set</keyword>
<keyword>sizeof</keyword>
<keyword>stackalloc</keyword>
<keyword>super</keyword>
<keyword>switch</keyword>
<keyword>this</keyword>
<keyword>throw</keyword>
<keyword>true</keyword>
<keyword>try</keyword>
<keyword>typeof</keyword>
<keyword>unchecked</keyword>
<keyword>value</keyword>
<keyword>void</keyword>
<keyword>while</keyword>
<keyword>yield</keyword>
</context>
2007-05-06 07:51:26 -05:00
<context id="primitives" style-ref="data-type">
<keyword>bool</keyword>
<keyword>byte</keyword>
<keyword>char</keyword>
<keyword>decimal</keyword>
<keyword>double</keyword>
<keyword>float</keyword>
<keyword>int</keyword>
<keyword>long</keyword>
<keyword>object</keyword>
<keyword>operator</keyword>
<keyword>sbyte</keyword>
<keyword>short</keyword>
<keyword>string</keyword>
<keyword>uint</keyword>
<keyword>ulong</keyword>
<keyword>ushort</keyword>
</context>
2007-05-06 07:51:26 -05:00
<context id="c-sharp">
<include>
2007-05-06 07:51:26 -05:00
<context ref="def:string"/>
<context ref="def:single-quoted-string"/>
<context ref="line-comment"/>
2007-05-06 07:51:26 -05:00
<context ref="multiline-comment"/>
<context ref="close-comment-outside-comment"/>
<context ref="multiline-string"/>
<context ref="if-false-comment"/>
<context ref="preprocessor"/>
<context ref="keywords"/>
<context ref="primitives"/>
</include>
</context>
</definitions>
2006-08-26 04:46:29 -05:00
</language>