| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language> |
| 3 |
<!-- Based on Python syntax highlighting v1.99 by Primoz Anzur, Paul Giannaros, Michael Bueker, Per Wigren --> |
| 4 |
<!-- Also based on boo.lang from gtksourceview --> |
| 5 |
<language name="Boo" version="10" kateversion="5.0" section="Sources" extensions="*.boo" mimetype="text/x-boo" casesensitive="1" author="Marc Dassonneville" license="LGPL"> |
| 6 |
<highlighting> |
| 7 |
<list name="namespace"> |
| 8 |
<item>import</item> |
| 9 |
<item>from</item> |
| 10 |
<item>as</item> |
| 11 |
<item>namespace</item> |
| 12 |
</list> |
| 13 |
|
| 14 |
<list name="operators"> |
| 15 |
<item>and</item> |
| 16 |
<item>assert</item> |
| 17 |
<item>in</item> |
| 18 |
<item>is</item> |
| 19 |
<item>not</item> |
| 20 |
<item>or</item> |
| 21 |
</list> |
| 22 |
|
| 23 |
<list name="primitive"> |
| 24 |
<item>bool</item> |
| 25 |
<item>byte</item> |
| 26 |
<item>sbyte</item> |
| 27 |
<item>double</item> |
| 28 |
<item>decimal</item> |
| 29 |
<item>single</item> |
| 30 |
<item>short</item> |
| 31 |
<item>ushort</item> |
| 32 |
<item>int</item> |
| 33 |
<item>char</item> |
| 34 |
<item>uint</item> |
| 35 |
<item>long</item> |
| 36 |
<item>ulong</item> |
| 37 |
<item>object</item> |
| 38 |
<item>duck</item> |
| 39 |
<item>string</item> |
| 40 |
<item>regex</item> |
| 41 |
<item>date</item> |
| 42 |
<item>timespan</item> |
| 43 |
</list> |
| 44 |
|
| 45 |
<list name="definition"> |
| 46 |
<item>abstract</item> |
| 47 |
<item>virtual</item> |
| 48 |
<item>override</item> |
| 49 |
<item>static</item> |
| 50 |
<item>final</item> |
| 51 |
<item>transient</item> |
| 52 |
<item>macro</item> |
| 53 |
|
| 54 |
<item>protected</item> |
| 55 |
<item>private</item> |
| 56 |
<item>public</item> |
| 57 |
<item>internal</item> |
| 58 |
<item>partial</item> |
| 59 |
|
| 60 |
<item>class</item> |
| 61 |
<item>struct</item> |
| 62 |
<item>interface</item> |
| 63 |
<item>enum</item> |
| 64 |
<item>callable</item> |
| 65 |
<item>of</item> |
| 66 |
|
| 67 |
<item>def</item> |
| 68 |
<item>constructor</item> |
| 69 |
<item>destructor</item> |
| 70 |
|
| 71 |
<item>do</item> |
| 72 |
<item>get</item> |
| 73 |
<item>set</item> |
| 74 |
<item>event</item> |
| 75 |
|
| 76 |
<item>return</item> |
| 77 |
<item>yield</item> |
| 78 |
</list> |
| 79 |
|
| 80 |
<list name="boolean"> |
| 81 |
<item>true</item> |
| 82 |
<item>false</item> |
| 83 |
</list> |
| 84 |
|
| 85 |
<list name="literals"> |
| 86 |
<item>null</item> |
| 87 |
<item>self</item> |
| 88 |
<item>super</item> |
| 89 |
</list> |
| 90 |
|
| 91 |
<list name="keywords"> |
| 92 |
<item>and</item> |
| 93 |
<item>break</item> |
| 94 |
<item>cast</item> |
| 95 |
<item>continue</item> |
| 96 |
<item>elif</item> |
| 97 |
<item>else</item> |
| 98 |
<item>except</item> |
| 99 |
<item>ensure</item> |
| 100 |
<item>for</item> |
| 101 |
<item>given</item> |
| 102 |
<item>goto</item> |
| 103 |
<item>if</item> |
| 104 |
<item>in</item> |
| 105 |
<item>is</item> |
| 106 |
<item>isa</item> |
| 107 |
<item>not</item> |
| 108 |
<item>or</item> |
| 109 |
<item>otherwise</item> |
| 110 |
<item>pass</item> |
| 111 |
<item>raise</item> |
| 112 |
<item>try</item> |
| 113 |
<item>unless</item> |
| 114 |
<item>when</item> |
| 115 |
<item>while</item> |
| 116 |
<item>ref</item> |
| 117 |
</list> |
| 118 |
|
| 119 |
<list name="builtins"> |
| 120 |
<item>assert</item> |
| 121 |
<item>__eval__</item> |
| 122 |
<item>__switch__</item> |
| 123 |
<item>enumerate</item> |
| 124 |
<item>filter</item> |
| 125 |
<item>len</item> |
| 126 |
<item>typeof</item> |
| 127 |
<item>map</item> |
| 128 |
<item>max</item> |
| 129 |
<item>min</item> |
| 130 |
<item>property</item> |
| 131 |
<item>using</item> |
| 132 |
<item>getter</item> |
| 133 |
<item>required</item> |
| 134 |
<item>lock</item> |
| 135 |
<item>range</item> |
| 136 |
<item>zip</item> |
| 137 |
<item>checked</item> |
| 138 |
<item>unchecked</item> |
| 139 |
<item>rawArrayIndexing</item> |
| 140 |
<item>normalArrayIndexing</item> |
| 141 |
<item>print</item> |
| 142 |
<item>array</item> |
| 143 |
<item>matrix</item> |
| 144 |
<item>yieldAll</item> |
| 145 |
</list> |
| 146 |
|
| 147 |
<contexts> |
| 148 |
<context name="Normal" attribute="Normal Text" lineEndContext="#stay"> |
| 149 |
<keyword attribute="Preprocessor" String="namespace" context="#stay"/> |
| 150 |
<keyword attribute="Definition Keyword" String="definition" context="#stay"/> |
| 151 |
<keyword attribute="Operator" String="operators" context="#stay"/> |
| 152 |
<keyword attribute="Flow Control Keyword" String="keywords" context="#stay"/> |
| 153 |
<keyword attribute="Builtin Function" String="builtins" context="#stay"/> |
| 154 |
<keyword attribute="Special Variable" String="literals" context="#stay"/> |
| 155 |
<keyword attribute="Special Variable" String="boolean" context="#stay"/> |
| 156 |
<keyword attribute="Data Type" String="primitive" context="#stay" /> |
| 157 |
<RegExpr attribute="Normal Text" String="[a-zA-Z_][a-zA-Z_0-9]+" context="#stay"/> |
| 158 |
|
| 159 |
<RegExpr attribute="Complex" String=" ((?:[0-9]*\.[0-9]+|[0-9]+\.|(?:[0-9]+|[0-9]*\.[0-9]+|[0-9]+\.)[eE][+-]?[0-9]+)|[0-9]+)[jJ]" context="#stay"/> |
| 160 |
<RegExpr attribute="Float" String="(?:[0-9]+\.[0-9]*|\.[0-9]+)(?:[eE][0-9]+)?" context="#stay"/> |
| 161 |
<RegExpr attribute="Int" String="(?:[1-9][0-9]*(?:[eE][0-9]+)?|0)" context="#stay"/> |
| 162 |
<RegExpr attribute="Long" String="[1-9][0-9]*(?:[eE][0-9.]+)?[Ll]" context="#stay"/> |
| 163 |
<RegExpr attribute="Hex" String="0[Xx][0-9a-fA-F]+" context="#stay"/> |
| 164 |
<RegExpr attribute="Octal" String="0[1-9][0-9]*" context="#stay"/> |
| 165 |
|
| 166 |
<StringDetect attribute="Raw String" String="r'''" context="Raw Tripple A-string" insensitive="1"/> |
| 167 |
<StringDetect attribute="Raw String" String="r"""" context="Raw Tripple Q-string" insensitive="1"/> |
| 168 |
|
| 169 |
<Detect2Chars attribute="Raw String" char="r" char1="'" context="Raw A-string"/> |
| 170 |
<Detect2Chars attribute="Raw String" char="R" char1="'" context="Raw A-string"/> |
| 171 |
<Detect2Chars attribute="Raw String" char="r" char1=""" context="Raw Q-string"/> |
| 172 |
<Detect2Chars attribute="Raw String" char="R" char1=""" context="Raw Q-string"/> |
| 173 |
|
| 174 |
<DetectChar attribute="Comment" char="#" context="Comment"/> |
| 175 |
<RegExpr attribute="Comment" String="^\s*u?'''" context="Tripple A-comment" beginRegion="Tripple A-region" column="0"/> |
| 176 |
<RegExpr attribute="Comment" String="^\s*u?"""" context="Tripple Q-comment" beginRegion="Tripple Q-region" column="0"/> |
| 177 |
<Detect2Chars attribute="Comment" char="/" char1="/" context="Comment SlashSlash"/> |
| 178 |
|
| 179 |
<StringDetect attribute="String" String="'''" context="Tripple A-string" beginRegion="Tripple A-region"/> |
| 180 |
<StringDetect attribute="String" String=""""" context="Tripple Q-string" beginRegion="Tripple Q-region"/> |
| 181 |
<DetectChar attribute="String" char="'" context="Single A-string"/> |
| 182 |
<DetectChar attribute="String" char=""" context="Single Q-string"/> |
| 183 |
|
| 184 |
<DetectChar attribute="Operator" char="(" context="parenthesised" beginRegion="parenthesis"/> |
| 185 |
<DetectChar attribute="Operator" char=")" context="#pop" endRegion="parenthesis"/> |
| 186 |
|
| 187 |
<Detect2Chars attribute="Operator" char="[" char1="|" context="Quasi-Quotation" beginRegion="qq"/> |
| 188 |
<Detect2Chars attribute="Operator" char="|" char1="]" context="#pop" endRegion="qq"/> |
| 189 |
|
| 190 |
<AnyChar attribute="Operator" String="+*/%|=;!<>!^&~-" context="#stay"/> |
| 191 |
</context> |
| 192 |
|
| 193 |
<context name="parenthesised" attribute="Normal Text" lineEndContext="#stay" noIndentationBasedFolding="true"> |
| 194 |
<IncludeRules context="Normal" /> |
| 195 |
</context> |
| 196 |
|
| 197 |
<context name="Quasi-Quotation" attribute="Operator" lineEndContext="#stay" noIndentationBasedFolding="true"> |
| 198 |
<IncludeRules context="Normal" /> |
| 199 |
</context> |
| 200 |
|
| 201 |
<context name="Tripple A-comment" attribute="Comment" lineEndContext="#stay" noIndentationBasedFolding="true"> |
| 202 |
<StringDetect attribute="Comment" String="'''" context="#pop" endRegion="Tripple A-region"/> |
| 203 |
<IncludeRules context="##Comments"/> |
| 204 |
</context> |
| 205 |
|
| 206 |
<context name="Tripple Q-comment" attribute="Comment" lineEndContext="#stay" noIndentationBasedFolding="true"> |
| 207 |
<HlCChar attribute="Comment" context="#stay"/> |
| 208 |
<StringDetect attribute="Comment" String=""""" context="#pop" endRegion="Tripple Q-region"/> |
| 209 |
<IncludeRules context="##Comments"/> |
| 210 |
</context> |
| 211 |
|
| 212 |
<context name="Tripple A-string" attribute="String" lineEndContext="#stay" noIndentationBasedFolding="true"> |
| 213 |
<HlCStringChar attribute="String Char" context="#stay"/> |
| 214 |
<RegExpr attribute="String Substitution" String="%(\([a-zA-Z0-9_]+\))?[a-zA-Z]" context="#stay"/> |
| 215 |
<StringDetect attribute="String" String="'''" context="#pop" endRegion="Tripple A-region"/> |
| 216 |
</context> |
| 217 |
|
| 218 |
<context name="Raw Tripple A-string" attribute="Raw String" lineEndContext="#stay" noIndentationBasedFolding="true"> |
| 219 |
<HlCStringChar attribute="Raw String" context="#stay"/> |
| 220 |
<RegExpr attribute="String Substitution" String="%(\([a-zA-Z0-9_]+\))?[a-zA-Z]" context="#stay"/> |
| 221 |
<StringDetect attribute="String" String="'''" context="#pop" endRegion="Tripple A-region"/> |
| 222 |
</context> |
| 223 |
|
| 224 |
<context name="Tripple Q-string" attribute="String" lineEndContext="#stay" noIndentationBasedFolding="true"> |
| 225 |
<HlCStringChar attribute="String Char" context="#stay"/> |
| 226 |
<RegExpr attribute="String Substitution" String="%(\([a-zA-Z0-9_]+\))?[a-zA-Z]" context="#stay"/> |
| 227 |
<StringDetect attribute="String" String=""""" context="#pop" endRegion="Tripple Q-region"/> |
| 228 |
</context> |
| 229 |
|
| 230 |
<context name="Raw Tripple Q-string" attribute="Raw String" lineEndContext="#stay" noIndentationBasedFolding="true"> |
| 231 |
<HlCStringChar attribute="Raw String" context="#stay"/> |
| 232 |
<RegExpr attribute="String Substitution" String="%(\([a-zA-Z0-9_]+\))?[a-zA-Z]" context="#stay"/> |
| 233 |
<StringDetect attribute="String" String=""""" context="#pop" endRegion="Tripple Q-region"/> |
| 234 |
</context> |
| 235 |
|
| 236 |
<context name="Comment SlashSlash" attribute="Comment" lineEndContext="#pop" > |
| 237 |
<LineContinue attribute="Comment" context="#stay"/> |
| 238 |
<IncludeRules context="##Comments"/> |
| 239 |
</context> |
| 240 |
|
| 241 |
<context name="Single A-string" attribute="String" lineEndContext="#stay"> |
| 242 |
<HlCStringChar attribute="String Char" context="#stay"/> |
| 243 |
<RegExpr attribute="String Substitution" String="%(\([a-zA-Z0-9_]+\))?[a-zA-Z]" context="#stay"/> |
| 244 |
<DetectChar attribute="String" char="'" context="#pop"/> |
| 245 |
</context> |
| 246 |
|
| 247 |
<context name="Single Q-string" attribute="String" lineEndContext="#stay"> |
| 248 |
<HlCStringChar attribute="String Char" context="#stay"/> |
| 249 |
<RegExpr attribute="String Substitution" String="%(\([a-zA-Z0-9_]+\))?[a-zA-Z]" context="#stay"/> |
| 250 |
<DetectChar attribute="String" char=""" context="#pop"/> |
| 251 |
</context> |
| 252 |
|
| 253 |
<context name="Raw A-string" attribute="Raw String" lineEndContext="#stay"> |
| 254 |
<HlCStringChar attribute="Raw String" context="#stay"/> |
| 255 |
<RegExpr attribute="String Substitution" String="%(\([a-zA-Z0-9_]+\))?[a-zA-Z]" context="#stay"/> |
| 256 |
<DetectChar attribute="Raw String" char="'" context="#pop"/> |
| 257 |
</context> |
| 258 |
|
| 259 |
<context name="Raw Q-string" attribute="Raw String" lineEndContext="#stay"> |
| 260 |
<HlCStringChar attribute="Raw String" context="#stay"/> |
| 261 |
<RegExpr attribute="String Substitution" String="%(\([a-zA-Z0-9_]+\))?[a-zA-Z]" context="#stay"/> |
| 262 |
<DetectChar attribute="Raw String" char=""" context="#pop"/> |
| 263 |
</context> |
| 264 |
|
| 265 |
<context name="Comment" attribute="Comment" lineEndContext="#pop"> |
| 266 |
<IncludeRules context="##Comments"/> |
| 267 |
</context> |
| 268 |
</contexts> |
| 269 |
|
| 270 |
|
| 271 |
<itemDatas> |
| 272 |
<itemData name="Normal Text" defStyleNum="dsNormal"/> |
| 273 |
<itemData name="Definition Keyword" defStyleNum="dsKeyword"/> |
| 274 |
<itemData name="Data Type" defStyleNum="dsDataType"/> |
| 275 |
<itemData name="Operator" defStyleNum="dsOperator" /> |
| 276 |
<itemData name="String Substitution" defStyleNum="dsNormal"/> |
| 277 |
<itemData name="Flow Control Keyword" defStyleNum="dsControlFlow"/> |
| 278 |
<itemData name="Builtin Function" defStyleNum="dsDataType"/> |
| 279 |
<itemData name="Special Variable" defStyleNum="dsOthers"/> |
| 280 |
<itemData name="Preprocessor" defStyleNum="dsChar"/> |
| 281 |
<itemData name="String Char" defStyleNum="dsSpecialChar"/> |
| 282 |
<itemData name="Long" defStyleNum="dsOthers"/> |
| 283 |
<itemData name="Float" defStyleNum="dsFloat"/> |
| 284 |
<itemData name="Int" defStyleNum="dsDecVal"/> |
| 285 |
<itemData name="Hex" defStyleNum="dsOthers"/> |
| 286 |
<itemData name="Octal" defStyleNum="dsOthers"/> |
| 287 |
<itemData name="Complex" defStyleNum="dsOthers"/> |
| 288 |
<itemData name="Comment" defStyleNum="dsComment"/> |
| 289 |
<itemData name="String" defStyleNum="dsString"/> |
| 290 |
<itemData name="Raw String" defStyleNum="dsVerbatimString"/> |
| 291 |
</itemDatas> |
| 292 |
</highlighting> |
| 293 |
<general> |
| 294 |
<folding indentationsensitive="1" /> |
| 295 |
<emptyLines> |
| 296 |
<emptyLine regexpr="\s+"/> |
| 297 |
<emptyLine regexpr="\s*#.*$"/> |
| 298 |
</emptyLines> |
| 299 |
<comments> |
| 300 |
<comment name="singleLine" start="#" position="afterwhitespace"/> |
| 301 |
</comments> |
| 302 |
<keywords casesensitive="1" /> |
| 303 |
</general> |
| 304 |
</language> |
| 305 |
<!-- kate: replace-tabs off; --> |