| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language |
| 3 |
[ |
| 4 |
]> |
| 5 |
<language name="Solidity" section="Sources" |
| 6 |
version="6" kateversion="5.0" |
| 7 |
indenter="cstyle" |
| 8 |
mimetype="" |
| 9 |
extensions="*.sol" |
| 10 |
priority="5" |
| 11 |
author="Robert Kaiser ([email protected])" |
| 12 |
license="MIT"> |
| 13 |
<!-- |
| 14 |
Solidity 0.5+ support, based on Solidity docs, see https://solidity.readthedocs.io/en/latest/index.html |
| 15 |
--> |
| 16 |
<highlighting> |
| 17 |
<!-- Types, see https://solidity.readthedocs.io/en/latest/types.html --> |
| 18 |
<list name="types"> |
| 19 |
<item>bool</item> |
| 20 |
<item>uint</item> |
| 21 |
<item>uint8</item> |
| 22 |
<item>uint16</item> |
| 23 |
<item>uint24</item> |
| 24 |
<item>uint32</item> |
| 25 |
<item>uint40</item> |
| 26 |
<item>uint48</item> |
| 27 |
<item>uint56</item> |
| 28 |
<item>uint64</item> |
| 29 |
<item>uint72</item> |
| 30 |
<item>uint80</item> |
| 31 |
<item>uint88</item> |
| 32 |
<item>uint96</item> |
| 33 |
<item>uint104</item> |
| 34 |
<item>uint112</item> |
| 35 |
<item>uint120</item> |
| 36 |
<item>uint128</item> |
| 37 |
<item>uint136</item> |
| 38 |
<item>uint144</item> |
| 39 |
<item>uint152</item> |
| 40 |
<item>uint160</item> |
| 41 |
<item>uint168</item> |
| 42 |
<item>uint176</item> |
| 43 |
<item>uint184</item> |
| 44 |
<item>uint192</item> |
| 45 |
<item>uint200</item> |
| 46 |
<item>uint208</item> |
| 47 |
<item>uint216</item> |
| 48 |
<item>uint224</item> |
| 49 |
<item>uint232</item> |
| 50 |
<item>uint240</item> |
| 51 |
<item>uint248</item> |
| 52 |
<item>uint256</item> |
| 53 |
<item>int</item> |
| 54 |
<item>int8</item> |
| 55 |
<item>int16</item> |
| 56 |
<item>int24</item> |
| 57 |
<item>int32</item> |
| 58 |
<item>int40</item> |
| 59 |
<item>int48</item> |
| 60 |
<item>int56</item> |
| 61 |
<item>int64</item> |
| 62 |
<item>int72</item> |
| 63 |
<item>int80</item> |
| 64 |
<item>int88</item> |
| 65 |
<item>int96</item> |
| 66 |
<item>int104</item> |
| 67 |
<item>int112</item> |
| 68 |
<item>int120</item> |
| 69 |
<item>int128</item> |
| 70 |
<item>int136</item> |
| 71 |
<item>int144</item> |
| 72 |
<item>int152</item> |
| 73 |
<item>int160</item> |
| 74 |
<item>int168</item> |
| 75 |
<item>int176</item> |
| 76 |
<item>int184</item> |
| 77 |
<item>int192</item> |
| 78 |
<item>int200</item> |
| 79 |
<item>int208</item> |
| 80 |
<item>int216</item> |
| 81 |
<item>int224</item> |
| 82 |
<item>int232</item> |
| 83 |
<item>int240</item> |
| 84 |
<item>int248</item> |
| 85 |
<item>int256</item> |
| 86 |
<!-- the detailed fixed types are not listed for now, as the whole family is not fully supported --> |
| 87 |
<item>ufixed</item> |
| 88 |
<item>fixed</item> |
| 89 |
<item>address</item> |
| 90 |
<item>byte</item> |
| 91 |
<item>bytes</item> |
| 92 |
<item>bytes1</item> |
| 93 |
<item>bytes2</item> |
| 94 |
<item>bytes3</item> |
| 95 |
<item>bytes4</item> |
| 96 |
<item>bytes5</item> |
| 97 |
<item>bytes6</item> |
| 98 |
<item>bytes7</item> |
| 99 |
<item>bytes8</item> |
| 100 |
<item>bytes9</item> |
| 101 |
<item>bytes10</item> |
| 102 |
<item>bytes11</item> |
| 103 |
<item>bytes12</item> |
| 104 |
<item>bytes13</item> |
| 105 |
<item>bytes14</item> |
| 106 |
<item>bytes15</item> |
| 107 |
<item>bytes16</item> |
| 108 |
<item>bytes17</item> |
| 109 |
<item>bytes18</item> |
| 110 |
<item>bytes19</item> |
| 111 |
<item>bytes20</item> |
| 112 |
<item>bytes21</item> |
| 113 |
<item>bytes22</item> |
| 114 |
<item>bytes23</item> |
| 115 |
<item>bytes24</item> |
| 116 |
<item>bytes25</item> |
| 117 |
<item>bytes26</item> |
| 118 |
<item>bytes27</item> |
| 119 |
<item>bytes28</item> |
| 120 |
<item>bytes29</item> |
| 121 |
<item>bytes30</item> |
| 122 |
<item>bytes31</item> |
| 123 |
<item>bytes32</item> |
| 124 |
<item>string</item> |
| 125 |
<item>mapping</item> |
| 126 |
</list> |
| 127 |
|
| 128 |
<!-- Units and global variables, see https://solidity.readthedocs.io/en/latest/units-and-global-variables.html --> |
| 129 |
<list name="units"> |
| 130 |
<item>wei</item> |
| 131 |
<item>finney</item> |
| 132 |
<item>szabo</item> |
| 133 |
<item>ether</item> |
| 134 |
<item>seconds</item> |
| 135 |
<item>minutes</item> |
| 136 |
<item>hours</item> |
| 137 |
<item>days</item> |
| 138 |
<item>weeks</item> |
| 139 |
</list> |
| 140 |
<list name="globals"> |
| 141 |
<item>block</item> |
| 142 |
<item>msg</item> |
| 143 |
<item>now</item> |
| 144 |
<item>tx</item> |
| 145 |
<item>this</item> |
| 146 |
<item>super</item> |
| 147 |
<!-- global functions, do they belong elswhere? --> |
| 148 |
<item>blockhash</item> |
| 149 |
<item>gasleft</item> |
| 150 |
<item>abi</item> |
| 151 |
<item>assert</item> |
| 152 |
<item>require</item> |
| 153 |
<item>revert</item> |
| 154 |
<item>addmod</item> |
| 155 |
<item>mulmod</item> |
| 156 |
<item>keccak256</item> |
| 157 |
<item>sha256</item> |
| 158 |
<item>ripemd160</item> |
| 159 |
<item>ecrecover</item> |
| 160 |
<item>selfdestruct</item> |
| 161 |
<item>type</item> |
| 162 |
<!-- Low-level log functions, see https://solidity.readthedocs.io/en/latest/contracts.html#low-level-interface-to-logs --> |
| 163 |
<item>log0</item> |
| 164 |
<item>log1</item> |
| 165 |
<item>log2</item> |
| 166 |
<item>log3</item> |
| 167 |
<item>log4</item> |
| 168 |
</list> |
| 169 |
|
| 170 |
<!-- Keywords, see https://solidity.readthedocs.io/en/latest/miscellaneous.html#cheatsheet --> |
| 171 |
<!-- Some keywords that are about program flow were moved to control structures. --> |
| 172 |
<list name="keywords"> |
| 173 |
<item>as</item> |
| 174 |
<item>from</item> |
| 175 |
<item>is</item> |
| 176 |
<item>using</item> |
| 177 |
<!-- Type-related, see https://solidity.readthedocs.io/en/latest/types.html --> |
| 178 |
<item>enum</item> |
| 179 |
<item>true</item> |
| 180 |
<item>false</item> |
| 181 |
<item>new</item> |
| 182 |
<item>struct</item> |
| 183 |
<item>constant</item> |
| 184 |
<!-- Function-related, see https://solidity.readthedocs.io/en/latest/types.html#function-types --> |
| 185 |
<item>internal</item> |
| 186 |
<item>external</item> |
| 187 |
<item>public</item> |
| 188 |
<item>private</item> |
| 189 |
<item>pure</item> |
| 190 |
<item>view</item> |
| 191 |
<item>payable</item> |
| 192 |
<item>returns</item> |
| 193 |
<!-- Data location, see https://solidity.readthedocs.io/en/latest/types.html#data-location --> |
| 194 |
<item>memory</item> |
| 195 |
<item>storage</item> |
| 196 |
<item>calldata</item> |
| 197 |
<!-- Operator? Variable-related, see https://solidity.readthedocs.io/en/latest/types.html --> |
| 198 |
<item>delete</item> |
| 199 |
<!-- Events, see https://solidity.readthedocs.io/en/latest/contracts.html#events --> |
| 200 |
<item>event</item> |
| 201 |
<item>indexed</item> |
| 202 |
</list> |
| 203 |
|
| 204 |
<!-- Control structures and expressions, see https://solidity.readthedocs.io/en/latest/control-structures.html --> |
| 205 |
<list name="controlstructures"> |
| 206 |
<item>if</item> |
| 207 |
<item>else</item> |
| 208 |
<item>while</item> |
| 209 |
<item>do</item> |
| 210 |
<item>for</item> |
| 211 |
<item>break</item> |
| 212 |
<item>continue</item> |
| 213 |
<item>return</item> |
| 214 |
<!-- moved from keywords --> |
| 215 |
<item>import</item> |
| 216 |
<item>contract</item> |
| 217 |
<item>library</item> |
| 218 |
<item>assembly</item> |
| 219 |
<item>function</item> |
| 220 |
<item>constructor</item> |
| 221 |
<item>modifier</item> |
| 222 |
<item>emit</item> |
| 223 |
</list> |
| 224 |
|
| 225 |
<!-- Reserved keywords, see https://solidity.readthedocs.io/en/latest/miscellaneous.html#reserved-keywords --> |
| 226 |
<list name="reserved"> |
| 227 |
<item>abstract</item> |
| 228 |
<item>after</item> |
| 229 |
<item>alias</item> |
| 230 |
<item>apply</item> |
| 231 |
<item>auto</item> |
| 232 |
<item>case</item> |
| 233 |
<item>catch</item> |
| 234 |
<item>copyof</item> |
| 235 |
<item>default</item> |
| 236 |
<item>define</item> |
| 237 |
<item>final</item> |
| 238 |
<item>immutable</item> |
| 239 |
<item>implements</item> |
| 240 |
<item>in</item> |
| 241 |
<item>inline</item> |
| 242 |
<item>let</item> |
| 243 |
<item>macro</item> |
| 244 |
<item>match</item> |
| 245 |
<item>mutable</item> |
| 246 |
<item>null</item> |
| 247 |
<item>of</item> |
| 248 |
<item>override</item> |
| 249 |
<item>partial</item> |
| 250 |
<item>promise</item> |
| 251 |
<item>reference</item> |
| 252 |
<item>relocatable</item> |
| 253 |
<item>sealed</item> |
| 254 |
<item>sizeof</item> |
| 255 |
<item>static</item> |
| 256 |
<item>supports</item> |
| 257 |
<item>switch</item> |
| 258 |
<item>try</item> |
| 259 |
<item>typedef</item> |
| 260 |
<item>typeof</item> |
| 261 |
<item>unchecked</item> |
| 262 |
</list> |
| 263 |
|
| 264 |
<contexts> |
| 265 |
<context name="Normal" attribute="Normal Text" lineEndContext="#stay"> |
| 266 |
<DetectSpaces /> |
| 267 |
<StringDetect attribute="Keyword" String="pragma" context="Pragma" firstNonSpace="true" insensitive="true" /> |
| 268 |
<keyword attribute="Control Structures" context="#stay" String="controlstructures" /> |
| 269 |
<keyword attribute="Keyword" context="#stay" String="keywords" /> |
| 270 |
<keyword attribute="Data Type" context="#stay" String="types" /> |
| 271 |
<keyword attribute="Unit" context="#stay" String="units" /> |
| 272 |
<keyword attribute="Built-in" context="#stay" String="globals" /> |
| 273 |
<keyword attribute="Error" context="#stay" String="reserved" /> |
| 274 |
<DetectIdentifier /> |
| 275 |
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" /> |
| 276 |
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" /> |
| 277 |
|
| 278 |
<HlCHex attribute="Hex" context="#stay" /> |
| 279 |
<Float attribute="Decimal" context="#stay" /> |
| 280 |
<Int attribute="Decimal" context="#stay" /> |
| 281 |
|
| 282 |
<HlCChar attribute="Char" context="#stay"/> |
| 283 |
<DetectChar attribute="String" context="String" char=""" /> |
| 284 |
|
| 285 |
<Detect2Chars attribute="Built-in" context="#stay" char="+" char1="+" /> |
| 286 |
<Detect2Chars attribute="Built-in" context="#stay" char="-" char1="-" /> |
| 287 |
|
| 288 |
<Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="/" lookAhead="true"/> |
| 289 |
<Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" /> |
| 290 |
<AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]|~^;" /> |
| 291 |
</context> |
| 292 |
|
| 293 |
<context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop"> |
| 294 |
<IncludeRules context="##Doxygen" /> |
| 295 |
<Detect2Chars attribute="Comment" context="#pop!Comment Single" char="/" char1="/" /> |
| 296 |
<Detect2Chars attribute="Comment" context="#pop!Comment Multi" char="/" char1="*" beginRegion="Comment" /> |
| 297 |
</context> |
| 298 |
|
| 299 |
<context name="Pragma" attribute="Normal Text" lineEndContext="#pop"> |
| 300 |
<WordDetect attribute="Built-in" String="solidity" context="Pragma Solidity" insensitive="true" /> |
| 301 |
<WordDetect attribute="Built-in" String="experimental" context="Pragma Experimental" insensitive="true" /> |
| 302 |
<RegExpr attribute="Error" context="#pop" String="[^\s;]+" /> |
| 303 |
</context> |
| 304 |
|
| 305 |
<context name="Pragma Solidity" attribute="Normal Text" lineEndContext="#pop"> |
| 306 |
<RegExpr attribute="Normal Text" context="#pop" String="[\^\. \-<>=\|\d\w]+" /> |
| 307 |
<RegExpr attribute="Error" context="#pop" String="[^\s;]+" /> |
| 308 |
</context> |
| 309 |
|
| 310 |
<context name="Pragma Experimental" attribute="Normal Text" lineEndContext="#pop"> |
| 311 |
<WordDetect attribute="Built-in" context="#pop" String="ABIEncoderV2" /> |
| 312 |
<WordDetect attribute="Built-in" context="#pop" String="SMTChecker" /> |
| 313 |
<RegExpr attribute="Error" context="#pop" String="[^\s;]+" /> |
| 314 |
</context> |
| 315 |
|
| 316 |
<context name="String" attribute="String" lineEndContext="#pop"> |
| 317 |
<LineContinue attribute="String" context="#stay" /> |
| 318 |
<HlCStringChar attribute="String Char" context="#stay" /> |
| 319 |
<DetectChar attribute="String" context="#pop" char="""/> |
| 320 |
</context> |
| 321 |
|
| 322 |
<context name="Comment Single" attribute="Comment" lineEndContext="#pop"> |
| 323 |
<LineContinue attribute="Comment" context="#stay" /> |
| 324 |
<DetectSpaces /> |
| 325 |
<IncludeRules context="##Comments" /> |
| 326 |
<DetectIdentifier /> |
| 327 |
</context> |
| 328 |
|
| 329 |
<context name="Comment Multi" attribute="Comment" lineEndContext="#stay"> |
| 330 |
<DetectSpaces /> |
| 331 |
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment" /> |
| 332 |
<IncludeRules context="##Comments" /> |
| 333 |
<DetectIdentifier /> |
| 334 |
</context> |
| 335 |
</contexts> |
| 336 |
|
| 337 |
<itemDatas> |
| 338 |
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" /> |
| 339 |
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" /> |
| 340 |
<!-- itemData name="Function" defStyleNum="dsFunction" spellChecking="false" / --> |
| 341 |
<itemData name="Control Structures" defStyleNum="dsControlFlow" spellChecking="false" /> |
| 342 |
<!-- itemData name="Operator" defStyleNum="dsOperator" spellChecking="false" / --> |
| 343 |
<itemData name="Symbol" defStyleNum="dsOperator" spellChecking="false" /> |
| 344 |
<itemData name="Built-in" defStyleNum="dsBuiltIn" spellChecking="false" /> |
| 345 |
<itemData name="Unit" defStyleNum="dsConstant" bold="0" spellChecking="false" /> |
| 346 |
<itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false" /> |
| 347 |
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false" /> |
| 348 |
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false" /> |
| 349 |
<itemData name="String" defStyleNum="dsString" /> |
| 350 |
<itemData name="Char" defStyleNum="dsChar" /> |
| 351 |
<itemData name="String Char" defStyleNum="dsSpecialChar" /> |
| 352 |
<itemData name="Comment" defStyleNum="dsComment" /> |
| 353 |
<itemData name="Error" defStyleNum="dsError" spellChecking="false" /> |
| 354 |
</itemDatas> |
| 355 |
</highlighting> |
| 356 |
|
| 357 |
<general> |
| 358 |
<comments> |
| 359 |
<comment name="singleLine" start="//" /> |
| 360 |
<comment name="multiLine" start="/*" end="*/" region="Comment" /> |
| 361 |
</comments> |
| 362 |
<keywords casesensitive="1" /> |
| 363 |
</general> |
| 364 |
|
| 365 |
</language> |
| 366 |
<!-- kate: replace-tabs on; indent-width 2; tab-width 2; --> |