Rust.hgl 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <UniHighlighter version="1.8">
  2. <Info>
  3. <General Name="Rust" Extensions="RS" Other="0"/>
  4. <Author Name="Skif_off" Email="" Web="" Copyright="" Company="N/A" Remark="Rules for 'Chars', 'Remarks' and 'Strings' from 'C++ Source.hgl'"/>
  5. <Version Version="1" Revision="3" Date="45338,8533801736"/>
  6. <History>
  7. </History>
  8. <Sample>
  9. <S>#![crate_type = &quot;lib&quot;]</S>
  10. <S></S>
  11. <S>let mut num = 5;</S>
  12. <S></S>
  13. <S>let r1 = &amp;num as *const i32;</S>
  14. <S>let r2 = &amp;mut num as *mut i32;</S>
  15. <S></S>
  16. <S>unsafe {</S>
  17. <S> println!(&quot;r1 is: {}&quot;, *r1);</S>
  18. <S> println!(&quot;r2 is: {}&quot;, *r2);</S>
  19. <S>}</S>
  20. <S></S>
  21. <S>// A function marked as a unit test</S>
  22. <S>#[test]</S>
  23. <S>fn test_foo() {</S>
  24. <S> /* ... */</S>
  25. <S>}</S>
  26. <S></S>
  27. </Sample>
  28. </Info>
  29. <Scheme File="" Name=""/>
  30. <Range Name="Root" Attributes="$80000008,$80000005;False:False." Style="" CaseSensitive="True"
  31. Delimiters="!&quot;%&amp;'()*+,-./:;&lt;=&gt;?@[\]^{|}~">
  32. <Rule OpenSymbolPartOfTerm="Right" CloseSymbolPartOfTerm="False"/>
  33. <Keywords Name="Keywords" Attributes="$00FF0000,$80000005;False:True." Style="">
  34. <Word Value="as"/>
  35. <Word Value="async"/>
  36. <Word Value="await"/>
  37. <Word Value="break"/>
  38. <Word Value="const"/>
  39. <Word Value="continue"/>
  40. <Word Value="crate"/>
  41. <Word Value="dyn"/>
  42. <Word Value="else"/>
  43. <Word Value="enum"/>
  44. <Word Value="extern"/>
  45. <Word Value="false"/>
  46. <Word Value="fn"/>
  47. <Word Value="for"/>
  48. <Word Value="if"/>
  49. <Word Value="impl"/>
  50. <Word Value="in"/>
  51. <Word Value="let"/>
  52. <Word Value="loop"/>
  53. <Word Value="match"/>
  54. <Word Value="mod"/>
  55. <Word Value="move"/>
  56. <Word Value="mut"/>
  57. <Word Value="pub"/>
  58. <Word Value="ref"/>
  59. <Word Value="return"/>
  60. <Word Value="self"/>
  61. <Word Value="static"/>
  62. <Word Value="struct"/>
  63. <Word Value="super"/>
  64. <Word Value="trait"/>
  65. <Word Value="true"/>
  66. <Word Value="type"/>
  67. <Word Value="union"/>
  68. <Word Value="unsafe"/>
  69. <Word Value="use"/>
  70. <Word Value="where"/>
  71. <Word Value="while"/>
  72. </Keywords>
  73. <Keywords Name="Macros" Attributes="$00800000,$80000005;False:True." Style="">
  74. <Word Value="assert"/>
  75. <Word Value="assert_eq"/>
  76. <Word Value="assert_ne"/>
  77. <Word Value="cfg"/>
  78. <Word Value="column"/>
  79. <Word Value="compile_error"/>
  80. <Word Value="concat"/>
  81. <Word Value="dbg"/>
  82. <Word Value="debug_assert"/>
  83. <Word Value="debug_assert_eq"/>
  84. <Word Value="debug_assert_ne"/>
  85. <Word Value="env"/>
  86. <Word Value="eprint"/>
  87. <Word Value="eprintln"/>
  88. <Word Value="file"/>
  89. <Word Value="format"/>
  90. <Word Value="format_args"/>
  91. <Word Value="include"/>
  92. <Word Value="include_bytes"/>
  93. <Word Value="include_str"/>
  94. <Word Value="is_x86_feature_detected"/>
  95. <Word Value="line"/>
  96. <Word Value="macro_rules"/>
  97. <Word Value="matches"/>
  98. <Word Value="module_path"/>
  99. <Word Value="option_env"/>
  100. <Word Value="panic"/>
  101. <Word Value="print"/>
  102. <Word Value="println"/>
  103. <Word Value="stringify"/>
  104. <Word Value="thread_local"/>
  105. <Word Value="todo"/>
  106. <Word Value="try"/>
  107. <Word Value="unimplemented"/>
  108. <Word Value="unreachable"/>
  109. <Word Value="vec"/>
  110. <Word Value="write"/>
  111. <Word Value="writeln"/>
  112. </Keywords>
  113. <Keywords Name="Operators" Attributes="$00CC3299,$80000005;False:True." Style="">
  114. <Word Value="!"/>
  115. <Word Value="%"/>
  116. <Word Value="&amp;"/>
  117. <Word Value="*"/>
  118. <Word Value="+"/>
  119. <Word Value="-"/>
  120. <Word Value="/"/>
  121. <Word Value="&lt;"/>
  122. <Word Value="="/>
  123. <Word Value="&gt;"/>
  124. <Word Value="?"/>
  125. <Word Value="\"/>
  126. <Word Value="^"/>
  127. <Word Value="|"/>
  128. </Keywords>
  129. <Keywords Name="Punctuators" Attributes="$000000FF,$80000005;False:True." Style="">
  130. <Word Value="("/>
  131. <Word Value=")"/>
  132. <Word Value="["/>
  133. <Word Value="]"/>
  134. <Word Value="{"/>
  135. <Word Value="}"/>
  136. <Word Value=","/>
  137. <Word Value="."/>
  138. <Word Value=":"/>
  139. <Word Value=";"/>
  140. </Keywords>
  141. <Keywords Name="Types" Attributes="$00000080,$80000005;False:True." Style="">
  142. <Word Value="bool"/>
  143. <Word Value="char"/>
  144. <Word Value="str"/>
  145. <Word Value="f32"/>
  146. <Word Value="f64"/>
  147. <Word Value="i8"/>
  148. <Word Value="i16"/>
  149. <Word Value="i32"/>
  150. <Word Value="i64"/>
  151. <Word Value="i128"/>
  152. <Word Value="isize"/>
  153. <Word Value="u8"/>
  154. <Word Value="u16"/>
  155. <Word Value="u32"/>
  156. <Word Value="u64"/>
  157. <Word Value="u128"/>
  158. <Word Value="usize"/>
  159. </Keywords>
  160. <Keywords Name="Complex types" Attributes="$00000080,$80000005;False:True." Style="">
  161. <Word Value="String"/>
  162. <Word Value="Option"/>
  163. <Word Value="Result"/>
  164. <Word Value="Mutex"/>
  165. <Word Value="HashMap"/>
  166. <Word Value="RefCell"/>
  167. <Word Value="CString"/>
  168. <Word Value="Cell"/>
  169. <Word Value="File"/>
  170. <Word Value="CStr"/>
  171. <Word Value="Arc"/>
  172. <Word Value="Box"/>
  173. <Word Value="Vec"/>
  174. </Keywords>
  175. <Range Name="Remarks //" Attributes="$00008000,$80000005;False:True." Style=""
  176. Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
  177. <Rule OpenSymbol="//" OpenSymbolPartOfTerm="Right" CloseSymbolPartOfTerm="False" CloseOnEol="True"/>
  178. </Range>
  179. <Range Name="Remarks /*..*/" Attributes="$00008000,$80000005;False:True." Style=""
  180. Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
  181. <Rule OpenSymbol="/*" OpenSymbolPartOfTerm="Right" CloseSymbol="*/" CloseSymbolPartOfTerm="Right"/>
  182. </Range>
  183. <Range Name="Strings &quot;..&quot;" Attributes="$00696969,$80000005;False:True." Style=""
  184. Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
  185. <Rule OpenSymbol="&quot;" OpenSymbolPartOfTerm="Right" CloseSymbol="&quot;" CloseSymbolPartOfTerm="Right" CloseOnEol="True"/>
  186. <Keywords Name="Escape" Attributes="$00696969,$80000005;True:True." Style="">
  187. <Word Value="\&quot;"/>
  188. <Word Value="\\"/>
  189. </Keywords>
  190. </Range>
  191. <Range Name="Chars '..'" Attributes="$00696969,$80000005;False:True." Style=""
  192. Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
  193. <Rule OpenSymbol="'" OpenSymbolPartOfTerm="Right" CloseSymbol="'" CloseSymbolPartOfTerm="Right" CloseOnEol="True"/>
  194. </Range>
  195. <Range Name="Attributes (outer)" Attributes="$00000096,$80000005;False:True." Style=""
  196. Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
  197. <Rule OpenSymbol="#[" OpenSymbolStartLine="NonSpace" CloseSymbol="]"/>
  198. </Range>
  199. <Range Name="Attributes (inner)" Attributes="$00000096,$80000005;False:True." Style=""
  200. Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
  201. <Rule OpenSymbol="#![" OpenSymbolStartLine="NonSpace" CloseSymbol="]"/>
  202. </Range>
  203. </Range>
  204. </UniHighlighter>