js.syntax 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. #
  2. # JavaScript syntax highlighting
  3. # for MC Editor/CoolEdit
  4. #
  5. # Author: Vlad Romanenko <VladRomanenko@ukr.net>
  6. # Based on c.syntax
  7. #
  8. # TODO:
  9. # Highlight JS regexpressions /../
  10. # More built-in functions
  11. #
  12. # 2002-09-17 Vlad Romanenko <VladRomanenko@ukr.net>
  13. # * More C and Java consistency by Pavel Roskin <proski@gnu.org>.
  14. # * Advanced number highlighting.
  15. #
  16. # 2002-09-16 Vlad Romanenko <VladRomanenko@ukr.net>
  17. # * Initial public release.
  18. #
  19. context default
  20. #=========================
  21. # Keywords
  22. keyword whole arguments yellow
  23. keyword whole break yellow
  24. keyword whole caller yellow
  25. keyword whole case yellow
  26. keyword whole catch yellow
  27. keyword whole constructor yellow
  28. keyword whole continue yellow
  29. keyword whole else yellow
  30. keyword whole default yellow
  31. keyword whole delete yellow
  32. keyword whole for yellow
  33. keyword whole function yellow
  34. keyword whole if yellow
  35. keyword whole in yellow
  36. keyword whole instanceof yellow
  37. keyword whole new yellow
  38. keyword whole prototype yellow
  39. keyword whole return yellow
  40. keyword whole switch yellow
  41. keyword whole this yellow
  42. keyword whole throw yellow
  43. keyword whole try yellow
  44. keyword whole typeof yellow
  45. keyword whole var yellow
  46. keyword whole while yellow
  47. keyword whole with yellow
  48. #=========================
  49. # Objects
  50. keyword whole ActiveXObject yellow
  51. keyword whole Array yellow
  52. keyword whole Boolean yellow
  53. keyword whole Date yellow
  54. keyword whole Dictionary yellow
  55. keyword whole Enumerator yellow
  56. keyword whole FileSystemObject yellow
  57. keyword whole Function yellow
  58. keyword whole Global yellow
  59. keyword whole Image yellow
  60. keyword whole Math yellow
  61. keyword whole Number yellow
  62. keyword whole Object yellow
  63. keyword whole TextStream yellow
  64. keyword whole RegExp yellow
  65. keyword whole VBArray yellow
  66. #=========================
  67. # Most common functions
  68. keyword whole alert yellow
  69. keyword whole escape yellow
  70. keyword whole eval yellow
  71. keyword whole indexOf yellow
  72. keyword whole isNaN yellow
  73. keyword whole toString yellow
  74. keyword whole unescape yellow
  75. keyword whole valueOf yellow
  76. #=========================
  77. # Constants
  78. keyword whole false brightgreen
  79. keyword whole null brightgreen
  80. keyword whole true brightgreen
  81. keyword whole undefined yellow
  82. #=========================
  83. # Comments
  84. keyword /\* brown
  85. keyword \*/ brown
  86. keyword // brown
  87. #=========================
  88. # Numbers
  89. wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.
  90. keyword whole 0\{xX\}\{0123456789abcdefABCDEF\}\[0123456789abcdefABCDEF\] brightgreen
  91. keyword whole \{0123456789\}\[0123456789\] brightgreen
  92. keyword whole \[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen
  93. keyword whole \{0123456789\}\[0123456789\]\.\[0123456789\] brightgreen
  94. keyword whole \{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
  95. keyword whole \{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
  96. keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
  97. keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
  98. #=========================
  99. # Special symbols
  100. keyword \. yellow
  101. keyword \* yellow
  102. keyword \+ yellow
  103. keyword - yellow
  104. keyword / yellow
  105. keyword % yellow
  106. keyword = yellow
  107. keyword ! yellow
  108. keyword & yellow
  109. keyword | yellow
  110. keyword ^ yellow
  111. keyword ~ yellow
  112. keyword > yellow
  113. keyword < yellow
  114. #=========================
  115. # Separators
  116. keyword { brightcyan
  117. keyword } brightcyan
  118. keyword ( brightcyan
  119. keyword ) brightcyan
  120. keyword [ brightcyan
  121. keyword ] brightcyan
  122. keyword , brightcyan
  123. keyword ? brightcyan
  124. keyword : brightcyan
  125. keyword ; brightmagenta
  126. #=============================
  127. # Comments
  128. context exclusive /\* \*/ brown
  129. spellcheck
  130. keyword whole BUG brightred
  131. keyword whole FixMe brightred
  132. keyword whole FIXME brightred
  133. keyword whole Note brightred
  134. keyword whole NOTE brightred
  135. keyword whole ToDo brightred
  136. keyword whole TODO brightred
  137. keyword !!\[!\] brightred
  138. keyword ??\[?\] brightred
  139. context exclusive // \n brown
  140. spellcheck
  141. keyword whole BUG brightred
  142. keyword whole FixMe brightred
  143. keyword whole FIXME brightred
  144. keyword whole Note brightred
  145. keyword whole NOTE brightred
  146. keyword whole ToDo brightred
  147. keyword whole TODO brightred
  148. keyword !!\[!\] brightred
  149. keyword ??\[?\] brightred
  150. #=============================
  151. # Strings
  152. context " " green
  153. spellcheck
  154. keyword \\\{\\'"abtnvfr\} brightgreen
  155. keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
  156. keyword ' brightgreen
  157. context ' ' green
  158. spellcheck
  159. keyword \\\{\\'"abtnvfr\} brightgreen
  160. keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
  161. keyword " brightgreen