lua.syntax 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. #
  2. # LUA Scripting Language syntax highlight
  3. # // Mike Gorchak <lestat@i.com.ua>
  4. #
  5. context default lightgray
  6. # keywords
  7. keyword whole and white
  8. keyword whole break white
  9. keyword whole do white
  10. keyword whole else white
  11. keyword whole elseif white
  12. keyword whole end white
  13. keyword whole false white
  14. keyword whole for white
  15. keyword whole function white
  16. keyword whole if white
  17. keyword whole in white
  18. keyword whole local white
  19. keyword whole nil white
  20. keyword whole not white
  21. keyword whole or white
  22. keyword whole repeat white
  23. keyword whole return white
  24. keyword whole then white
  25. keyword whole true white
  26. keyword whole until white
  27. keyword whole while white
  28. # Comments
  29. keyword -- brown
  30. keyword ]] brown
  31. # Operators
  32. keyword ( white
  33. keyword ) white
  34. keyword { white
  35. keyword } white
  36. keyword [ white
  37. keyword ] white
  38. keyword . white
  39. keyword , white
  40. keyword ; white
  41. keyword : white
  42. keyword .. white
  43. keyword ... white
  44. keyword = white
  45. keyword == white
  46. keyword ~= white
  47. keyword <= white
  48. keyword => white
  49. keyword > white
  50. keyword < white
  51. keyword \+ white
  52. keyword - white
  53. keyword \* white
  54. keyword / white
  55. keyword ^ white
  56. # Library Functions
  57. # basiclib
  58. keyword whole error yellow
  59. keyword whole getmetatable yellow
  60. keyword whole setmetatable yellow
  61. keyword whole getfenv yellow
  62. keyword whole setfenv yellow
  63. keyword whole next yellow
  64. keyword whole ipairs yellow
  65. keyword whole pairs yellow
  66. keyword whole print yellow
  67. keyword whole tonumber yellow
  68. keyword whole tostring yellow
  69. keyword whole type yellow
  70. keyword whole assert yellow
  71. keyword whole unpack yellow
  72. keyword whole rawequal yellow
  73. keyword whole rawget yellow
  74. keyword whole rawset yellow
  75. keyword whole pcall yellow
  76. keyword whole xpcall yellow
  77. keyword whole collectgarbage yellow
  78. keyword whole gcinfo yellow
  79. keyword whole loadfile yellow
  80. keyword whole dofile yellow
  81. keyword whole loadstring yellow
  82. keyword whole require yellow
  83. keyword whole coroutine.create yellow
  84. keyword whole coroutine.wrap yellow
  85. keyword whole coroutine.resume yellow
  86. keyword whole coroutine.yield yellow
  87. keyword whole coroutine.status yellow
  88. # stringlib
  89. keyword whole string.len yellow
  90. keyword whole string.sub yellow
  91. keyword whole string.lower yellow
  92. keyword whole string.upper yellow
  93. keyword whole string.char yellow
  94. keyword whole string.rep yellow
  95. keyword whole string.byte yellow
  96. keyword whole string.format yellow
  97. keyword whole string.dump yellow
  98. keyword whole string.find yellow
  99. keyword whole string.gfind yellow
  100. keyword whole string.gsub yellow
  101. # tablelib
  102. keyword whole table.concat yellow
  103. keyword whole table.foreach yellow
  104. keyword whole table.foreachi yellow
  105. keyword whole table.getn yellow
  106. keyword whole table.setn yellow
  107. keyword whole table.sort yellow
  108. keyword whole table.insert yellow
  109. keyword whole table.remove yellow
  110. # mathlib
  111. keyword whole math.abs yellow
  112. keyword whole math.sin yellow
  113. keyword whole math.cos yellow
  114. keyword whole math.tan yellow
  115. keyword whole math.asin yellow
  116. keyword whole math.acos yellow
  117. keyword whole math.atan yellow
  118. keyword whole math.atan2 yellow
  119. keyword whole math.ceil yellow
  120. keyword whole math.floor yellow
  121. keyword whole math.mod yellow
  122. keyword whole math.frexp yellow
  123. keyword whole math.ldexp yellow
  124. keyword whole math.sqrt yellow
  125. keyword whole math.min yellow
  126. keyword whole math.max yellow
  127. keyword whole math.log yellow
  128. keyword whole math.log10 yellow
  129. keyword whole math.exp yellow
  130. keyword whole math.deg yellow
  131. keyword whole math.pow yellow
  132. keyword whole math.rad yellow
  133. keyword whole math.random yellow
  134. keyword whole math.randomseed yellow
  135. # iolib
  136. keyword whole io.input yellow
  137. keyword whole io.output yellow
  138. keyword whole io.lines yellow
  139. keyword whole io.close yellow
  140. keyword whole io.flush yellow
  141. keyword whole io.open yellow
  142. keyword whole io.popen yellow
  143. keyword whole io.read yellow
  144. keyword whole io.tmpfile yellow
  145. keyword whole io.type yellow
  146. keyword whole io.write yellow
  147. # filelib
  148. keyword whole file.flush yellow
  149. keyword whole file.read yellow
  150. keyword whole file.lines yellow
  151. keyword whole file.seek yellow
  152. keyword whole file.write yellow
  153. keyword whole file.close yellow
  154. keyword whole file.__gc yellow
  155. keyword whole file.__tostring yellow
  156. # syslib
  157. keyword whole os.clock yellow
  158. keyword whole os.date yellow
  159. keyword whole os.difftime yellow
  160. keyword whole os.execute yellow
  161. keyword whole os.exit yellow
  162. keyword whole os.getenv yellow
  163. keyword whole os.remove yellow
  164. keyword whole os.rename yellow
  165. keyword whole os.setlocale yellow
  166. keyword whole os.time yellow
  167. keyword whole os.tmpname yellow
  168. # debuglib
  169. keyword whole debug.getlocal yellow
  170. keyword whole debug.getinfo yellow
  171. keyword whole debug.gethook yellow
  172. keyword whole debug.getupvalue yellow
  173. keyword whole debug.sethook yellow
  174. keyword whole debug.setlocal yellow
  175. keyword whole debug.setupvalue yellow
  176. keyword whole debug.debug yellow
  177. keyword whole debug.traceback yellow
  178. # Global Variables
  179. keyword whole _VERSION brightmagenta
  180. keyword whole _G brightmagenta
  181. # Comments
  182. context exclusive --[[ ]] brown
  183. spellcheck
  184. context exclusive -- \n brown
  185. spellcheck
  186. context linestart # \n brown
  187. # Strings
  188. context " " brightgreen
  189. # can't find good color for the patterns highlight.
  190. keyword %a brightgreen
  191. keyword %c brightgreen
  192. keyword %d brightgreen
  193. keyword %l brightgreen
  194. keyword %p brightgreen
  195. keyword %s brightgreen
  196. keyword %u brightgreen
  197. keyword %w brightgreen
  198. keyword %x brightgreen
  199. keyword %z brightgreen
  200. keyword \\" brightgreen
  201. spellcheck
  202. context ' ' brightgreen
  203. spellcheck