js.syntax 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. #
  2. # JavaScript syntax highlighting
  3. # for MC Editor/CoolEdit
  4. #
  5. # Authors:
  6. # * Vlad Romanenko <VladRomanenko@ukr.net>
  7. # * Timur Shemsedinov <timur.shemsedinov@gmail.com>
  8. # * Pavel Roskin <proski@gnu.org>
  9. # Based on c.syntax
  10. #
  11. # 2022-08-17 Timur Shemsedinov <timur.shemsedinov@gmail.com>
  12. # * Support latest ECMAScript syntax
  13. # * Support ECMAScript global identifiers
  14. # * Support node.js specific identifiers
  15. #
  16. # 2002-09-17 Vlad Romanenko <VladRomanenko@ukr.net>
  17. # * More C and Java consistency by Pavel Roskin <proski@gnu.org>
  18. # * Advanced number highlighting
  19. #
  20. # 2002-09-16 Vlad Romanenko <VladRomanenko@ukr.net>
  21. # * Initial public release
  22. #
  23. context default
  24. #=========================
  25. # Keywords
  26. keyword whole arguments yellow
  27. keyword whole async yellow
  28. keyword whole await yellow
  29. keyword whole break yellow
  30. keyword whole caller yellow
  31. keyword whole case yellow
  32. keyword whole catch yellow
  33. keyword whole class yellow
  34. keyword whole const yellow
  35. keyword whole constructor yellow
  36. keyword whole continue yellow
  37. keyword whole debugger yellow
  38. keyword whole default yellow
  39. keyword whole delete yellow
  40. keyword whole do yellow
  41. keyword whole else yellow
  42. keyword whole export yellow
  43. keyword whole extends yellow
  44. keyword whole finally yellow
  45. keyword whole for yellow
  46. keyword whole function yellow
  47. keyword whole if yellow
  48. keyword whole import yellow
  49. keyword whole in yellow
  50. keyword whole instanceof yellow
  51. keyword whole let yellow
  52. keyword whole new yellow
  53. keyword whole of yellow
  54. keyword whole prototype yellow
  55. keyword whole return yellow
  56. keyword whole super yellow
  57. keyword whole switch yellow
  58. keyword whole this yellow
  59. keyword whole throw yellow
  60. keyword whole try yellow
  61. keyword whole typeof yellow
  62. keyword whole var yellow
  63. keyword whole void yellow
  64. keyword whole while yellow
  65. keyword whole with yellow
  66. keyword whole yield yellow
  67. #=========================
  68. # Objects
  69. keyword whole AbortController yellow
  70. keyword whole AbortSignal yellow
  71. keyword whole AggregateError yellow
  72. keyword whole Array yellow
  73. keyword whole ArrayBuffer yellow
  74. keyword whole AsyncFunction yellow
  75. keyword whole AsyncGenerator yellow
  76. keyword whole AsyncGeneratorFunction yellow
  77. keyword whole Atomics yellow
  78. keyword whole BigInt64Array yellow
  79. keyword whole BigInt yellow
  80. keyword whole BigUint64Array yellow
  81. keyword whole Blob yellowOB
  82. keyword whole Boolean yellow
  83. keyword whole Buffer yellow
  84. keyword whole DataView yellow
  85. keyword whole Date yellow
  86. keyword whole DOMException yellow
  87. keyword whole Error yellow
  88. keyword whole EvalError yellow
  89. keyword whole Float32Array yellow
  90. keyword whole Float64Array yellow
  91. keyword whole Function yellow
  92. keyword whole Generator yellow
  93. keyword whole GeneratorFunction yellow
  94. keyword whole global yellow
  95. keyword whole globalThis yellow
  96. keyword whole Image yellow
  97. keyword whole Infinity yellow
  98. keyword whole Int16Array yellow
  99. keyword whole Int32Array yellow
  100. keyword whole Int8Array yellow
  101. keyword whole Intl yellow
  102. keyword whole JSON yellow
  103. keyword whole Map yellow
  104. keyword whole Math yellow
  105. keyword whole Number yellow
  106. keyword whole Object yellow
  107. keyword whole Promise yellow
  108. keyword whole Promise yellow
  109. keyword whole Proxy yellow
  110. keyword whole RangeError yellow
  111. keyword whole ReferenceError yellow
  112. keyword whole Reflect yellow
  113. keyword whole RegExp yellow
  114. keyword whole Set yellow
  115. keyword whole SharedArrayBuffer yellow
  116. keyword whole Symbol yellow
  117. keyword whole SyntaxError yellow
  118. keyword whole TextDecoder yellow
  119. keyword whole TypeError yellow
  120. keyword whole Uint16Array yellow
  121. keyword whole Uint32Array yellow
  122. keyword whole Uint8Array yellow
  123. keyword whole Uint8ClampedArray yellow
  124. keyword whole URIError yellow
  125. keyword whole URL yellow
  126. keyword whole URLSearchParams yellow
  127. keyword whole WeakMap yellow
  128. keyword whole WeakSet yellow
  129. keyword whole WebAssembly yellow
  130. keyword whole window yellow
  131. #=========================
  132. # Most common functions
  133. keyword whole alert yellow
  134. keyword whole clearInterval yellow
  135. keyword whole clearTimeout yellow
  136. keyword whole console yellow
  137. keyword whole decodeURIComponent yellow
  138. keyword whole decodeURI yellow
  139. keyword whole encodeURIComponent yellow
  140. keyword whole escape yellow
  141. keyword whole eval yellow
  142. keyword whole fetch yellow
  143. keyword whole isFinite yellow
  144. keyword whole isNaN yellow
  145. keyword whole module yellow
  146. keyword whole parseFloat yellow
  147. keyword whole parseInt yellow
  148. keyword whole performance yellow
  149. keyword whole process yellow
  150. keyword whole queueMicrotask yellow
  151. keyword whole require yellow
  152. keyword whole setImmediate yellow
  153. keyword whole setInterval yellow
  154. keyword whole setTimeout yellow
  155. keyword whole structuredClone yellow
  156. keyword whole unescape yellow
  157. #=========================
  158. # Constants
  159. keyword whole true brightgreen
  160. keyword whole false brightgreen
  161. keyword whole null brightgreen
  162. keyword whole undefined yellow
  163. keyword whole NaN yellow
  164. keyword whole __dirname yellow
  165. keyword whole __filename yellow
  166. #=========================
  167. # Comments
  168. keyword /\* brown
  169. keyword \*/ brown
  170. keyword // brown
  171. #=========================
  172. # Numbers
  173. wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.
  174. keyword whole 0\{xX\}\{0123456789abcdefABCDEF\}\[0123456789abcdefABCDEF\] brightgreen
  175. keyword whole \{0123456789\}\[0123456789\] brightgreen
  176. keyword whole \[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen
  177. keyword whole \{0123456789\}\[0123456789\]\.\[0123456789\] brightgreen
  178. keyword whole \{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
  179. keyword whole \{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
  180. keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
  181. keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
  182. #=========================
  183. # Special symbols
  184. keyword => brightcyan
  185. keyword \. yellow
  186. keyword \* yellow
  187. keyword \+ yellow
  188. keyword - yellow
  189. keyword / yellow
  190. keyword % yellow
  191. keyword = yellow
  192. keyword ! yellow
  193. keyword & yellow
  194. keyword | yellow
  195. keyword ^ yellow
  196. keyword ~ yellow
  197. keyword > yellow
  198. keyword < yellow
  199. #=========================
  200. # Separators
  201. keyword { brightcyan
  202. keyword } brightcyan
  203. keyword ( brightcyan
  204. keyword ) brightcyan
  205. keyword [ brightcyan
  206. keyword ] brightcyan
  207. keyword , brightcyan
  208. keyword ? brightcyan
  209. keyword : brightcyan
  210. keyword ; brightmagenta
  211. #=============================
  212. # Comments
  213. context exclusive /\* \*/ brown
  214. spellcheck
  215. keyword whole BUG brightred
  216. keyword whole FixMe brightred
  217. keyword whole FIXME brightred
  218. keyword whole Note brightred
  219. keyword whole NOTE brightred
  220. keyword whole ToDo brightred
  221. keyword whole TODO brightred
  222. keyword !!\[!\] brightred
  223. keyword ??\[?\] brightred
  224. context exclusive // \n brown
  225. spellcheck
  226. keyword whole BUG brightred
  227. keyword whole FixMe brightred
  228. keyword whole FIXME brightred
  229. keyword whole Note brightred
  230. keyword whole NOTE brightred
  231. keyword whole ToDo brightred
  232. keyword whole TODO brightred
  233. keyword !!\[!\] brightred
  234. keyword ??\[?\] brightred
  235. #=============================
  236. # Strings
  237. context " " green
  238. spellcheck
  239. keyword \\\{\\'"abtnvfr\} brightgreen
  240. keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
  241. keyword ' brightgreen
  242. context ' ' green
  243. spellcheck
  244. keyword \\\{\\'"abtnvfr\} brightgreen
  245. keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
  246. keyword " brightgreen
  247. context ` ` green
  248. spellcheck
  249. keyword \\\{\\'"abtnvfr\} brightgreen
  250. keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
  251. keyword ${*} yellow