2007-09-09 14:21:19 -05:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
This file is part of GtkSourceView
|
|
|
|
|
2007-09-09 14:21:19 -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>
|
|
|
|
Copyright (C) 2004 Alessio Frusciante <algol@firenze.linux.it>
|
|
|
|
Copyright (C) 2005 Brion Vibber <brion@pobox.com>
|
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
GtkSourceView is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
2007-09-09 14:21:19 -05:00
|
|
|
License as published by the Free Software Foundation; either
|
2011-01-05 22:45:36 -08:00
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
2007-09-09 14:21:19 -05:00
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
GtkSourceView is distributed in the hope that it will be useful,
|
2007-09-09 14:21:19 -05:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2011-01-05 22:45:36 -08:00
|
|
|
Lesser General Public License for more details.
|
2007-09-09 14:21:19 -05:00
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2007-09-09 14:21:19 -05:00
|
|
|
|
|
|
|
-->
|
2009-01-04 13:45:36 -06:00
|
|
|
<language id="vala" _name="Vala" version="2.0" _section="Sources">
|
2007-09-09 14:21:19 -05:00
|
|
|
<metadata>
|
|
|
|
<property name="mimetypes">text/x-vala</property>
|
|
|
|
<property name="globs">*.vala</property>
|
|
|
|
<property name="line-comment-start">//</property>
|
|
|
|
<property name="block-comment-start">/*</property>
|
|
|
|
<property name="block-comment-end">*/</property>
|
|
|
|
</metadata>
|
|
|
|
|
|
|
|
<styles>
|
|
|
|
<style id="comment" _name="Comment" map-to="def:comment"/>
|
|
|
|
<style id="error" _name="Error" map-to="def:error"/>
|
|
|
|
<style id="type" _name="Data Type" map-to="def:type"/>
|
|
|
|
<style id="string" _name="String" map-to="def:string"/>
|
|
|
|
<style id="keyword" _name="Keyword" map-to="def:keyword"/>
|
|
|
|
<style id="null-value" _name="Null Value" map-to="def:special-constant"/>
|
|
|
|
<style id="boolean" _name="Boolean value" map-to="def:boolean"/>
|
|
|
|
<style id="decimal" _name="Decimal number" map-to="def:decimal"/>
|
|
|
|
<style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
|
|
|
|
<style id="real" _name="Real number" map-to="def:floating-point"/>
|
|
|
|
</styles>
|
|
|
|
|
|
|
|
<definitions>
|
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
<context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
|
2007-09-09 14:21:19 -05:00
|
|
|
<start>//</start>
|
|
|
|
<include>
|
|
|
|
<context ref="def:in-line-comment"/>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
<context id="multiline-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
|
2007-09-09 14:21:19 -05:00
|
|
|
<start>/\*</start>
|
|
|
|
<end>\*/</end>
|
|
|
|
<include>
|
|
|
|
<context ref="def:in-comment"/>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="close-comment-outside-comment" style-ref="error">
|
|
|
|
<match>\*/(?!\*)</match>
|
|
|
|
</context>
|
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
<context id="multiline-string" style-ref="string" class="string" class-disabled="no-spell-check">
|
2007-09-09 14:21:19 -05:00
|
|
|
<start>@"([^"]|"")*</start>
|
|
|
|
<end>"</end>
|
|
|
|
<include>
|
|
|
|
<context ref="def:escape"/>
|
|
|
|
<context ref="def:line-continue"/>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="keywords" style-ref="keyword">
|
|
|
|
<keyword>class</keyword>
|
|
|
|
<keyword>delegate</keyword>
|
|
|
|
<keyword>enum</keyword>
|
2008-06-20 17:33:32 -05:00
|
|
|
<keyword>errordomain</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>interface</keyword>
|
|
|
|
<keyword>namespace</keyword>
|
|
|
|
<keyword>signal</keyword>
|
|
|
|
<keyword>struct</keyword>
|
|
|
|
<keyword>using</keyword>
|
|
|
|
<!-- modifiers -->
|
|
|
|
<keyword>abstract</keyword>
|
|
|
|
<keyword>const</keyword>
|
2008-06-20 17:33:32 -05:00
|
|
|
<keyword>dynamic</keyword>
|
|
|
|
<keyword>extern</keyword>
|
|
|
|
<keyword>inline</keyword>
|
2011-01-05 22:45:36 -08:00
|
|
|
<keyword>internal</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>out</keyword>
|
|
|
|
<keyword>override</keyword>
|
2009-01-04 13:45:36 -06:00
|
|
|
<keyword>owned</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>private</keyword>
|
|
|
|
<keyword>protected</keyword>
|
|
|
|
<keyword>public</keyword>
|
|
|
|
<keyword>ref</keyword>
|
|
|
|
<keyword>static</keyword>
|
2009-01-04 13:45:36 -06:00
|
|
|
<keyword>unowned</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>virtual</keyword>
|
2008-06-20 17:33:32 -05:00
|
|
|
<keyword>volatile</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>weak</keyword>
|
|
|
|
<!-- others -->
|
|
|
|
<keyword>as</keyword>
|
|
|
|
<keyword>base</keyword>
|
|
|
|
<keyword>break</keyword>
|
|
|
|
<keyword>case</keyword>
|
|
|
|
<keyword>catch</keyword>
|
|
|
|
<keyword>construct</keyword>
|
|
|
|
<keyword>continue</keyword>
|
|
|
|
<keyword>default</keyword>
|
2008-06-20 17:33:32 -05:00
|
|
|
<keyword>delete</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>do</keyword>
|
|
|
|
<keyword>else</keyword>
|
2008-06-20 17:33:32 -05:00
|
|
|
<keyword>ensures</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>finally</keyword>
|
|
|
|
<keyword>for</keyword>
|
|
|
|
<keyword>foreach</keyword>
|
|
|
|
<keyword>get</keyword>
|
|
|
|
<keyword>if</keyword>
|
|
|
|
<keyword>in</keyword>
|
|
|
|
<keyword>is</keyword>
|
2008-06-20 17:33:32 -05:00
|
|
|
<keyword>lock</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>new</keyword>
|
2008-06-20 17:33:32 -05:00
|
|
|
<keyword>requires</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>return</keyword>
|
|
|
|
<keyword>set</keyword>
|
|
|
|
<keyword>sizeof</keyword>
|
|
|
|
<keyword>switch</keyword>
|
|
|
|
<keyword>this</keyword>
|
|
|
|
<keyword>throw</keyword>
|
|
|
|
<keyword>throws</keyword>
|
|
|
|
<keyword>try</keyword>
|
|
|
|
<keyword>typeof</keyword>
|
|
|
|
<keyword>value</keyword>
|
|
|
|
<keyword>var</keyword>
|
|
|
|
<keyword>void</keyword>
|
|
|
|
<keyword>while</keyword>
|
2009-01-04 13:45:36 -06:00
|
|
|
<keyword>yield</keyword>
|
|
|
|
<keyword>yields</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="primitives" style-ref="type">
|
|
|
|
<keyword>bool</keyword>
|
|
|
|
<keyword>char</keyword>
|
|
|
|
<keyword>double</keyword>
|
|
|
|
<keyword>float</keyword>
|
|
|
|
<keyword>int</keyword>
|
2008-06-20 17:33:32 -05:00
|
|
|
<keyword>int8</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>int16</keyword>
|
|
|
|
<keyword>int32</keyword>
|
|
|
|
<keyword>int64</keyword>
|
|
|
|
<keyword>long</keyword>
|
|
|
|
<keyword>short</keyword>
|
2008-06-20 17:33:32 -05:00
|
|
|
<keyword>size_t</keyword>
|
|
|
|
<keyword>ssize_t</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>string</keyword>
|
|
|
|
<keyword>uchar</keyword>
|
|
|
|
<keyword>uint</keyword>
|
2008-06-20 17:33:32 -05:00
|
|
|
<keyword>uint8</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>uint16</keyword>
|
|
|
|
<keyword>uint32</keyword>
|
|
|
|
<keyword>uint64</keyword>
|
|
|
|
<keyword>ulong</keyword>
|
2008-06-20 17:33:32 -05:00
|
|
|
<keyword>unichar</keyword>
|
2007-09-09 14:21:19 -05:00
|
|
|
<keyword>ushort</keyword>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="null-value" style-ref="null-value">
|
|
|
|
<keyword>null</keyword>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="boolean" style-ref="boolean">
|
|
|
|
<keyword>false</keyword>
|
|
|
|
<keyword>true</keyword>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="decimal" style-ref="decimal">
|
|
|
|
<match extended="true">
|
|
|
|
(?<![\w\.])
|
|
|
|
[0-9]+[uUlL]*
|
|
|
|
(?![\w\.])
|
|
|
|
</match>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="hexadecimal" style-ref="hexadecimal">
|
|
|
|
<match extended="true">
|
|
|
|
(?<![\w\.])
|
|
|
|
0[xX][a-fA-F0-9]+[uUlL]*
|
|
|
|
(?![\w\.])
|
|
|
|
</match>
|
|
|
|
</context>
|
|
|
|
|
|
|
|
<context id="real" style-ref="real">
|
|
|
|
<match extended="true">
|
|
|
|
(?<![\w\.])
|
|
|
|
((\.[0-9]+|[0-9]+\.[0-9]*)([Ee][+-]?[0-9]*)?[FfDdMm]?|
|
|
|
|
([0-9]+[Ee][+-]?[0-9]*)[FfDdMm]? |
|
|
|
|
([0-9]+)[FfDdMm])
|
|
|
|
(?![\w\.])
|
|
|
|
</match>
|
|
|
|
</context>
|
|
|
|
|
2011-01-05 22:45:36 -08:00
|
|
|
<context id="vala" class="no-spell-check">
|
2007-09-09 14:21:19 -05:00
|
|
|
<include>
|
|
|
|
<context ref="def:string"/>
|
|
|
|
<context ref="def:single-quoted-string"/>
|
|
|
|
<context ref="line-comment"/>
|
|
|
|
<context ref="multiline-comment"/>
|
|
|
|
<context ref="close-comment-outside-comment"/>
|
|
|
|
<context ref="multiline-string"/>
|
|
|
|
<context ref="keywords"/>
|
|
|
|
<context ref="primitives"/>
|
|
|
|
<context ref="null-value"/>
|
|
|
|
<context ref="boolean"/>
|
|
|
|
<context ref="decimal"/>
|
|
|
|
<context ref="hexadecimal"/>
|
|
|
|
<context ref="real"/>
|
|
|
|
</include>
|
|
|
|
</context>
|
|
|
|
</definitions>
|
|
|
|
</language>
|