ruby.syntax 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. #Ruby syntax file derived from perl syntax by Marco Ciampa <ciampix@libero.it>
  2. #alpha version 0.2 16/05/2003
  3. context default
  4. #Bang path
  5. keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
  6. keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
  7. keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
  8. keyword whole linestart #!\[\s\]/\[abcdefghijklmnopqrstuvwxyz\]/bin/ruby brightcyan black
  9. keyword whole linestart #!\[\s\]/bin/ruby brightcyan black
  10. # Symbols :bla-bla
  11. keyword whole \:\{ABCDEFGHIJKLMNOPQRSTUVWXYZ_\-abcdefghijklmnopqrstuvwxyz\}\[\?\-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz\] white
  12. #Operators
  13. keyword > yellow
  14. keyword < yellow
  15. keyword - yellow
  16. keyword \+ yellow
  17. keyword \* yellow
  18. keyword / yellow
  19. keyword % yellow
  20. keyword = yellow
  21. keyword \+= yellow
  22. keyword -= yellow
  23. keyword == yellow
  24. keyword != yellow
  25. keyword === yellow
  26. keyword <=> yellow
  27. keyword ! yellow
  28. keyword ~ yellow
  29. keyword =~ yellow
  30. keyword & yellow
  31. keyword | yellow
  32. keyword .. yellow
  33. #System variables
  34. # hack for regexps
  35. keyword $/ yellow
  36. keyword $\{!@&\+`'=~/\\,.;<>_\*"$:F?\} red
  37. keyword $\{\0123456789\} red
  38. keyword $-+ red
  39. keyword whole $defout red
  40. keyword whole $DEBUG red
  41. keyword whole $F red
  42. keyword whole $FILENAME red
  43. keyword whole $LOAD_PATH red
  44. keyword whole $SAFE red
  45. keyword whole $VERBOSE red
  46. keyword whole __FILE__ red
  47. keyword whole __LINE__ red
  48. keyword whole BEGIN red
  49. keyword whole END red
  50. keyword whole DATA red
  51. keyword whole RUBY_PLATFORM red
  52. keyword whole RUBY_RELEASE_DATE red
  53. keyword whole RUBY_VERSION red
  54. keyword whole $stdin red
  55. keyword whole STDIN red
  56. keyword whole $stdout red
  57. keyword whole STDOUT red
  58. keyword whole $stderr red
  59. keyword whole STDERR red
  60. keyword whole argv red
  61. keyword whole ARGV red
  62. keyword whole ARGF red
  63. keyword whole env red
  64. keyword whole ENV red
  65. #Braces &
  66. keyword { brightcyan
  67. keyword } brightcyan
  68. keyword ( brightcyan
  69. keyword ) brightcyan
  70. keyword [ brightcyan
  71. keyword ] brightcyan
  72. keyword , brightcyan
  73. keyword : brightcyan
  74. keyword whole false brightred
  75. keyword whole FALSE brightred
  76. keyword whole nil brightred
  77. keyword whole NIL brightred
  78. keyword whole true brightred
  79. keyword whole TRUE brightred
  80. #Variables
  81. keyword wholeright $+ brightgreen
  82. keyword wholeright @+ white
  83. keyword \\" brightred
  84. keyword \\' brightred
  85. #Reserved words (see ruby manual)
  86. keyword whole def magenta
  87. keyword whole alias magenta
  88. keyword whole and magenta
  89. keyword whole begin magenta
  90. keyword whole break magenta
  91. keyword whole case magenta
  92. keyword whole class magenta
  93. keyword whole defined\? magenta
  94. keyword whole do magenta
  95. keyword whole else magenta
  96. keyword whole elsif magenta
  97. keyword whole end magenta
  98. keyword whole ensure magenta
  99. keyword whole for magenta
  100. keyword whole if magenta
  101. keyword whole in magenta
  102. keyword whole module magenta
  103. keyword whole next magenta
  104. keyword whole not magenta
  105. keyword whole or magenta
  106. keyword whole redo magenta
  107. keyword whole rescue magenta
  108. keyword whole retry magenta
  109. keyword whole return magenta
  110. keyword whole self magenta
  111. keyword whole super magenta
  112. keyword whole then magenta
  113. keyword whole undef magenta
  114. keyword whole unless magenta
  115. keyword whole until magenta
  116. keyword whole when magenta
  117. keyword whole while magenta
  118. keyword whole yeld magenta
  119. #First class methods
  120. keyword whole new yellow
  121. keyword whole inherited yellow
  122. keyword whole superclass yellow
  123. #Class module
  124. # exclusion
  125. keyword whole include\? green
  126. keyword whole include magenta
  127. keyword whole require magenta
  128. keyword whole require_relative magenta
  129. # keyword whole where magenta
  130. #Class numeric
  131. keyword whole abs red
  132. keyword whole modulo red
  133. keyword whole remainder red
  134. #Class IO
  135. keyword whole close yellow
  136. keyword whole crypt yellow
  137. keyword whole delete yellow
  138. keyword whole each yellow
  139. keyword whole gets yellow
  140. keyword whole grep yellow
  141. keyword whole inspect yellow
  142. keyword whole join yellow
  143. keyword whole sync yellow
  144. #Class Array
  145. keyword whole index yellow
  146. keyword whole indexes yellow
  147. keyword whole indices yellow
  148. keyword whole size yellow
  149. keyword whole pop yellow
  150. keyword whole push yellow
  151. keyword whole sort yellow
  152. keyword whole shift yellow
  153. keyword whole unshift yellow
  154. #Math module
  155. keyword whole Math::PI red
  156. keyword whole Math::E red
  157. keyword whole atan2 red
  158. keyword whole cos red
  159. keyword whole exp red
  160. keyword whole frexp red
  161. keyword whole ldexp red
  162. keyword whole log red
  163. keyword whole log10 red
  164. keyword whole sin red
  165. keyword whole sqrt red
  166. keyword whole tan red
  167. #Kernel module
  168. keyword whole chomp yellow
  169. keyword whole chomp! yellow
  170. keyword whole chop yellow
  171. keyword whole chop! yellow
  172. keyword whole raise yellow
  173. keyword whole fork yellow
  174. keyword whole rand yellow
  175. keyword whole srand yellow
  176. keyword whole open yellow
  177. keyword whole print yellow
  178. keyword whole printf yellow
  179. keyword whole sprintf yellow
  180. keyword whole exec yellow
  181. keyword whole eval yellow
  182. keyword whole exit yellow
  183. keyword whole sleep yellow
  184. #this works only with label EOF :-(
  185. #context exclusive whole <<\[\s\]EOF EOF green
  186. context # \n brown
  187. spellcheck
  188. context " " green
  189. keyword \\" brightgreen
  190. keyword \\\\ brightgreen
  191. context ' ' brightgreen
  192. keyword \\' green
  193. keyword \\\\ green
  194. context exclusive ` ` white black