1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3
4 This file is part of GtkSourceView
5
6 Author: Paolo Maggi <paolo@gnome.org>
7 Copyright (C) 2005 Paolo Maggi <paolo@gnome.org>
8
9 GtkSourceView is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
13
14 GtkSourceView is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with this library; if not, see <http://www.gnu.org/licenses/>.
21
22-->
23<language id="idl" name="IDL" version="2.0" _section="Source">
24  <metadata>
25    <property name="mimetypes">text/x-idl</property>
26    <property name="globs">*.idl</property>
27    <property name="line-comment-start">//</property>
28  </metadata>
29
30  <styles>
31    <style id="comment" name="Comment" map-to="def:comment"/>
32    <style id="type" name="Data Type" map-to="def:type"/>
33    <style id="preprocessor" name="Preprocessor" map-to="def:preprocessor"/>
34    <style id="keyword" name="Keyword" map-to="def:keyword"/>
35    <style id="string" name="String" map-to="def:string"/>
36  </styles>
37
38  <definitions>
39    <context id="block-comment" style-ref="comment" class="comment" class-disabled="no-spell-check">
40      <start>/\*</start>
41      <end>\*/</end>
42      <include>
43        <context ref="def:escape"/>
44        <context ref="def:line-continue"/>
45      </include>
46    </context>
47    <context id="line-comment" style-ref="comment" end-at-line-end="true" class="comment" class-disabled="no-spell-check">
48      <start>//</start>
49      <include>
50        <context ref="def:escape"/>
51        <context ref="def:line-continue"/>
52      </include>
53    </context>
54    <context id="sectional" style-ref="preprocessor">
55      <start>%\{</start>
56      <end>%\}</end>
57      <include>
58        <context ref="def:escape"/>
59        <context ref="def:line-continue"/>
60      </include>
61    </context>
62    <context id="string" style-ref="string" end-at-line-end="true" class="string" class-disabled="no-spell-check">
63      <start>"</start>
64      <end>"</end>
65      <include>
66        <context ref="def:escape"/>
67        <context ref="def:line-continue"/>
68      </include>
69    </context>
70    <context id="include-pragma" style-ref="preprocessor" end-at-line-end="true">
71      <start>^#[ \t]*(include|pragma)</start>
72      <include>
73        <context ref="def:escape"/>
74        <context ref="def:line-continue"/>
75      </include>
76    </context>
77    <context id="keywords" style-ref="keyword">
78      <keyword>abstract</keyword>
79      <keyword>attribute</keyword>
80      <keyword>case</keyword>
81      <keyword>const</keyword>
82      <keyword>context</keyword>
83      <keyword>custom</keyword>
84      <keyword>default</keyword>
85      <keyword>exception</keyword>
86      <keyword>enum</keyword>
87      <keyword>factory</keyword>
88      <keyword>FALSE</keyword>
89      <keyword>in</keyword>
90      <keyword>inout</keyword>
91      <keyword>interface</keyword>
92      <keyword>local</keyword>
93      <keyword>module</keyword>
94      <keyword>native</keyword>
95      <keyword>oneway</keyword>
96      <keyword>out</keyword>
97      <keyword>private</keyword>
98      <keyword>public</keyword>
99      <keyword>raises</keyword>
100      <keyword>readonly</keyword>
101      <keyword>struct</keyword>
102      <keyword>support</keyword>
103      <keyword>switch</keyword>
104      <keyword>TRUE</keyword>
105      <keyword>truncatable</keyword>
106      <keyword>typedef</keyword>
107      <keyword>union</keyword>
108      <keyword>valuetype</keyword>
109    </context>
110    <context id="types" style-ref="type">
111      <keyword>any</keyword>
112      <keyword>boolean</keyword>
113      <keyword>char</keyword>
114      <keyword>double</keyword>
115      <keyword>fixed</keyword>
116      <keyword>float</keyword>
117      <keyword>long</keyword>
118      <keyword>Object</keyword>
119      <keyword>octet</keyword>
120      <keyword>sequence</keyword>
121      <keyword>short</keyword>
122      <keyword>string</keyword>
123      <keyword>unsigned</keyword>
124      <keyword>ValueBase</keyword>
125      <keyword>void</keyword>
126      <keyword>wchar</keyword>
127      <keyword>wstring</keyword>
128    </context>
129    <context id="preprocessor-definitions" style-ref="preprocessor">
130      <prefix>^[ \t]*#[ \t]*</prefix>
131      <keyword>if</keyword>
132      <keyword>ifdef</keyword>
133      <keyword>ifndef</keyword>
134      <keyword>else</keyword>
135      <keyword>elif</keyword>
136      <keyword>define</keyword>
137      <keyword>endif</keyword>
138      <keyword>undef</keyword>
139    </context>
140    <context id="idl" class="no-spell-check">
141      <include>
142        <context ref="block-comment"/>
143        <context ref="line-comment"/>
144        <context ref="sectional"/>
145        <context ref="string"/>
146        <context ref="include-pragma"/>
147        <context ref="keywords"/>
148        <context ref="types"/>
149        <context ref="preprocessor-definitions"/>
150      </include>
151    </context>
152  </definitions>
153</language>
154