Swift.hgl 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <UniHighlighter version="1.8">
  2. <Info>
  3. <General Name="Swift" Extensions="SWIFT" Other="0"/>
  4. <Author Name="" Email="" Web="" Copyright="" Company="" Remark=""/>
  5. <Version Version="1" Revision="0" Date="45794,6870897801"/>
  6. <History>
  7. </History>
  8. <Sample>
  9. <S>// Syntax highlighting</S>
  10. <S>var myVariable = 42</S>
  11. <S>let myConstant = 42</S>
  12. <S>let explicitDouble: Double = 70</S>
  13. <S></S>
  14. <S>// Prints &quot;Hello, world!&quot;</S>
  15. <S>print(&quot;Hello, world!&quot;)</S>
  16. <S></S>
  17. <S>let individualScores = [75, 43, 103, 87, 12]</S>
  18. <S>var teamScore = 0</S>
  19. <S>for score in individualScores {</S>
  20. <S> if score &gt; 50 {</S>
  21. <S> teamScore += 3</S>
  22. <S> } else {</S>
  23. <S> teamScore += 1</S>
  24. <S> }</S>
  25. <S>}</S>
  26. <S>// Prints &quot;11&quot;</S>
  27. <S>print(teamScore)</S>
  28. </Sample>
  29. </Info>
  30. <Scheme File="" Name=""/>
  31. <Range Name="Root" Attributes="$80000008,$80000005;False:False." Style=""
  32. Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
  33. <Rule/>
  34. <Keywords Name="Keywords" Attributes="$00FF0000,$00FFFFFF;False:True." Style="">
  35. <Word Value="class"/>
  36. <Word Value="deinit"/>
  37. <Word Value="enum"/>
  38. <Word Value="extension"/>
  39. <Word Value="func"/>
  40. <Word Value="import"/>
  41. <Word Value="init"/>
  42. <Word Value="internal"/>
  43. <Word Value="let"/>
  44. <Word Value="operator"/>
  45. <Word Value="private"/>
  46. <Word Value="protocol"/>
  47. <Word Value="public"/>
  48. <Word Value="static"/>
  49. <Word Value="struct"/>
  50. <Word Value="subscript"/>
  51. <Word Value="typealias"/>
  52. <Word Value="var"/>
  53. <Word Value="break"/>
  54. <Word Value="case"/>
  55. <Word Value="continue"/>
  56. <Word Value="default"/>
  57. <Word Value="do"/>
  58. <Word Value="else"/>
  59. <Word Value="fallthrough"/>
  60. <Word Value="for"/>
  61. <Word Value="if"/>
  62. <Word Value="in"/>
  63. <Word Value="return"/>
  64. <Word Value="switch"/>
  65. <Word Value="where"/>
  66. <Word Value="while"/>
  67. </Keywords>
  68. <Keywords Name="Operators" Attributes="$00CC3299,$80000005;False:True." Style="">
  69. <Word Value="!"/>
  70. <Word Value="%"/>
  71. <Word Value="&amp;"/>
  72. <Word Value="*"/>
  73. <Word Value="+"/>
  74. <Word Value="-"/>
  75. <Word Value="/"/>
  76. <Word Value="&lt;"/>
  77. <Word Value="="/>
  78. <Word Value="&gt;"/>
  79. <Word Value="?"/>
  80. <Word Value="\"/>
  81. <Word Value="^"/>
  82. <Word Value="|"/>
  83. </Keywords>
  84. <Keywords Name="Punctuators" Attributes="$000000FF,$80000005;False:True." Style="">
  85. <Word Value="("/>
  86. <Word Value=")"/>
  87. <Word Value="["/>
  88. <Word Value="]"/>
  89. <Word Value="{"/>
  90. <Word Value="}"/>
  91. <Word Value=","/>
  92. <Word Value="."/>
  93. <Word Value=":"/>
  94. <Word Value=";"/>
  95. </Keywords>
  96. <Keywords Name="Types" Attributes="$00000080,$00FFFFFF;False:True." Style="">
  97. <Word Value="Bool"/>
  98. <Word Value="Int"/>
  99. <Word Value="Int8"/>
  100. <Word Value="Int16"/>
  101. <Word Value="Int32"/>
  102. <Word Value="Int64"/>
  103. <Word Value="UInt"/>
  104. <Word Value="UInt8"/>
  105. <Word Value="UInt16"/>
  106. <Word Value="UInt32"/>
  107. <Word Value="UInt64"/>
  108. <Word Value="Double"/>
  109. <Word Value="Float"/>
  110. <Word Value="String"/>
  111. <Word Value="Character"/>
  112. </Keywords>
  113. <Range Name="Remarks //" Attributes="$00008000,$00FFFFFF;False:True." Style=""
  114. Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
  115. <Rule OpenSymbol="//" CloseOnEol="True"/>
  116. </Range>
  117. <Range Name="Remarks /*..*/" Attributes="$00008000,$00FFFFFF;False:True." Style=""
  118. Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
  119. <Rule OpenSymbol="/*" CloseSymbol="*/"/>
  120. </Range>
  121. <Range Name="Strings &quot;..&quot;" Attributes="$00696969,$00FFFFFF;False:True." Style=""
  122. Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
  123. <Rule OpenSymbol="&quot;" CloseSymbol="&quot;"/>
  124. <Keywords Name="Escape" Attributes="$00696969,$00FFFFFF;True:True." Style="">
  125. <Word Value="\&quot;"/>
  126. <Word Value="\\"/>
  127. </Keywords>
  128. </Range>
  129. <Range Name="Strings &quot;&quot;&quot;...&quot;&quot;&quot;" Attributes="$00696969,$00FFFFFF;False:True." Style=""
  130. Delimiters="!&quot;#$%&amp;'()*+,-./:;&lt;=&gt;?@[\]^`{|}~">
  131. <Rule OpenSymbol="&quot;&quot;&quot;" CloseSymbol="&quot;&quot;&quot;"/>
  132. </Range>
  133. </Range>
  134. </UniHighlighter>