Guest User

Untitled

a guest
Jul 17th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.02 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <language id="go" _name="Go" version="2.0" _section="Sources">
  4. <metadata>
  5. <property name="mimetypes">text</property>
  6. <property name="globs">*.go</property>
  7. <property name="line-comment-start">//</property>
  8. <property name="block-comment-start">/*</property>
  9. <property name="block-comment-end">*/</property>
  10. </metadata>
  11.  
  12. <styles>
  13. <style id="comment" _name="Comment" map-to="def:comment"/>
  14. <style id="error" _name="Error" map-to="def:error"/>
  15. <style id="string" _name="String" map-to="def:string"/>
  16. <style id="keyword" _name="Keyword" map-to="def:keyword"/>
  17. <style id="type" _name="Data Type" map-to="def:type"/>
  18. <style id="special-token" _name="Special Token" map-to="def:preprocessor"/>
  19. <style id="null-value" _name="Null Value" map-to="def:special-constant"/>
  20. <style id="boolean" _name="Boolean" map-to="def:boolean"/>
  21. <style id="floating-point" _name="Floating point number" map-to="def:floating-point"/>
  22. <style id="decimal" _name="Decimal number" map-to="def:decimal"/>
  23. <style id="binary" _name="Binary number" map-to="def:base-n-integer"/>
  24. <style id="octal" _name="Octal number" map-to="def:base-n-integer"/>
  25. <style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
  26. </styles>
  27.  
  28. <definitions>
  29.  
  30. <context id="line-comment" style-ref="comment" end-at-line-end="true">
  31. <start>//</start>
  32. <include>
  33. <context ref="def:in-line-comment"/>
  34. </include>
  35. </context>
  36.  
  37. <context id="block-comment" style-ref="comment">
  38. <start>/\*</start>
  39. <end>\*/</end>
  40. <include>
  41. <context ref="def:in-comment"/>
  42. </include>
  43. </context>
  44.  
  45. <context id="close-comment-outside-comment" style-ref="error">
  46. <match>\*/(?!\*)</match>
  47. </context>
  48.  
  49. <context id="double-quoted-string" style-ref="string">
  50. <start>"</start>
  51. <end>"</end>
  52. <include>
  53. <context ref="def:escape"/>
  54. <context ref="def:line-continue"/>
  55. </include>
  56. </context>
  57.  
  58. <context id="single-quoted-string" style-ref="string" end-at-line-end="true">
  59. <start>'</start>
  60. <end>'</end>
  61. <include>
  62. <context ref="def:escape"/>
  63. <context ref="def:line-continue"/>
  64. </include>
  65. </context>
  66.  
  67. <context id="backtick-quoted-string" style-ref="string">
  68. <start>`</start>
  69. <end>`</end>
  70. <include>
  71. <context ref="def:escape"/>
  72. <context ref="def:line-continue"/>
  73. </include>
  74. </context>
  75.  
  76. <context id="keywords" style-ref="keyword">
  77. <keyword>break</keyword>
  78. <keyword>case</keyword>
  79. <keyword>chan</keyword>
  80. <keyword>const</keyword>
  81. <keyword>continue</keyword>
  82. <keyword>default</keyword>
  83. <keyword>defer</keyword>
  84. <keyword>else</keyword>
  85. <keyword>fallthrough</keyword>
  86. <keyword>for</keyword>
  87. <keyword>func</keyword>
  88. <keyword>go</keyword>
  89. <keyword>goto</keyword>
  90. <keyword>if</keyword>
  91. <keyword>import</keyword>
  92. <keyword>interface</keyword>
  93. <keyword>map</keyword>
  94. <keyword>package</keyword>
  95. <keyword>range</keyword>
  96. <keyword>return</keyword>
  97. <keyword>select</keyword>
  98. <keyword>struct</keyword>
  99. <keyword>switch</keyword>
  100. <keyword>type</keyword>
  101. <keyword>var</keyword>
  102. </context>
  103.  
  104. <context id="types" style-ref="type">
  105. <keyword>bool</keyword>
  106. <keyword>uint8</keyword>
  107. <keyword>uint16</keyword>
  108. <keyword>uint32</keyword>
  109. <keyword>uint64</keyword>
  110. <keyword>int8</keyword>
  111. <keyword>int16</keyword>
  112. <keyword>int32</keyword>
  113. <keyword>int64</keyword>
  114. <keyword>float32</keyword>
  115. <keyword>float64</keyword>
  116. <keyword>byte</keyword>
  117. <keyword>uint</keyword>
  118. <keyword>int</keyword>
  119. <keyword>float</keyword>
  120. <keyword>uintptr</keyword>
  121. <keyword>string</keyword>
  122. <keyword>bool</keyword>
  123. </context>
  124.  
  125. <context id="null-value" style-ref="null-value">
  126. <keyword>nil</keyword>
  127. </context>
  128.  
  129. <context id="boolean" style-ref="boolean">
  130. <keyword>false</keyword>
  131. <keyword>true</keyword>
  132. </context>
  133.  
  134. <context id="float" style-ref="floating-point">
  135. <match extended="true">
  136. (?<![\w\.])
  137. ([0-9_]+[Ee][-]?[0-9_]+|([0-9_]*\.[0-9_]+|[0-9_]+\.)([Ee][-]?[0-9_]+)?)[fFLi]?
  138. (?![\w\.])
  139. </match>
  140. </context>
  141.  
  142. <context id="decimal" style-ref="decimal">
  143. <match extended="true">
  144. (?<![\w\.])
  145. ([1-9][0-9_]*|0)([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
  146. (?![\w\.])
  147. </match>
  148. </context>
  149.  
  150. <context id="binary" style-ref="binary">
  151. <match extended="true">
  152. (?<![\w\.])
  153. 0[bB][01_]*
  154. (?![\w\.])
  155. </match>
  156. </context>
  157.  
  158. <context id="octal" style-ref="octal">
  159. <match extended="true">
  160. (?<![\w\.])
  161. 0[0-7_]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
  162. (?![\w\.])
  163. </match>
  164. </context>
  165.  
  166. <context id="hexadecimal" style-ref="hexadecimal">
  167. <match extended="true">
  168. (?<![\w\.])
  169. 0[xX][0-9a-fA-F_]+([Uu]([Ll]|LL|ll)?|([Ll]|LL|ll)[Uu]?)?
  170. (?![\w\.])
  171. </match>
  172. </context>
  173.  
  174. <context id="go">
  175. <include>
  176. <context ref="def:shebang"/>
  177. <context ref="line-comment"/>
  178. <context ref="block-comment"/>
  179. <context ref="close-comment-outside-comment"/>
  180. <context ref="double-quoted-string"/>
  181. <context ref="single-quoted-string"/>
  182. <context ref="backtick-quoted-string"/>
  183. <context ref="keywords"/>
  184. <context ref="types"/>
  185. <context ref="null-value"/>
  186. <context ref="boolean"/>
  187. <context ref="float"/>
  188. <context ref="binary"/>
  189. <context ref="octal"/>
  190. <context ref="decimal"/>
  191. <context ref="hexadecimal"/>
  192. </include>
  193. </context>
  194.  
  195. </definitions>
  196.  
  197. </language>
Add Comment
Please, Sign In to add comment