javascript.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <?xml version="1.0"?>
  2. <!-- $Id: javascript.xml,v 1.3 2008/01/01 23:43:36 ssttoo Exp $ -->
  3. <highlight lang="javascript" case = "no">
  4. <authors>
  5. <author name="Andrey Demenev" email ="demenev@gmail.com"/>
  6. </authors>
  7. <default innerClass="code" />
  8. <region name="block" delimClass="brackets" innerClass="code" start="\{" end="\}">
  9. <contains all="yes"/>
  10. </region>
  11. <region name="brackets" delimClass="brackets" innerClass="code" start="\(" end="\)">
  12. <contains all="yes"/>
  13. </region>
  14. <region name="sqbrackets" delimClass="brackets" innerClass="code" start="\[" end="\]">
  15. <contains all="yes"/>
  16. </region>
  17. <region name="mlcomment" innerClass="comment" start="\/\*" end="\*\/" >
  18. <contains block="cvstag"/>
  19. </region>
  20. <region name="strdouble" delimClass="quotes" innerClass="string" start="&quot;" end="&quot;"/>
  21. <region name="strsingle" delimClass="quotes" innerClass="string" start="'" end="'" />
  22. <block name="escaped" match="\\\\|\\&quot;|\\'|\\`" innerClass="special" contained="yes">
  23. <onlyin region="strsingle"/>
  24. </block>
  25. <block name="descaped" match="\\\\|\\&quot;|\\'|\\`|\\t|\\n|\\r" innerClass="special" contained="yes">
  26. <onlyin region="strdouble"/>
  27. </block>
  28. <region name="comment" start="\/\/" end="/$/m" innerClass="comment">
  29. <contains block="cvstag"/>
  30. </region>
  31. <block name="identifier" match="[a-z_]\w*" innerClass="identifier" case="no"/>
  32. <block name="number" match="0x\d*|\d*\.?\d+" innerClass="number"/>
  33. <block name="url" match="((https?|ftp):\/\/[\w\?\.\-\&amp;=\/%+]+)|(^|[\s,!?])www\.\w+\.\w+[\w\?\.\&amp;=\/%+]*" innerClass="url" contained="yes">
  34. <onlyin region="mlcomment"/>
  35. <onlyin region="comment"/>
  36. </block>
  37. <block name="email" match="\w+[\.\w\-]+@(\w+[\.\w\-])+" innerClass="url" contained="yes">
  38. <onlyin region="mlcomment"/>
  39. <onlyin region="comment"/>
  40. </block>
  41. <block name="note" match="\b(note|fixme):" innerClass="inlinedoc" contained="yes" case="no">
  42. <onlyin region="mlcomment"/>
  43. <onlyin region="comment"/>
  44. </block>
  45. <block name="cvstag" match="\$\w+:.+\$" innerClass="inlinedoc" contained="yes">
  46. <onlyin region="mlcomment"/>
  47. <onlyin region="comment"/>
  48. </block>
  49. <keywords name="builtin" inherits="identifier" innerClass="builtin" case = "yes">
  50. <keyword match="String"/>
  51. <keyword match="Array"/>
  52. <keyword match="RegExp"/>
  53. <keyword match="Function"/>
  54. <keyword match="Math"/>
  55. <keyword match="Number"/>
  56. <keyword match="Date"/>
  57. <keyword match="Image"/>
  58. <keyword match="window"/>
  59. <keyword match="document"/>
  60. <keyword match="navigator"/>
  61. <keyword match="onAbort"/>
  62. <keyword match="onBlur"/>
  63. <keyword match="onChange"/>
  64. <keyword match="onClick"/>
  65. <keyword match="onDblClick"/>
  66. <keyword match="onDragDrop"/>
  67. <keyword match="onError"/>
  68. <keyword match="onFocus"/>
  69. <keyword match="onKeyDown"/>
  70. <keyword match="onKeyPress"/>
  71. <keyword match="onKeyUp"/>
  72. <keyword match="onLoad"/>
  73. <keyword match="onMouseDown"/>
  74. <keyword match="onMouseOver"/>
  75. <keyword match="onMouseOut"/>
  76. <keyword match="onMouseMove"/>
  77. <keyword match="onMouseUp"/>
  78. <keyword match="onMove"/>
  79. <keyword match="onReset"/>
  80. <keyword match="onResize"/>
  81. <keyword match="onSelect"/>
  82. <keyword match="onSubmit"/>
  83. <keyword match="onUnload"/>
  84. </keywords>
  85. <keywords name="reserved" inherits="identifier" innerClass="reserved" case = "yes">
  86. <keyword match="break"/>
  87. <keyword match="continue"/>
  88. <keyword match="do"/>
  89. <keyword match="while"/>
  90. <keyword match="do"/>
  91. <keyword match="export"/>
  92. <keyword match="for"/>
  93. <keyword match="in"/>
  94. <keyword match="if"/>
  95. <keyword match="else"/>
  96. <keyword match="import"/>
  97. <keyword match="return"/>
  98. <keyword match="label"/>
  99. <keyword match="switch"/>
  100. <keyword match="case"/>
  101. <keyword match="var"/>
  102. <keyword match="with"/>
  103. <keyword match="delete"/>
  104. <keyword match="new"/>
  105. <keyword match="this"/>
  106. <keyword match="typeof"/>
  107. <keyword match="void"/>
  108. <keyword match="abstract"/>
  109. <keyword match="boolean"/>
  110. <keyword match="byte"/>
  111. <keyword match="catch"/>
  112. <keyword match="char"/>
  113. <keyword match="class"/>
  114. <keyword match="const"/>
  115. <keyword match="continue"/>
  116. <keyword match="debugger"/>
  117. <keyword match="default"/>
  118. <keyword match="double"/>
  119. <keyword match="enum"/>
  120. <keyword match="extends"/>
  121. <keyword match="false"/>
  122. <keyword match="final"/>
  123. <keyword match="finally"/>
  124. <keyword match="float"/>
  125. <keyword match="function"/>
  126. <keyword match="implements"/>
  127. <keyword match="goto"/>
  128. <keyword match="in"/>
  129. <keyword match="instanceof"/>
  130. <keyword match="int"/>
  131. <keyword match="interface"/>
  132. <keyword match="long"/>
  133. <keyword match="native"/>
  134. <keyword match="null"/>
  135. <keyword match="package"/>
  136. <keyword match="private"/>
  137. <keyword match="protected"/>
  138. <keyword match="public"/>
  139. <keyword match="short"/>
  140. <keyword match="static"/>
  141. <keyword match="super"/>
  142. <keyword match="synchronized"/>
  143. <keyword match="throw"/>
  144. <keyword match="throws"/>
  145. <keyword match="transient"/>
  146. <keyword match="true"/>
  147. <keyword match="try"/>
  148. <keyword match="volatile"/>
  149. </keywords>
  150. </highlight>