ace-rails-ap 0.0.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. data/lib/ace/rails/version.rb +1 -1
  2. data/vendor/assets/javascripts/ace.js +15680 -1
  3. data/vendor/assets/javascripts/keybinding-emacs.js +367 -1
  4. data/vendor/assets/javascripts/keybinding-vim.js +1635 -1
  5. data/vendor/assets/javascripts/mode-c9search.js +275 -0
  6. data/vendor/assets/javascripts/mode-c_cpp.js +744 -1
  7. data/vendor/assets/javascripts/mode-clojure.js +364 -1
  8. data/vendor/assets/javascripts/mode-coffee.js +527 -1
  9. data/vendor/assets/javascripts/mode-coldfusion.js +1966 -1
  10. data/vendor/assets/javascripts/mode-csharp.js +633 -1
  11. data/vendor/assets/javascripts/mode-css.js +499 -1
  12. data/vendor/assets/javascripts/mode-diff.js +250 -0
  13. data/vendor/assets/javascripts/{mode-c_cpp-uncompressed.js → mode-glsl.js} +147 -244
  14. data/vendor/assets/javascripts/mode-golang.js +681 -1
  15. data/vendor/assets/javascripts/mode-groovy.js +1240 -1
  16. data/vendor/assets/javascripts/mode-haxe.js +633 -1
  17. data/vendor/assets/javascripts/mode-html.js +2064 -1
  18. data/vendor/assets/javascripts/mode-java.js +1202 -1
  19. data/vendor/assets/javascripts/mode-javascript.js +1069 -1
  20. data/vendor/assets/javascripts/mode-json.js +588 -1
  21. data/vendor/assets/javascripts/{mode-haxe-uncompressed.js → mode-jsx.js} +189 -312
  22. data/vendor/assets/javascripts/mode-latex.js +95 -1
  23. data/vendor/assets/javascripts/mode-less.js +512 -1
  24. data/vendor/assets/javascripts/mode-liquid.js +1125 -1
  25. data/vendor/assets/javascripts/mode-lua.js +551 -1
  26. data/vendor/assets/javascripts/{mode-html-uncompressed.js → mode-luahtml.js} +544 -604
  27. data/vendor/assets/javascripts/{mode-coldfusion-uncompressed.js → mode-luapage.js} +2326 -2180
  28. data/vendor/assets/javascripts/mode-markdown.js +2369 -1
  29. data/vendor/assets/javascripts/mode-ocaml.js +464 -1
  30. data/vendor/assets/javascripts/mode-perl.js +432 -1
  31. data/vendor/assets/javascripts/mode-pgsql.js +970 -1
  32. data/vendor/assets/javascripts/mode-php.js +1718 -1
  33. data/vendor/assets/javascripts/mode-powershell.js +610 -1
  34. data/vendor/assets/javascripts/mode-python.js +397 -1
  35. data/vendor/assets/javascripts/mode-ruby.js +318 -1
  36. data/vendor/assets/javascripts/mode-scad.js +732 -1
  37. data/vendor/assets/javascripts/mode-scala.js +1237 -1
  38. data/vendor/assets/javascripts/mode-scss.js +537 -1
  39. data/vendor/assets/javascripts/mode-sh.js +250 -1
  40. data/vendor/assets/javascripts/mode-sql.js +140 -1
  41. data/vendor/assets/javascripts/mode-svg.js +1681 -1
  42. data/vendor/assets/javascripts/mode-tcl.js +320 -0
  43. data/vendor/assets/javascripts/mode-textile.js +182 -1
  44. data/vendor/assets/javascripts/mode-xml.js +829 -1
  45. data/vendor/assets/javascripts/mode-xquery.js +605 -1
  46. data/vendor/assets/javascripts/mode-yaml.js +189 -0
  47. data/vendor/assets/javascripts/theme-chrome.js +213 -1
  48. data/vendor/assets/javascripts/theme-clouds.js +167 -1
  49. data/vendor/assets/javascripts/theme-clouds_midnight.js +168 -1
  50. data/vendor/assets/javascripts/theme-cobalt.js +194 -1
  51. data/vendor/assets/javascripts/theme-crimson_editor.js +200 -1
  52. data/vendor/assets/javascripts/theme-dawn.js +198 -1
  53. data/vendor/assets/javascripts/theme-dreamweaver.js +230 -1
  54. data/vendor/assets/javascripts/theme-eclipse.js +157 -1
  55. data/vendor/assets/javascripts/theme-github.js +182 -0
  56. data/vendor/assets/javascripts/theme-idle_fingers.js +186 -1
  57. data/vendor/assets/javascripts/theme-kr_theme.js +189 -1
  58. data/vendor/assets/javascripts/theme-merbivore.js +189 -1
  59. data/vendor/assets/javascripts/theme-merbivore_soft.js +195 -1
  60. data/vendor/assets/javascripts/theme-mono_industrial.js +197 -1
  61. data/vendor/assets/javascripts/theme-monokai.js +194 -1
  62. data/vendor/assets/javascripts/theme-pastel_on_dark.js +199 -1
  63. data/vendor/assets/javascripts/theme-solarized_dark.js +180 -1
  64. data/vendor/assets/javascripts/theme-solarized_light.js +179 -1
  65. data/vendor/assets/javascripts/theme-textmate.js +216 -0
  66. data/vendor/assets/javascripts/theme-tomorrow.js +213 -1
  67. data/vendor/assets/javascripts/theme-tomorrow_night.js +213 -1
  68. data/vendor/assets/javascripts/theme-tomorrow_night_blue.js +213 -1
  69. data/vendor/assets/javascripts/theme-tomorrow_night_bright.js +213 -1
  70. data/vendor/assets/javascripts/theme-tomorrow_night_eighties.js +209 -1
  71. data/vendor/assets/javascripts/theme-twilight.js +211 -1
  72. data/vendor/assets/javascripts/theme-vibrant_ink.js +190 -1
  73. data/vendor/assets/javascripts/worker-coffee.js +83 -893
  74. data/vendor/assets/javascripts/worker-css.js +88 -1402
  75. data/vendor/assets/javascripts/worker-javascript.js +97 -812
  76. data/vendor/assets/javascripts/worker-json.js +84 -761
  77. data/vendor/assets/javascripts/worker-xquery.js +66464 -0
  78. metadata +12 -195
  79. data/vendor/assets/javascripts/ace-compat-noconflict.js +0 -1
  80. data/vendor/assets/javascripts/ace-compat-uncompressed-noconflict.js +0 -480
  81. data/vendor/assets/javascripts/ace-compat-uncompressed.js +0 -480
  82. data/vendor/assets/javascripts/ace-compat.js +0 -1
  83. data/vendor/assets/javascripts/ace-noconflict.js +0 -10
  84. data/vendor/assets/javascripts/ace-uncompressed-noconflict.js +0 -19976
  85. data/vendor/assets/javascripts/ace-uncompressed.js +0 -19976
  86. data/vendor/assets/javascripts/keybinding-emacs-noconflict.js +0 -1
  87. data/vendor/assets/javascripts/keybinding-emacs-uncompressed-noconflict.js +0 -150
  88. data/vendor/assets/javascripts/keybinding-emacs-uncompressed.js +0 -150
  89. data/vendor/assets/javascripts/keybinding-vim-noconflict.js +0 -1
  90. data/vendor/assets/javascripts/keybinding-vim-uncompressed-noconflict.js +0 -138
  91. data/vendor/assets/javascripts/keybinding-vim-uncompressed.js +0 -138
  92. data/vendor/assets/javascripts/mode-c_cpp-noconflict.js +0 -1
  93. data/vendor/assets/javascripts/mode-c_cpp-uncompressed-noconflict.js +0 -919
  94. data/vendor/assets/javascripts/mode-clojure-noconflict.js +0 -1
  95. data/vendor/assets/javascripts/mode-clojure-uncompressed-noconflict.js +0 -422
  96. data/vendor/assets/javascripts/mode-clojure-uncompressed.js +0 -422
  97. data/vendor/assets/javascripts/mode-coffee-noconflict.js +0 -1
  98. data/vendor/assets/javascripts/mode-coffee-uncompressed-noconflict.js +0 -607
  99. data/vendor/assets/javascripts/mode-coffee-uncompressed.js +0 -607
  100. data/vendor/assets/javascripts/mode-coldfusion-noconflict.js +0 -1
  101. data/vendor/assets/javascripts/mode-coldfusion-uncompressed-noconflict.js +0 -2458
  102. data/vendor/assets/javascripts/mode-csharp-noconflict.js +0 -1
  103. data/vendor/assets/javascripts/mode-csharp-uncompressed-noconflict.js +0 -769
  104. data/vendor/assets/javascripts/mode-csharp-uncompressed.js +0 -769
  105. data/vendor/assets/javascripts/mode-css-noconflict.js +0 -1
  106. data/vendor/assets/javascripts/mode-css-uncompressed-noconflict.js +0 -641
  107. data/vendor/assets/javascripts/mode-css-uncompressed.js +0 -641
  108. data/vendor/assets/javascripts/mode-golang-noconflict.js +0 -1
  109. data/vendor/assets/javascripts/mode-golang-uncompressed-noconflict.js +0 -378
  110. data/vendor/assets/javascripts/mode-golang-uncompressed.js +0 -378
  111. data/vendor/assets/javascripts/mode-groovy-noconflict.js +0 -1
  112. data/vendor/assets/javascripts/mode-groovy-uncompressed-noconflict.js +0 -1393
  113. data/vendor/assets/javascripts/mode-groovy-uncompressed.js +0 -1393
  114. data/vendor/assets/javascripts/mode-haxe-noconflict.js +0 -1
  115. data/vendor/assets/javascripts/mode-haxe-uncompressed-noconflict.js +0 -769
  116. data/vendor/assets/javascripts/mode-html-noconflict.js +0 -1
  117. data/vendor/assets/javascripts/mode-html-uncompressed-noconflict.js +0 -2475
  118. data/vendor/assets/javascripts/mode-java-noconflict.js +0 -1
  119. data/vendor/assets/javascripts/mode-java-uncompressed-noconflict.js +0 -1395
  120. data/vendor/assets/javascripts/mode-java-uncompressed.js +0 -1395
  121. data/vendor/assets/javascripts/mode-javascript-noconflict.js +0 -1
  122. data/vendor/assets/javascripts/mode-javascript-uncompressed-noconflict.js +0 -1226
  123. data/vendor/assets/javascripts/mode-javascript-uncompressed.js +0 -1226
  124. data/vendor/assets/javascripts/mode-json-noconflict.js +0 -1
  125. data/vendor/assets/javascripts/mode-json-uncompressed-noconflict.js +0 -701
  126. data/vendor/assets/javascripts/mode-json-uncompressed.js +0 -701
  127. data/vendor/assets/javascripts/mode-latex-noconflict.js +0 -1
  128. data/vendor/assets/javascripts/mode-latex-uncompressed-noconflict.js +0 -95
  129. data/vendor/assets/javascripts/mode-latex-uncompressed.js +0 -95
  130. data/vendor/assets/javascripts/mode-less-noconflict.js +0 -1
  131. data/vendor/assets/javascripts/mode-less-uncompressed-noconflict.js +0 -655
  132. data/vendor/assets/javascripts/mode-less-uncompressed.js +0 -655
  133. data/vendor/assets/javascripts/mode-liquid-noconflict.js +0 -1
  134. data/vendor/assets/javascripts/mode-liquid-uncompressed-noconflict.js +0 -1353
  135. data/vendor/assets/javascripts/mode-liquid-uncompressed.js +0 -1353
  136. data/vendor/assets/javascripts/mode-lua-noconflict.js +0 -1
  137. data/vendor/assets/javascripts/mode-lua-uncompressed-noconflict.js +0 -523
  138. data/vendor/assets/javascripts/mode-lua-uncompressed.js +0 -523
  139. data/vendor/assets/javascripts/mode-markdown-noconflict.js +0 -1
  140. data/vendor/assets/javascripts/mode-markdown-uncompressed-noconflict.js +0 -2925
  141. data/vendor/assets/javascripts/mode-markdown-uncompressed.js +0 -2925
  142. data/vendor/assets/javascripts/mode-ocaml-noconflict.js +0 -1
  143. data/vendor/assets/javascripts/mode-ocaml-uncompressed-noconflict.js +0 -539
  144. data/vendor/assets/javascripts/mode-ocaml-uncompressed.js +0 -539
  145. data/vendor/assets/javascripts/mode-perl-noconflict.js +0 -1
  146. data/vendor/assets/javascripts/mode-perl-uncompressed-noconflict.js +0 -574
  147. data/vendor/assets/javascripts/mode-perl-uncompressed.js +0 -574
  148. data/vendor/assets/javascripts/mode-pgsql-noconflict.js +0 -1
  149. data/vendor/assets/javascripts/mode-pgsql-uncompressed-noconflict.js +0 -1104
  150. data/vendor/assets/javascripts/mode-pgsql-uncompressed.js +0 -1104
  151. data/vendor/assets/javascripts/mode-php-noconflict.js +0 -1
  152. data/vendor/assets/javascripts/mode-php-uncompressed-noconflict.js +0 -1885
  153. data/vendor/assets/javascripts/mode-php-uncompressed.js +0 -1885
  154. data/vendor/assets/javascripts/mode-powershell-noconflict.js +0 -1
  155. data/vendor/assets/javascripts/mode-powershell-uncompressed-noconflict.js +0 -710
  156. data/vendor/assets/javascripts/mode-powershell-uncompressed.js +0 -710
  157. data/vendor/assets/javascripts/mode-python-noconflict.js +0 -1
  158. data/vendor/assets/javascripts/mode-python-uncompressed-noconflict.js +0 -507
  159. data/vendor/assets/javascripts/mode-python-uncompressed.js +0 -507
  160. data/vendor/assets/javascripts/mode-ruby-noconflict.js +0 -1
  161. data/vendor/assets/javascripts/mode-ruby-uncompressed-noconflict.js +0 -391
  162. data/vendor/assets/javascripts/mode-ruby-uncompressed.js +0 -391
  163. data/vendor/assets/javascripts/mode-scad-noconflict.js +0 -1
  164. data/vendor/assets/javascripts/mode-scad-uncompressed-noconflict.js +0 -907
  165. data/vendor/assets/javascripts/mode-scad-uncompressed.js +0 -907
  166. data/vendor/assets/javascripts/mode-scala-noconflict.js +0 -1
  167. data/vendor/assets/javascripts/mode-scala-uncompressed-noconflict.js +0 -1395
  168. data/vendor/assets/javascripts/mode-scala-uncompressed.js +0 -1395
  169. data/vendor/assets/javascripts/mode-scss-noconflict.js +0 -1
  170. data/vendor/assets/javascripts/mode-scss-uncompressed-noconflict.js +0 -679
  171. data/vendor/assets/javascripts/mode-scss-uncompressed.js +0 -679
  172. data/vendor/assets/javascripts/mode-sh-noconflict.js +0 -1
  173. data/vendor/assets/javascripts/mode-sh-uncompressed-noconflict.js +0 -289
  174. data/vendor/assets/javascripts/mode-sh-uncompressed.js +0 -289
  175. data/vendor/assets/javascripts/mode-sql-noconflict.js +0 -1
  176. data/vendor/assets/javascripts/mode-sql-uncompressed-noconflict.js +0 -159
  177. data/vendor/assets/javascripts/mode-sql-uncompressed.js +0 -159
  178. data/vendor/assets/javascripts/mode-svg-noconflict.js +0 -1
  179. data/vendor/assets/javascripts/mode-svg-uncompressed-noconflict.js +0 -2137
  180. data/vendor/assets/javascripts/mode-svg-uncompressed.js +0 -2137
  181. data/vendor/assets/javascripts/mode-text-noconflict.js +0 -0
  182. data/vendor/assets/javascripts/mode-text-uncompressed-noconflict.js +0 -0
  183. data/vendor/assets/javascripts/mode-text-uncompressed.js +0 -0
  184. data/vendor/assets/javascripts/mode-textile-noconflict.js +0 -1
  185. data/vendor/assets/javascripts/mode-textile-uncompressed-noconflict.js +0 -254
  186. data/vendor/assets/javascripts/mode-textile-uncompressed.js +0 -254
  187. data/vendor/assets/javascripts/mode-xml-noconflict.js +0 -1
  188. data/vendor/assets/javascripts/mode-xml-uncompressed-noconflict.js +0 -1012
  189. data/vendor/assets/javascripts/mode-xml-uncompressed.js +0 -1012
  190. data/vendor/assets/javascripts/mode-xquery-noconflict.js +0 -1
  191. data/vendor/assets/javascripts/mode-xquery-uncompressed-noconflict.js +0 -540
  192. data/vendor/assets/javascripts/mode-xquery-uncompressed.js +0 -540
  193. data/vendor/assets/javascripts/theme-chrome-noconflict.js +0 -1
  194. data/vendor/assets/javascripts/theme-chrome-uncompressed-noconflict.js +0 -207
  195. data/vendor/assets/javascripts/theme-chrome-uncompressed.js +0 -207
  196. data/vendor/assets/javascripts/theme-clouds-noconflict.js +0 -1
  197. data/vendor/assets/javascripts/theme-clouds-uncompressed-noconflict.js +0 -160
  198. data/vendor/assets/javascripts/theme-clouds-uncompressed.js +0 -160
  199. data/vendor/assets/javascripts/theme-clouds_midnight-noconflict.js +0 -1
  200. data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed-noconflict.js +0 -161
  201. data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed.js +0 -161
  202. data/vendor/assets/javascripts/theme-cobalt-noconflict.js +0 -1
  203. data/vendor/assets/javascripts/theme-cobalt-uncompressed-noconflict.js +0 -187
  204. data/vendor/assets/javascripts/theme-cobalt-uncompressed.js +0 -187
  205. data/vendor/assets/javascripts/theme-crimson_editor-noconflict.js +0 -1
  206. data/vendor/assets/javascripts/theme-crimson_editor-uncompressed-noconflict.js +0 -198
  207. data/vendor/assets/javascripts/theme-crimson_editor-uncompressed.js +0 -198
  208. data/vendor/assets/javascripts/theme-dawn-noconflict.js +0 -1
  209. data/vendor/assets/javascripts/theme-dawn-uncompressed-noconflict.js +0 -191
  210. data/vendor/assets/javascripts/theme-dawn-uncompressed.js +0 -191
  211. data/vendor/assets/javascripts/theme-dreamweaver-noconflict.js +0 -1
  212. data/vendor/assets/javascripts/theme-dreamweaver-uncompressed-noconflict.js +0 -227
  213. data/vendor/assets/javascripts/theme-dreamweaver-uncompressed.js +0 -227
  214. data/vendor/assets/javascripts/theme-eclipse-noconflict.js +0 -1
  215. data/vendor/assets/javascripts/theme-eclipse-uncompressed-noconflict.js +0 -147
  216. data/vendor/assets/javascripts/theme-eclipse-uncompressed.js +0 -147
  217. data/vendor/assets/javascripts/theme-idle_fingers-noconflict.js +0 -1
  218. data/vendor/assets/javascripts/theme-idle_fingers-uncompressed-noconflict.js +0 -179
  219. data/vendor/assets/javascripts/theme-idle_fingers-uncompressed.js +0 -179
  220. data/vendor/assets/javascripts/theme-kr_theme-noconflict.js +0 -1
  221. data/vendor/assets/javascripts/theme-kr_theme-uncompressed-noconflict.js +0 -182
  222. data/vendor/assets/javascripts/theme-kr_theme-uncompressed.js +0 -182
  223. data/vendor/assets/javascripts/theme-merbivore-noconflict.js +0 -1
  224. data/vendor/assets/javascripts/theme-merbivore-uncompressed-noconflict.js +0 -182
  225. data/vendor/assets/javascripts/theme-merbivore-uncompressed.js +0 -182
  226. data/vendor/assets/javascripts/theme-merbivore_soft-noconflict.js +0 -1
  227. data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed-noconflict.js +0 -188
  228. data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed.js +0 -188
  229. data/vendor/assets/javascripts/theme-mono_industrial-noconflict.js +0 -1
  230. data/vendor/assets/javascripts/theme-mono_industrial-uncompressed-noconflict.js +0 -190
  231. data/vendor/assets/javascripts/theme-mono_industrial-uncompressed.js +0 -190
  232. data/vendor/assets/javascripts/theme-monokai-noconflict.js +0 -1
  233. data/vendor/assets/javascripts/theme-monokai-uncompressed-noconflict.js +0 -191
  234. data/vendor/assets/javascripts/theme-monokai-uncompressed.js +0 -191
  235. data/vendor/assets/javascripts/theme-pastel_on_dark-noconflict.js +0 -1
  236. data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed-noconflict.js +0 -192
  237. data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed.js +0 -192
  238. data/vendor/assets/javascripts/theme-solarized_dark-noconflict.js +0 -1
  239. data/vendor/assets/javascripts/theme-solarized_dark-uncompressed-noconflict.js +0 -176
  240. data/vendor/assets/javascripts/theme-solarized_dark-uncompressed.js +0 -176
  241. data/vendor/assets/javascripts/theme-solarized_light-noconflict.js +0 -1
  242. data/vendor/assets/javascripts/theme-solarized_light-uncompressed-noconflict.js +0 -172
  243. data/vendor/assets/javascripts/theme-solarized_light-uncompressed.js +0 -172
  244. data/vendor/assets/javascripts/theme-textmate-noconflict.js +0 -0
  245. data/vendor/assets/javascripts/theme-textmate-uncompressed-noconflict.js +0 -0
  246. data/vendor/assets/javascripts/theme-textmate-uncompressed.js +0 -0
  247. data/vendor/assets/javascripts/theme-tomorrow-noconflict.js +0 -1
  248. data/vendor/assets/javascripts/theme-tomorrow-uncompressed-noconflict.js +0 -206
  249. data/vendor/assets/javascripts/theme-tomorrow-uncompressed.js +0 -206
  250. data/vendor/assets/javascripts/theme-tomorrow_night-noconflict.js +0 -1
  251. data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed-noconflict.js +0 -206
  252. data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed.js +0 -206
  253. data/vendor/assets/javascripts/theme-tomorrow_night_blue-noconflict.js +0 -1
  254. data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed-noconflict.js +0 -209
  255. data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed.js +0 -209
  256. data/vendor/assets/javascripts/theme-tomorrow_night_bright-noconflict.js +0 -1
  257. data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed-noconflict.js +0 -206
  258. data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed.js +0 -206
  259. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-noconflict.js +0 -1
  260. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed-noconflict.js +0 -202
  261. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed.js +0 -202
  262. data/vendor/assets/javascripts/theme-twilight-noconflict.js +0 -1
  263. data/vendor/assets/javascripts/theme-twilight-uncompressed-noconflict.js +0 -204
  264. data/vendor/assets/javascripts/theme-twilight-uncompressed.js +0 -204
  265. data/vendor/assets/javascripts/theme-vibrant_ink-noconflict.js +0 -1
  266. data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed-noconflict.js +0 -183
  267. data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed.js +0 -183
@@ -1,42 +1,28 @@
1
- /* ***** BEGIN LICENSE BLOCK *****
2
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3
- *
4
- * The contents of this file are subject to the Mozilla Public License Version
5
- * 1.1 (the "License"); you may not use this file except in compliance with
6
- * the License. You may obtain a copy of the License at
7
- * http://www.mozilla.org/MPL/
8
- *
9
- * Software distributed under the License is distributed on an "AS IS" basis,
10
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
- * for the specific language governing rights and limitations under the
12
- * License.
13
- *
14
- * The Original Code is Ajax.org Code Editor (ACE).
15
- *
16
- * The Initial Developer of the Original Code is
17
- * Ajax.org B.V.
18
- * Portions created by the Initial Developer are Copyright (C) 2010
19
- * the Initial Developer. All Rights Reserved.
20
- *
21
- * Contributor(s):
22
- * Fabian Jakobs <fabian AT ajax DOT org>
23
- *
24
- * Alternatively, the contents of this file may be used under the terms of
25
- * either the GNU General Public License Version 2 or later (the "GPL"), or
26
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27
- * in which case the provisions of the GPL or the LGPL are applicable instead
28
- * of those above. If you wish to allow use of your version of this file only
29
- * under the terms of either the GPL or the LGPL, and not to allow others to
30
- * use your version of this file under the terms of the MPL, indicate your
31
- * decision by deleting the provisions above and replace them with the notice
32
- * and other provisions required by the GPL or the LGPL. If you do not delete
33
- * the provisions above, a recipient may use your version of this file under
34
- * the terms of any one of the MPL, the GPL or the LGPL.
35
- *
36
- * ***** END LICENSE BLOCK ***** */
1
+ define('ace/mode/luahtml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/mode/lua', 'ace/tokenizer', 'ace/mode/luahtml_highlight_rules'], function(require, exports, module) {
2
+
3
+
4
+ var oop = require("../lib/oop");
5
+ var HtmlMode = require("./html").Mode;
6
+ var LuaMode = require("./lua").Mode;
7
+ var Tokenizer = require("../tokenizer").Tokenizer;
8
+ var LuaHtmlHighlightRules = require("./luahtml_highlight_rules").LuaHtmlHighlightRules;
9
+
10
+ var Mode = function() {
11
+ var highlighter = new LuaHtmlHighlightRules();
12
+
13
+ this.$tokenizer = new Tokenizer(new LuaHtmlHighlightRules().getRules());
14
+ this.$embeds = highlighter.getEmbeds();
15
+ this.createModeDelegates({
16
+ "lua-": LuaMode
17
+ });
18
+ };
19
+ oop.inherits(Mode, HtmlMode);
20
+
21
+ exports.Mode = Mode;
22
+ });
37
23
 
38
24
  define('ace/mode/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/html'], function(require, exports, module) {
39
- "use strict";
25
+
40
26
 
41
27
  var oop = require("../lib/oop");
42
28
  var TextMode = require("./text").Mode;
@@ -81,45 +67,9 @@ oop.inherits(Mode, TextMode);
81
67
 
82
68
  exports.Mode = Mode;
83
69
  });
84
- /* ***** BEGIN LICENSE BLOCK *****
85
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
86
- *
87
- * The contents of this file are subject to the Mozilla Public License Version
88
- * 1.1 (the "License"); you may not use this file except in compliance with
89
- * the License. You may obtain a copy of the License at
90
- * http://www.mozilla.org/MPL/
91
- *
92
- * Software distributed under the License is distributed on an "AS IS" basis,
93
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
94
- * for the specific language governing rights and limitations under the
95
- * License.
96
- *
97
- * The Original Code is Ajax.org Code Editor (ACE).
98
- *
99
- * The Initial Developer of the Original Code is
100
- * Ajax.org B.V.
101
- * Portions created by the Initial Developer are Copyright (C) 2010
102
- * the Initial Developer. All Rights Reserved.
103
- *
104
- * Contributor(s):
105
- * Fabian Jakobs <fabian AT ajax DOT org>
106
- *
107
- * Alternatively, the contents of this file may be used under the terms of
108
- * either the GNU General Public License Version 2 or later (the "GPL"), or
109
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
110
- * in which case the provisions of the GPL or the LGPL are applicable instead
111
- * of those above. If you wish to allow use of your version of this file only
112
- * under the terms of either the GPL or the LGPL, and not to allow others to
113
- * use your version of this file under the terms of the MPL, indicate your
114
- * decision by deleting the provisions above and replace them with the notice
115
- * and other provisions required by the GPL or the LGPL. If you do not delete
116
- * the provisions above, a recipient may use your version of this file under
117
- * the terms of any one of the MPL, the GPL or the LGPL.
118
- *
119
- * ***** END LICENSE BLOCK ***** */
120
70
 
121
71
  define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
122
- "use strict";
72
+
123
73
 
124
74
  var oop = require("../lib/oop");
125
75
  var TextMode = require("./text").Mode;
@@ -245,46 +195,9 @@ oop.inherits(Mode, TextMode);
245
195
 
246
196
  exports.Mode = Mode;
247
197
  });
248
- /* ***** BEGIN LICENSE BLOCK *****
249
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
250
- *
251
- * The contents of this file are subject to the Mozilla Public License Version
252
- * 1.1 (the "License"); you may not use this file except in compliance with
253
- * the License. You may obtain a copy of the License at
254
- * http://www.mozilla.org/MPL/
255
- *
256
- * Software distributed under the License is distributed on an "AS IS" basis,
257
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
258
- * for the specific language governing rights and limitations under the
259
- * License.
260
- *
261
- * The Original Code is Ajax.org Code Editor (ACE).
262
- *
263
- * The Initial Developer of the Original Code is
264
- * Ajax.org B.V.
265
- * Portions created by the Initial Developer are Copyright (C) 2010
266
- * the Initial Developer. All Rights Reserved.
267
- *
268
- * Contributor(s):
269
- * Fabian Jakobs <fabian AT ajax DOT org>
270
- * Mihai Sucan <mihai DOT sucan AT gmail DOT com>
271
- *
272
- * Alternatively, the contents of this file may be used under the terms of
273
- * either the GNU General Public License Version 2 or later (the "GPL"), or
274
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
275
- * in which case the provisions of the GPL or the LGPL are applicable instead
276
- * of those above. If you wish to allow use of your version of this file only
277
- * under the terms of either the GPL or the LGPL, and not to allow others to
278
- * use your version of this file under the terms of the MPL, indicate your
279
- * decision by deleting the provisions above and replace them with the notice
280
- * and other provisions required by the GPL or the LGPL. If you do not delete
281
- * the provisions above, a recipient may use your version of this file under
282
- * the terms of any one of the MPL, the GPL or the LGPL.
283
- *
284
- * ***** END LICENSE BLOCK ***** */
285
198
 
286
199
  define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
287
- "use strict";
200
+
288
201
 
289
202
  var oop = require("../lib/oop");
290
203
  var lang = require("../lib/lang");
@@ -438,6 +351,22 @@ var JavaScriptHighlightRules = function() {
438
351
  ],
439
352
  regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
440
353
  next: "function_arguments"
354
+ }, { // match stuff like: Sound.play = function play() { }
355
+ token : [
356
+ "storage.type",
357
+ "punctuation.operator",
358
+ "entity.name.function",
359
+ "text",
360
+ "keyword.operator",
361
+ "text",
362
+ "storage.type",
363
+ "text",
364
+ "entity.name.function",
365
+ "text",
366
+ "paren.lparen"
367
+ ],
368
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
369
+ next: "function_arguments"
441
370
  }, { // match regular function like: function myFunc(arg) { }
442
371
  token : [
443
372
  "storage.type",
@@ -700,45 +629,9 @@ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
700
629
 
701
630
  exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
702
631
  });
703
- /* ***** BEGIN LICENSE BLOCK *****
704
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
705
- *
706
- * The contents of this file are subject to the Mozilla Public License Version
707
- * 1.1 (the "License"); you may not use this file except in compliance with
708
- * the License. You may obtain a copy of the License at
709
- * http://www.mozilla.org/MPL/
710
- *
711
- * Software distributed under the License is distributed on an "AS IS" basis,
712
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
713
- * for the specific language governing rights and limitations under the
714
- * License.
715
- *
716
- * The Original Code is Ajax.org Code Editor (ACE).
717
- *
718
- * The Initial Developer of the Original Code is
719
- * Ajax.org B.V.
720
- * Portions created by the Initial Developer are Copyright (C) 2010
721
- * the Initial Developer. All Rights Reserved.
722
- *
723
- * Contributor(s):
724
- * Fabian Jakobs <fabian AT ajax DOT org>
725
- *
726
- * Alternatively, the contents of this file may be used under the terms of
727
- * either the GNU General Public License Version 2 or later (the "GPL"), or
728
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
729
- * in which case the provisions of the GPL or the LGPL are applicable instead
730
- * of those above. If you wish to allow use of your version of this file only
731
- * under the terms of either the GPL or the LGPL, and not to allow others to
732
- * use your version of this file under the terms of the MPL, indicate your
733
- * decision by deleting the provisions above and replace them with the notice
734
- * and other provisions required by the GPL or the LGPL. If you do not delete
735
- * the provisions above, a recipient may use your version of this file under
736
- * the terms of any one of the MPL, the GPL or the LGPL.
737
- *
738
- * ***** END LICENSE BLOCK ***** */
739
632
 
740
633
  define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
741
- "use strict";
634
+
742
635
 
743
636
  var oop = require("../lib/oop");
744
637
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
@@ -793,45 +686,9 @@ DocCommentHighlightRules.getEndRule = function (start) {
793
686
  exports.DocCommentHighlightRules = DocCommentHighlightRules;
794
687
 
795
688
  });
796
- /* ***** BEGIN LICENSE BLOCK *****
797
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
798
- *
799
- * The contents of this file are subject to the Mozilla Public License Version
800
- * 1.1 (the "License"); you may not use this file except in compliance with
801
- * the License. You may obtain a copy of the License at
802
- * http://www.mozilla.org/MPL/
803
- *
804
- * Software distributed under the License is distributed on an "AS IS" basis,
805
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
806
- * for the specific language governing rights and limitations under the
807
- * License.
808
- *
809
- * The Original Code is Ajax.org Code Editor (ACE).
810
- *
811
- * The Initial Developer of the Original Code is
812
- * Ajax.org B.V.
813
- * Portions created by the Initial Developer are Copyright (C) 2010
814
- * the Initial Developer. All Rights Reserved.
815
- *
816
- * Contributor(s):
817
- * Fabian Jakobs <fabian AT ajax DOT org>
818
- *
819
- * Alternatively, the contents of this file may be used under the terms of
820
- * either the GNU General Public License Version 2 or later (the "GPL"), or
821
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
822
- * in which case the provisions of the GPL or the LGPL are applicable instead
823
- * of those above. If you wish to allow use of your version of this file only
824
- * under the terms of either the GPL or the LGPL, and not to allow others to
825
- * use your version of this file under the terms of the MPL, indicate your
826
- * decision by deleting the provisions above and replace them with the notice
827
- * and other provisions required by the GPL or the LGPL. If you do not delete
828
- * the provisions above, a recipient may use your version of this file under
829
- * the terms of any one of the MPL, the GPL or the LGPL.
830
- *
831
- * ***** END LICENSE BLOCK ***** */
832
689
 
833
690
  define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
834
- "use strict";
691
+
835
692
 
836
693
  var Range = require("../range").Range;
837
694
 
@@ -874,49 +731,12 @@ var MatchingBraceOutdent = function() {};
874
731
 
875
732
  exports.MatchingBraceOutdent = MatchingBraceOutdent;
876
733
  });
877
- /* vim:ts=4:sts=4:sw=4:
878
- * ***** BEGIN LICENSE BLOCK *****
879
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
880
- *
881
- * The contents of this file are subject to the Mozilla Public License Version
882
- * 1.1 (the "License"); you may not use this file except in compliance with
883
- * the License. You may obtain a copy of the License at
884
- * http://www.mozilla.org/MPL/
885
- *
886
- * Software distributed under the License is distributed on an "AS IS" basis,
887
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
888
- * for the specific language governing rights and limitations under the
889
- * License.
890
- *
891
- * The Original Code is Ajax.org Code Editor (ACE).
892
- *
893
- * The Initial Developer of the Original Code is
894
- * Ajax.org B.V.
895
- * Portions created by the Initial Developer are Copyright (C) 2010
896
- * the Initial Developer. All Rights Reserved.
897
- *
898
- * Contributor(s):
899
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
900
- *
901
- * Alternatively, the contents of this file may be used under the terms of
902
- * either the GNU General Public License Version 2 or later (the "GPL"), or
903
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
904
- * in which case the provisions of the GPL or the LGPL are applicable instead
905
- * of those above. If you wish to allow use of your version of this file only
906
- * under the terms of either the GPL or the LGPL, and not to allow others to
907
- * use your version of this file under the terms of the MPL, indicate your
908
- * decision by deleting the provisions above and replace them with the notice
909
- * and other provisions required by the GPL or the LGPL. If you do not delete
910
- * the provisions above, a recipient may use your version of this file under
911
- * the terms of any one of the MPL, the GPL or the LGPL.
912
- *
913
- * ***** END LICENSE BLOCK ***** */
914
734
 
915
735
  define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
916
- "use strict";
736
+
917
737
 
918
738
  var oop = require("../../lib/oop");
919
- var Behaviour = require('../behaviour').Behaviour;
739
+ var Behaviour = require("../behaviour").Behaviour;
920
740
 
921
741
  var CstyleBehaviour = function () {
922
742
 
@@ -1044,7 +864,7 @@ var CstyleBehaviour = function () {
1044
864
  }
1045
865
 
1046
866
  // Find what token we're inside.
1047
- var tokens = session.getTokens(selection.start.row, selection.start.row)[0].tokens;
867
+ var tokens = session.getTokens(selection.start.row);
1048
868
  var col = 0, token;
1049
869
  var quotepos = -1; // Track whether we're inside an open quote.
1050
870
 
@@ -1099,45 +919,9 @@ oop.inherits(CstyleBehaviour, Behaviour);
1099
919
 
1100
920
  exports.CstyleBehaviour = CstyleBehaviour;
1101
921
  });
1102
- /* ***** BEGIN LICENSE BLOCK *****
1103
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1104
- *
1105
- * The contents of this file are subject to the Mozilla Public License Version
1106
- * 1.1 (the "License"); you may not use this file except in compliance with
1107
- * the License. You may obtain a copy of the License at
1108
- * http://www.mozilla.org/MPL/
1109
- *
1110
- * Software distributed under the License is distributed on an "AS IS" basis,
1111
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1112
- * for the specific language governing rights and limitations under the
1113
- * License.
1114
- *
1115
- * The Original Code is Ajax.org Code Editor (ACE).
1116
- *
1117
- * The Initial Developer of the Original Code is
1118
- * Ajax.org B.V.
1119
- * Portions created by the Initial Developer are Copyright (C) 2010
1120
- * the Initial Developer. All Rights Reserved.
1121
- *
1122
- * Contributor(s):
1123
- * Fabian Jakobs <fabian AT ajax DOT org>
1124
- *
1125
- * Alternatively, the contents of this file may be used under the terms of
1126
- * either the GNU General Public License Version 2 or later (the "GPL"), or
1127
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1128
- * in which case the provisions of the GPL or the LGPL are applicable instead
1129
- * of those above. If you wish to allow use of your version of this file only
1130
- * under the terms of either the GPL or the LGPL, and not to allow others to
1131
- * use your version of this file under the terms of the MPL, indicate your
1132
- * decision by deleting the provisions above and replace them with the notice
1133
- * and other provisions required by the GPL or the LGPL. If you do not delete
1134
- * the provisions above, a recipient may use your version of this file under
1135
- * the terms of any one of the MPL, the GPL or the LGPL.
1136
- *
1137
- * ***** END LICENSE BLOCK ***** */
1138
922
 
1139
923
  define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
1140
- "use strict";
924
+
1141
925
 
1142
926
  var oop = require("../../lib/oop");
1143
927
  var Range = require("../../range").Range;
@@ -1194,45 +978,9 @@ oop.inherits(FoldMode, BaseFoldMode);
1194
978
  }).call(FoldMode.prototype);
1195
979
 
1196
980
  });
1197
- /* ***** BEGIN LICENSE BLOCK *****
1198
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1199
- *
1200
- * The contents of this file are subject to the Mozilla Public License Version
1201
- * 1.1 (the "License"); you may not use this file except in compliance with
1202
- * the License. You may obtain a copy of the License at
1203
- * http://www.mozilla.org/MPL/
1204
- *
1205
- * Software distributed under the License is distributed on an "AS IS" basis,
1206
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1207
- * for the specific language governing rights and limitations under the
1208
- * License.
1209
- *
1210
- * The Original Code is Ajax.org Code Editor (ACE).
1211
- *
1212
- * The Initial Developer of the Original Code is
1213
- * Ajax.org B.V.
1214
- * Portions created by the Initial Developer are Copyright (C) 2010
1215
- * the Initial Developer. All Rights Reserved.
1216
- *
1217
- * Contributor(s):
1218
- * Fabian Jakobs <fabian AT ajax DOT org>
1219
- *
1220
- * Alternatively, the contents of this file may be used under the terms of
1221
- * either the GNU General Public License Version 2 or later (the "GPL"), or
1222
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1223
- * in which case the provisions of the GPL or the LGPL are applicable instead
1224
- * of those above. If you wish to allow use of your version of this file only
1225
- * under the terms of either the GPL or the LGPL, and not to allow others to
1226
- * use your version of this file under the terms of the MPL, indicate your
1227
- * decision by deleting the provisions above and replace them with the notice
1228
- * and other provisions required by the GPL or the LGPL. If you do not delete
1229
- * the provisions above, a recipient may use your version of this file under
1230
- * the terms of any one of the MPL, the GPL or the LGPL.
1231
- *
1232
- * ***** END LICENSE BLOCK ***** */
1233
981
 
1234
982
  define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
1235
- "use strict";
983
+
1236
984
 
1237
985
  var Range = require("../../range").Range;
1238
986
 
@@ -1287,9 +1035,9 @@ var FoldMode = exports.FoldMode = function() {};
1287
1035
  }
1288
1036
  };
1289
1037
 
1290
- this.openingBracketBlock = function(session, bracket, row, column) {
1038
+ this.openingBracketBlock = function(session, bracket, row, column, typeRe, allowBlankLine) {
1291
1039
  var start = {row: row, column: column + 1};
1292
- var end = session.$findClosingBracket(bracket, start);
1040
+ var end = session.$findClosingBracket(bracket, start, typeRe, allowBlankLine);
1293
1041
  if (!end)
1294
1042
  return;
1295
1043
 
@@ -1307,45 +1055,9 @@ var FoldMode = exports.FoldMode = function() {};
1307
1055
  }).call(FoldMode.prototype);
1308
1056
 
1309
1057
  });
1310
- /* ***** BEGIN LICENSE BLOCK *****
1311
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1312
- *
1313
- * The contents of this file are subject to the Mozilla Public License Version
1314
- * 1.1 (the "License"); you may not use this file except in compliance with
1315
- * the License. You may obtain a copy of the License at
1316
- * http://www.mozilla.org/MPL/
1317
- *
1318
- * Software distributed under the License is distributed on an "AS IS" basis,
1319
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1320
- * for the specific language governing rights and limitations under the
1321
- * License.
1322
- *
1323
- * The Original Code is Ajax.org Code Editor (ACE).
1324
- *
1325
- * The Initial Developer of the Original Code is
1326
- * Ajax.org B.V.
1327
- * Portions created by the Initial Developer are Copyright (C) 2010
1328
- * the Initial Developer. All Rights Reserved.
1329
- *
1330
- * Contributor(s):
1331
- * Fabian Jakobs <fabian AT ajax DOT org>
1332
- *
1333
- * Alternatively, the contents of this file may be used under the terms of
1334
- * either the GNU General Public License Version 2 or later (the "GPL"), or
1335
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1336
- * in which case the provisions of the GPL or the LGPL are applicable instead
1337
- * of those above. If you wish to allow use of your version of this file only
1338
- * under the terms of either the GPL or the LGPL, and not to allow others to
1339
- * use your version of this file under the terms of the MPL, indicate your
1340
- * decision by deleting the provisions above and replace them with the notice
1341
- * and other provisions required by the GPL or the LGPL. If you do not delete
1342
- * the provisions above, a recipient may use your version of this file under
1343
- * the terms of any one of the MPL, the GPL or the LGPL.
1344
- *
1345
- * ***** END LICENSE BLOCK ***** */
1346
1058
 
1347
1059
  define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/folding/cstyle'], function(require, exports, module) {
1348
- "use strict";
1060
+
1349
1061
 
1350
1062
  var oop = require("../lib/oop");
1351
1063
  var TextMode = require("./text").Mode;
@@ -1417,45 +1129,9 @@ oop.inherits(Mode, TextMode);
1417
1129
  exports.Mode = Mode;
1418
1130
 
1419
1131
  });
1420
- /* ***** BEGIN LICENSE BLOCK *****
1421
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1422
- *
1423
- * The contents of this file are subject to the Mozilla Public License Version
1424
- * 1.1 (the "License"); you may not use this file except in compliance with
1425
- * the License. You may obtain a copy of the License at
1426
- * http://www.mozilla.org/MPL/
1427
- *
1428
- * Software distributed under the License is distributed on an "AS IS" basis,
1429
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1430
- * for the specific language governing rights and limitations under the
1431
- * License.
1432
- *
1433
- * The Original Code is Ajax.org Code Editor (ACE).
1434
- *
1435
- * The Initial Developer of the Original Code is
1436
- * Ajax.org B.V.
1437
- * Portions created by the Initial Developer are Copyright (C) 2010
1438
- * the Initial Developer. All Rights Reserved.
1439
- *
1440
- * Contributor(s):
1441
- * Fabian Jakobs <fabian AT ajax DOT org>
1442
- *
1443
- * Alternatively, the contents of this file may be used under the terms of
1444
- * either the GNU General Public License Version 2 or later (the "GPL"), or
1445
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1446
- * in which case the provisions of the GPL or the LGPL are applicable instead
1447
- * of those above. If you wish to allow use of your version of this file only
1448
- * under the terms of either the GPL or the LGPL, and not to allow others to
1449
- * use your version of this file under the terms of the MPL, indicate your
1450
- * decision by deleting the provisions above and replace them with the notice
1451
- * and other provisions required by the GPL or the LGPL. If you do not delete
1452
- * the provisions above, a recipient may use your version of this file under
1453
- * the terms of any one of the MPL, the GPL or the LGPL.
1454
- *
1455
- * ***** END LICENSE BLOCK ***** */
1456
1132
 
1457
1133
  define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1458
- "use strict";
1134
+
1459
1135
 
1460
1136
  var oop = require("../lib/oop");
1461
1137
  var lang = require("../lib/lang");
@@ -1659,45 +1335,9 @@ oop.inherits(CssHighlightRules, TextHighlightRules);
1659
1335
  exports.CssHighlightRules = CssHighlightRules;
1660
1336
 
1661
1337
  });
1662
- /* ***** BEGIN LICENSE BLOCK *****
1663
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1664
- *
1665
- * The contents of this file are subject to the Mozilla Public License Version
1666
- * 1.1 (the "License"); you may not use this file except in compliance with
1667
- * the License. You may obtain a copy of the License at
1668
- * http://www.mozilla.org/MPL/
1669
- *
1670
- * Software distributed under the License is distributed on an "AS IS" basis,
1671
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1672
- * for the specific language governing rights and limitations under the
1673
- * License.
1674
- *
1675
- * The Original Code is Ajax.org Code Editor (ACE).
1676
- *
1677
- * The Initial Developer of the Original Code is
1678
- * Ajax.org B.V.
1679
- * Portions created by the Initial Developer are Copyright (C) 2010
1680
- * the Initial Developer. All Rights Reserved.
1681
- *
1682
- * Contributor(s):
1683
- * Fabian Jakobs <fabian AT ajax DOT org>
1684
- *
1685
- * Alternatively, the contents of this file may be used under the terms of
1686
- * either the GNU General Public License Version 2 or later (the "GPL"), or
1687
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1688
- * in which case the provisions of the GPL or the LGPL are applicable instead
1689
- * of those above. If you wish to allow use of your version of this file only
1690
- * under the terms of either the GPL or the LGPL, and not to allow others to
1691
- * use your version of this file under the terms of the MPL, indicate your
1692
- * decision by deleting the provisions above and replace them with the notice
1693
- * and other provisions required by the GPL or the LGPL. If you do not delete
1694
- * the provisions above, a recipient may use your version of this file under
1695
- * the terms of any one of the MPL, the GPL or the LGPL.
1696
- *
1697
- * ***** END LICENSE BLOCK ***** */
1698
1338
 
1699
1339
  define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1700
- "use strict";
1340
+
1701
1341
 
1702
1342
  var oop = require("../lib/oop");
1703
1343
  var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
@@ -1799,45 +1439,9 @@ oop.inherits(HtmlHighlightRules, TextHighlightRules);
1799
1439
 
1800
1440
  exports.HtmlHighlightRules = HtmlHighlightRules;
1801
1441
  });
1802
- /* ***** BEGIN LICENSE BLOCK *****
1803
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1804
- *
1805
- * The contents of this file are subject to the Mozilla Public License Version
1806
- * 1.1 (the "License"); you may not use this file except in compliance with
1807
- * the License. You may obtain a copy of the License at
1808
- * http://www.mozilla.org/MPL/
1809
- *
1810
- * Software distributed under the License is distributed on an "AS IS" basis,
1811
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1812
- * for the specific language governing rights and limitations under the
1813
- * License.
1814
- *
1815
- * The Original Code is Ajax.org Code Editor (ACE).
1816
- *
1817
- * The Initial Developer of the Original Code is
1818
- * Ajax.org B.V.
1819
- * Portions created by the Initial Developer are Copyright (C) 2010
1820
- * the Initial Developer. All Rights Reserved.
1821
- *
1822
- * Contributor(s):
1823
- * Fabian Jakobs <fabian AT ajax DOT org>
1824
- *
1825
- * Alternatively, the contents of this file may be used under the terms of
1826
- * either the GNU General Public License Version 2 or later (the "GPL"), or
1827
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1828
- * in which case the provisions of the GPL or the LGPL are applicable instead
1829
- * of those above. If you wish to allow use of your version of this file only
1830
- * under the terms of either the GPL or the LGPL, and not to allow others to
1831
- * use your version of this file under the terms of the MPL, indicate your
1832
- * decision by deleting the provisions above and replace them with the notice
1833
- * and other provisions required by the GPL or the LGPL. If you do not delete
1834
- * the provisions above, a recipient may use your version of this file under
1835
- * the terms of any one of the MPL, the GPL or the LGPL.
1836
- *
1837
- * ***** END LICENSE BLOCK ***** */
1838
1442
 
1839
1443
  define('ace/mode/xml_util', ['require', 'exports', 'module' , 'ace/lib/lang'], function(require, exports, module) {
1840
- "use strict";
1444
+
1841
1445
 
1842
1446
  var lang = require("../lib/lang");
1843
1447
 
@@ -1945,46 +1549,9 @@ exports.tag = function(states, name, nextState) {
1945
1549
  };
1946
1550
 
1947
1551
  });
1948
- /* vim:ts=4:sts=4:sw=4:
1949
- * ***** BEGIN LICENSE BLOCK *****
1950
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1951
- *
1952
- * The contents of this file are subject to the Mozilla Public License Version
1953
- * 1.1 (the "License"); you may not use this file except in compliance with
1954
- * the License. You may obtain a copy of the License at
1955
- * http://www.mozilla.org/MPL/
1956
- *
1957
- * Software distributed under the License is distributed on an "AS IS" basis,
1958
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1959
- * for the specific language governing rights and limitations under the
1960
- * License.
1961
- *
1962
- * The Original Code is Ajax.org Code Editor (ACE).
1963
- *
1964
- * The Initial Developer of the Original Code is
1965
- * Ajax.org B.V.
1966
- * Portions created by the Initial Developer are Copyright (C) 2010
1967
- * the Initial Developer. All Rights Reserved.
1968
- *
1969
- * Contributor(s):
1970
- * Chris Spencer <chris.ag.spencer AT googlemail DOT com>
1971
- *
1972
- * Alternatively, the contents of this file may be used under the terms of
1973
- * either the GNU General Public License Version 2 or later (the "GPL"), or
1974
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1975
- * in which case the provisions of the GPL or the LGPL are applicable instead
1976
- * of those above. If you wish to allow use of your version of this file only
1977
- * under the terms of either the GPL or the LGPL, and not to allow others to
1978
- * use your version of this file under the terms of the MPL, indicate your
1979
- * decision by deleting the provisions above and replace them with the notice
1980
- * and other provisions required by the GPL or the LGPL. If you do not delete
1981
- * the provisions above, a recipient may use your version of this file under
1982
- * the terms of any one of the MPL, the GPL or the LGPL.
1983
- *
1984
- * ***** END LICENSE BLOCK ***** */
1985
1552
 
1986
1553
  define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle'], function(require, exports, module) {
1987
- "use strict";
1554
+
1988
1555
 
1989
1556
  var oop = require("../../lib/oop");
1990
1557
  var Behaviour = require("../behaviour").Behaviour;
@@ -2037,45 +1604,9 @@ oop.inherits(XmlBehaviour, Behaviour);
2037
1604
 
2038
1605
  exports.XmlBehaviour = XmlBehaviour;
2039
1606
  });
2040
- /* ***** BEGIN LICENSE BLOCK *****
2041
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2042
- *
2043
- * The contents of this file are subject to the Mozilla Public License Version
2044
- * 1.1 (the "License"); you may not use this file except in compliance with
2045
- * the License. You may obtain a copy of the License at
2046
- * http://www.mozilla.org/MPL/
2047
- *
2048
- * Software distributed under the License is distributed on an "AS IS" basis,
2049
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2050
- * for the specific language governing rights and limitations under the
2051
- * License.
2052
- *
2053
- * The Original Code is Ajax.org Code Editor (ACE).
2054
- *
2055
- * The Initial Developer of the Original Code is
2056
- * Ajax.org B.V.
2057
- * Portions created by the Initial Developer are Copyright (C) 2010
2058
- * the Initial Developer. All Rights Reserved.
2059
- *
2060
- * Contributor(s):
2061
- * Fabian Jakobs <fabian AT ajax DOT org>
2062
- *
2063
- * Alternatively, the contents of this file may be used under the terms of
2064
- * either the GNU General Public License Version 2 or later (the "GPL"), or
2065
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2066
- * in which case the provisions of the GPL or the LGPL are applicable instead
2067
- * of those above. If you wish to allow use of your version of this file only
2068
- * under the terms of either the GPL or the LGPL, and not to allow others to
2069
- * use your version of this file under the terms of the MPL, indicate your
2070
- * decision by deleting the provisions above and replace them with the notice
2071
- * and other provisions required by the GPL or the LGPL. If you do not delete
2072
- * the provisions above, a recipient may use your version of this file under
2073
- * the terms of any one of the MPL, the GPL or the LGPL.
2074
- *
2075
- * ***** END LICENSE BLOCK ***** */
2076
1607
 
2077
1608
  define('ace/mode/folding/html', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
2078
- "use strict";
1609
+
2079
1610
 
2080
1611
  var oop = require("../../lib/oop");
2081
1612
  var MixedFoldMode = require("./mixed").FoldMode;
@@ -2123,45 +1654,9 @@ var FoldMode = exports.FoldMode = function() {
2123
1654
  oop.inherits(FoldMode, MixedFoldMode);
2124
1655
 
2125
1656
  });
2126
- /* ***** BEGIN LICENSE BLOCK *****
2127
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2128
- *
2129
- * The contents of this file are subject to the Mozilla Public License Version
2130
- * 1.1 (the "License"); you may not use this file except in compliance with
2131
- * the License. You may obtain a copy of the License at
2132
- * http://www.mozilla.org/MPL/
2133
- *
2134
- * Software distributed under the License is distributed on an "AS IS" basis,
2135
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2136
- * for the specific language governing rights and limitations under the
2137
- * License.
2138
- *
2139
- * The Original Code is Ajax.org Code Editor (ACE).
2140
- *
2141
- * The Initial Developer of the Original Code is
2142
- * Ajax.org B.V.
2143
- * Portions created by the Initial Developer are Copyright (C) 2010
2144
- * the Initial Developer. All Rights Reserved.
2145
- *
2146
- * Contributor(s):
2147
- * Fabian Jakobs <fabian AT ajax DOT org>
2148
- *
2149
- * Alternatively, the contents of this file may be used under the terms of
2150
- * either the GNU General Public License Version 2 or later (the "GPL"), or
2151
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2152
- * in which case the provisions of the GPL or the LGPL are applicable instead
2153
- * of those above. If you wish to allow use of your version of this file only
2154
- * under the terms of either the GPL or the LGPL, and not to allow others to
2155
- * use your version of this file under the terms of the MPL, indicate your
2156
- * decision by deleting the provisions above and replace them with the notice
2157
- * and other provisions required by the GPL or the LGPL. If you do not delete
2158
- * the provisions above, a recipient may use your version of this file under
2159
- * the terms of any one of the MPL, the GPL or the LGPL.
2160
- *
2161
- * ***** END LICENSE BLOCK ***** */
2162
1657
 
2163
1658
  define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
2164
- "use strict";
1659
+
2165
1660
 
2166
1661
  var oop = require("../../lib/oop");
2167
1662
  var BaseFoldMode = require("./fold_mode").FoldMode;
@@ -2211,45 +1706,9 @@ oop.inherits(FoldMode, BaseFoldMode);
2211
1706
  }).call(FoldMode.prototype);
2212
1707
 
2213
1708
  });
2214
- /* ***** BEGIN LICENSE BLOCK *****
2215
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2216
- *
2217
- * The contents of this file are subject to the Mozilla Public License Version
2218
- * 1.1 (the "License"); you may not use this file except in compliance with
2219
- * the License. You may obtain a copy of the License at
2220
- * http://www.mozilla.org/MPL/
2221
- *
2222
- * Software distributed under the License is distributed on an "AS IS" basis,
2223
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2224
- * for the specific language governing rights and limitations under the
2225
- * License.
2226
- *
2227
- * The Original Code is Ajax.org Code Editor (ACE).
2228
- *
2229
- * The Initial Developer of the Original Code is
2230
- * Ajax.org B.V.
2231
- * Portions created by the Initial Developer are Copyright (C) 2010
2232
- * the Initial Developer. All Rights Reserved.
2233
- *
2234
- * Contributor(s):
2235
- * Fabian Jakobs <fabian AT ajax DOT org>
2236
- *
2237
- * Alternatively, the contents of this file may be used under the terms of
2238
- * either the GNU General Public License Version 2 or later (the "GPL"), or
2239
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2240
- * in which case the provisions of the GPL or the LGPL are applicable instead
2241
- * of those above. If you wish to allow use of your version of this file only
2242
- * under the terms of either the GPL or the LGPL, and not to allow others to
2243
- * use your version of this file under the terms of the MPL, indicate your
2244
- * decision by deleting the provisions above and replace them with the notice
2245
- * and other provisions required by the GPL or the LGPL. If you do not delete
2246
- * the provisions above, a recipient may use your version of this file under
2247
- * the terms of any one of the MPL, the GPL or the LGPL.
2248
- *
2249
- * ***** END LICENSE BLOCK ***** */
2250
1709
 
2251
1710
  define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
2252
- "use strict";
1711
+
2253
1712
 
2254
1713
  var oop = require("../../lib/oop");
2255
1714
  var lang = require("../../lib/lang");
@@ -2284,7 +1743,7 @@ oop.inherits(FoldMode, BaseFoldMode);
2284
1743
  };
2285
1744
 
2286
1745
  this._getFirstTagInLine = function(session, row) {
2287
- var tokens = session.getTokens(row, row)[0].tokens;
1746
+ var tokens = session.getTokens(row);
2288
1747
  var value = "";
2289
1748
  for (var i = 0; i < tokens.length; i++) {
2290
1749
  var token = tokens[i];
@@ -2313,10 +1772,6 @@ oop.inherits(FoldMode, BaseFoldMode);
2313
1772
  column: match[1] ? column + match[1].length : column
2314
1773
  };
2315
1774
  };
2316
-
2317
- /*
2318
- * reads a full tag and places the iterator after the tag
2319
- */
2320
1775
  this._readTagForward = function(iterator) {
2321
1776
  var token = iterator.getCurrentToken();
2322
1777
  if (!token)
@@ -2473,3 +1928,488 @@ oop.inherits(FoldMode, BaseFoldMode);
2473
1928
  }).call(FoldMode.prototype);
2474
1929
 
2475
1930
  });
1931
+
1932
+ define('ace/mode/lua', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lua_highlight_rules'], function(require, exports, module) {
1933
+
1934
+
1935
+ var oop = require("../lib/oop");
1936
+ var TextMode = require("./text").Mode;
1937
+ var Tokenizer = require("../tokenizer").Tokenizer;
1938
+ var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
1939
+
1940
+ var Mode = function() {
1941
+ this.$tokenizer = new Tokenizer(new LuaHighlightRules().getRules());
1942
+ };
1943
+ oop.inherits(Mode, TextMode);
1944
+
1945
+ (function() {
1946
+ this.getNextLineIndent = function(state, line, tab) {
1947
+ var indent = this.$getIndent(line);
1948
+
1949
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
1950
+ var tokens = tokenizedLine.tokens;
1951
+
1952
+ var chunks = ["function", "then", "do", "repeat"];
1953
+
1954
+ if (state == "start") {
1955
+ var match = line.match(/^.*[\{\(\[]\s*$/);
1956
+ if (match) {
1957
+ indent += tab;
1958
+ } else {
1959
+ for (var i in tokens){
1960
+ var token = tokens[i];
1961
+ if (token.type != "keyword") continue;
1962
+ var chunk_i = chunks.indexOf(token.value);
1963
+ if (chunk_i != -1){
1964
+ indent += tab;
1965
+ break;
1966
+ }
1967
+ }
1968
+ }
1969
+ }
1970
+
1971
+ return indent;
1972
+ };
1973
+
1974
+ }).call(Mode.prototype);
1975
+
1976
+ exports.Mode = Mode;
1977
+ });
1978
+
1979
+ define('ace/mode/lua_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1980
+
1981
+
1982
+ var oop = require("../lib/oop");
1983
+ var lang = require("../lib/lang");
1984
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1985
+
1986
+ var LuaHighlightRules = function() {
1987
+
1988
+ var keywords = lang.arrayToMap(
1989
+ ("break|do|else|elseif|end|for|function|if|in|local|repeat|"+
1990
+ "return|then|until|while|or|and|not").split("|")
1991
+ );
1992
+
1993
+ var builtinConstants = lang.arrayToMap(
1994
+ ("true|false|nil|_G|_VERSION").split("|")
1995
+ );
1996
+
1997
+ var builtinFunctions = lang.arrayToMap(
1998
+ ("string|xpcall|package|tostring|print|os|unpack|require|"+
1999
+ "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+
2000
+ "collectgarbage|getmetatable|module|rawset|math|debug|"+
2001
+ "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+
2002
+ "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+
2003
+ "load|error|loadfile|"+
2004
+
2005
+ "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+
2006
+ "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+
2007
+ "loaders|cpath|config|path|seeall|exit|setlocale|date|"+
2008
+ "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+
2009
+ "lines|write|close|flush|open|output|type|read|stderr|"+
2010
+ "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+
2011
+ "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+
2012
+ "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+
2013
+ "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+
2014
+ "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+
2015
+ "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+
2016
+ "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+
2017
+ "status|wrap|create|running").split("|")
2018
+ );
2019
+
2020
+ var stdLibaries = lang.arrayToMap(
2021
+ ("string|package|os|io|math|debug|table|coroutine").split("|")
2022
+ );
2023
+
2024
+ var metatableMethods = lang.arrayToMap(
2025
+ ("__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+
2026
+ "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber").split("|")
2027
+ );
2028
+
2029
+ var futureReserved = lang.arrayToMap(
2030
+ ("").split("|")
2031
+ );
2032
+
2033
+ var deprecatedIn5152 = lang.arrayToMap(
2034
+ ("setn|foreach|foreachi|gcinfo|log10|maxn").split("|")
2035
+ );
2036
+
2037
+ var strPre = "";
2038
+
2039
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
2040
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
2041
+ var integer = "(?:" + decimalInteger + "|" + hexInteger + ")";
2042
+
2043
+ var fraction = "(?:\\.\\d+)";
2044
+ var intPart = "(?:\\d+)";
2045
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
2046
+ var floatNumber = "(?:" + pointFloat + ")";
2047
+
2048
+ var comment_stack = [];
2049
+
2050
+ this.$rules = {
2051
+ "start" :
2052
+
2053
+
2054
+ // bracketed comments
2055
+ [{
2056
+ token : "comment", // --[[ comment
2057
+ regex : strPre + '\\-\\-\\[\\[.*\\]\\]'
2058
+ }, {
2059
+ token : "comment", // --[=[ comment
2060
+ regex : strPre + '\\-\\-\\[\\=\\[.*\\]\\=\\]'
2061
+ }, {
2062
+ token : "comment", // --[==[ comment
2063
+ regex : strPre + '\\-\\-\\[\\={2}\\[.*\\]\\={2}\\]'
2064
+ }, {
2065
+ token : "comment", // --[===[ comment
2066
+ regex : strPre + '\\-\\-\\[\\={3}\\[.*\\]\\={3}\\]'
2067
+ }, {
2068
+ token : "comment", // --[====[ comment
2069
+ regex : strPre + '\\-\\-\\[\\={4}\\[.*\\]\\={4}\\]'
2070
+ }, {
2071
+ token : "comment", // --[====+[ comment
2072
+ regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
2073
+ },
2074
+
2075
+ // multiline bracketed comments
2076
+ {
2077
+ token : "comment", // --[[ comment
2078
+ regex : strPre + '\\-\\-\\[\\[.*$',
2079
+ merge : true,
2080
+ next : "qcomment"
2081
+ }, {
2082
+ token : "comment", // --[=[ comment
2083
+ regex : strPre + '\\-\\-\\[\\=\\[.*$',
2084
+ merge : true,
2085
+ next : "qcomment1"
2086
+ }, {
2087
+ token : "comment", // --[==[ comment
2088
+ regex : strPre + '\\-\\-\\[\\={2}\\[.*$',
2089
+ merge : true,
2090
+ next : "qcomment2"
2091
+ }, {
2092
+ token : "comment", // --[===[ comment
2093
+ regex : strPre + '\\-\\-\\[\\={3}\\[.*$',
2094
+ merge : true,
2095
+ next : "qcomment3"
2096
+ }, {
2097
+ token : "comment", // --[====[ comment
2098
+ regex : strPre + '\\-\\-\\[\\={4}\\[.*$',
2099
+ merge : true,
2100
+ next : "qcomment4"
2101
+ }, {
2102
+ token : function(value){ // --[====+[ comment
2103
+ // WARNING: EXTREMELY SLOW, but this is the only way to circumvent the
2104
+ // limits imposed by the current automaton.
2105
+ // I've never personally seen any practical code where 5 or more '='s are
2106
+ // used for string or commenting, so this will rarely be invoked.
2107
+ var pattern = /\-\-\[(\=+)\[/, match;
2108
+ // you can never be too paranoid ;)
2109
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
2110
+ comment_stack.push(match.length);
2111
+
2112
+ return "comment";
2113
+ },
2114
+ regex : strPre + '\\-\\-\\[\\={5}\\=*\\[.*$',
2115
+ merge : true,
2116
+ next : "qcomment5"
2117
+ },
2118
+
2119
+ // single line comments
2120
+ {
2121
+ token : "comment",
2122
+ regex : "\\-\\-.*$"
2123
+ },
2124
+
2125
+ // bracketed strings
2126
+ {
2127
+ token : "string", // [[ string
2128
+ regex : strPre + '\\[\\[.*\\]\\]'
2129
+ }, {
2130
+ token : "string", // [=[ string
2131
+ regex : strPre + '\\[\\=\\[.*\\]\\=\\]'
2132
+ }, {
2133
+ token : "string", // [==[ string
2134
+ regex : strPre + '\\[\\={2}\\[.*\\]\\={2}\\]'
2135
+ }, {
2136
+ token : "string", // [===[ string
2137
+ regex : strPre + '\\[\\={3}\\[.*\\]\\={3}\\]'
2138
+ }, {
2139
+ token : "string", // [====[ string
2140
+ regex : strPre + '\\[\\={4}\\[.*\\]\\={4}\\]'
2141
+ }, {
2142
+ token : "string", // [====+[ string
2143
+ regex : strPre + '\\[\\={5}\\=*\\[.*\\]\\={5}\\=*\\]'
2144
+ },
2145
+
2146
+ // multiline bracketed strings
2147
+ {
2148
+ token : "string", // [[ string
2149
+ regex : strPre + '\\[\\[.*$',
2150
+ merge : true,
2151
+ next : "qstring"
2152
+ }, {
2153
+ token : "string", // [=[ string
2154
+ regex : strPre + '\\[\\=\\[.*$',
2155
+ merge : true,
2156
+ next : "qstring1"
2157
+ }, {
2158
+ token : "string", // [==[ string
2159
+ regex : strPre + '\\[\\={2}\\[.*$',
2160
+ merge : true,
2161
+ next : "qstring2"
2162
+ }, {
2163
+ token : "string", // [===[ string
2164
+ regex : strPre + '\\[\\={3}\\[.*$',
2165
+ merge : true,
2166
+ next : "qstring3"
2167
+ }, {
2168
+ token : "string", // [====[ string
2169
+ regex : strPre + '\\[\\={4}\\[.*$',
2170
+ merge : true,
2171
+ next : "qstring4"
2172
+ }, {
2173
+ token : function(value){ // --[====+[ string
2174
+ // WARNING: EXTREMELY SLOW, see above.
2175
+ var pattern = /\[(\=+)\[/, match;
2176
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined)
2177
+ comment_stack.push(match.length);
2178
+
2179
+ return "string";
2180
+ },
2181
+ regex : strPre + '\\[\\={5}\\=*\\[.*$',
2182
+ merge : true,
2183
+ next : "qstring5"
2184
+ },
2185
+
2186
+ {
2187
+ token : "string", // " string
2188
+ regex : strPre + '"(?:[^\\\\]|\\\\.)*?"'
2189
+ }, {
2190
+ token : "string", // ' string
2191
+ regex : strPre + "'(?:[^\\\\]|\\\\.)*?'"
2192
+ }, {
2193
+ token : "constant.numeric", // float
2194
+ regex : floatNumber
2195
+ }, {
2196
+ token : "constant.numeric", // integer
2197
+ regex : integer + "\\b"
2198
+ }, {
2199
+ token : function(value) {
2200
+ if (keywords.hasOwnProperty(value))
2201
+ return "keyword";
2202
+ else if (builtinConstants.hasOwnProperty(value))
2203
+ return "constant.language";
2204
+ else if (futureReserved.hasOwnProperty(value))
2205
+ return "invalid.illegal";
2206
+ else if (stdLibaries.hasOwnProperty(value))
2207
+ return "constant.library";
2208
+ else if (deprecatedIn5152.hasOwnProperty(value))
2209
+ return "invalid.deprecated";
2210
+ else if (builtinFunctions.hasOwnProperty(value))
2211
+ return "support.function";
2212
+ else if (metatableMethods.hasOwnProperty(value))
2213
+ return "support.function";
2214
+ else
2215
+ return "identifier";
2216
+ },
2217
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
2218
+ }, {
2219
+ token : "keyword.operator",
2220
+ regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."
2221
+ }, {
2222
+ token : "paren.lparen",
2223
+ regex : "[\\[\\(\\{]"
2224
+ }, {
2225
+ token : "paren.rparen",
2226
+ regex : "[\\]\\)\\}]"
2227
+ }, {
2228
+ token : "text",
2229
+ regex : "\\s+"
2230
+ } ],
2231
+
2232
+ "qcomment": [ {
2233
+ token : "comment",
2234
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
2235
+ next : "start"
2236
+ }, {
2237
+ token : "comment",
2238
+ merge : true,
2239
+ regex : '.+'
2240
+ } ],
2241
+ "qcomment1": [ {
2242
+ token : "comment",
2243
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
2244
+ next : "start"
2245
+ }, {
2246
+ token : "comment",
2247
+ merge : true,
2248
+ regex : '.+'
2249
+ } ],
2250
+ "qcomment2": [ {
2251
+ token : "comment",
2252
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
2253
+ next : "start"
2254
+ }, {
2255
+ token : "comment",
2256
+ merge : true,
2257
+ regex : '.+'
2258
+ } ],
2259
+ "qcomment3": [ {
2260
+ token : "comment",
2261
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
2262
+ next : "start"
2263
+ }, {
2264
+ token : "comment",
2265
+ merge : true,
2266
+ regex : '.+'
2267
+ } ],
2268
+ "qcomment4": [ {
2269
+ token : "comment",
2270
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
2271
+ next : "start"
2272
+ }, {
2273
+ token : "comment",
2274
+ merge : true,
2275
+ regex : '.+'
2276
+ } ],
2277
+ "qcomment5": [ {
2278
+ token : function(value){
2279
+ // very hackish, mutates the qcomment5 field on the fly.
2280
+ var pattern = /\](\=+)\]/, rule = this.rules.qcomment5[0], match;
2281
+ rule.next = "start";
2282
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
2283
+ var found = match.length, expected;
2284
+ if ((expected = comment_stack.pop()) != found){
2285
+ comment_stack.push(expected);
2286
+ rule.next = "qcomment5";
2287
+ }
2288
+ }
2289
+
2290
+ return "comment";
2291
+ },
2292
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
2293
+ next : "start"
2294
+ }, {
2295
+ token : "comment",
2296
+ merge : true,
2297
+ regex : '.+'
2298
+ } ],
2299
+
2300
+ "qstring": [ {
2301
+ token : "string",
2302
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\]",
2303
+ next : "start"
2304
+ }, {
2305
+ token : "string",
2306
+ merge : true,
2307
+ regex : '.+'
2308
+ } ],
2309
+ "qstring1": [ {
2310
+ token : "string",
2311
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\=\\]",
2312
+ next : "start"
2313
+ }, {
2314
+ token : "string",
2315
+ merge : true,
2316
+ regex : '.+'
2317
+ } ],
2318
+ "qstring2": [ {
2319
+ token : "string",
2320
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={2}\\]",
2321
+ next : "start"
2322
+ }, {
2323
+ token : "string",
2324
+ merge : true,
2325
+ regex : '.+'
2326
+ } ],
2327
+ "qstring3": [ {
2328
+ token : "string",
2329
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={3}\\]",
2330
+ next : "start"
2331
+ }, {
2332
+ token : "string",
2333
+ merge : true,
2334
+ regex : '.+'
2335
+ } ],
2336
+ "qstring4": [ {
2337
+ token : "string",
2338
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={4}\\]",
2339
+ next : "start"
2340
+ }, {
2341
+ token : "string",
2342
+ merge : true,
2343
+ regex : '.+'
2344
+ } ],
2345
+ "qstring5": [ {
2346
+ token : function(value){
2347
+ // very hackish, mutates the qstring5 field on the fly.
2348
+ var pattern = /\](\=+)\]/, rule = this.rules.qstring5[0], match;
2349
+ rule.next = "start";
2350
+ if ((match = pattern.exec(value)) != null && (match = match[1]) != undefined){
2351
+ var found = match.length, expected;
2352
+ if ((expected = comment_stack.pop()) != found){
2353
+ comment_stack.push(expected);
2354
+ rule.next = "qstring5";
2355
+ }
2356
+ }
2357
+
2358
+ return "string";
2359
+ },
2360
+ regex : "(?:[^\\\\]|\\\\.)*?\\]\\={5}\\=*\\]",
2361
+ next : "start"
2362
+ }, {
2363
+ token : "string",
2364
+ merge : true,
2365
+ regex : '.+'
2366
+ } ]
2367
+
2368
+ };
2369
+
2370
+ }
2371
+
2372
+ oop.inherits(LuaHighlightRules, TextHighlightRules);
2373
+
2374
+ exports.LuaHighlightRules = LuaHighlightRules;
2375
+ });
2376
+ define('ace/mode/luahtml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/lua_highlight_rules'], function(require, exports, module) {
2377
+
2378
+
2379
+ var oop = require("../lib/oop");
2380
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2381
+ var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
2382
+
2383
+ var LuaHtmlHighlightRules = function() {
2384
+ this.$rules = new HtmlHighlightRules().getRules();
2385
+
2386
+ for (var i in this.$rules)
2387
+ this.$rules[i].unshift({
2388
+ token: "luatag-percent",
2389
+ regex: "<\\%",
2390
+ next: "lua-start"
2391
+ }, {
2392
+ token: "luatag-lua",
2393
+ regex: "<\\?lua",
2394
+ next: "lua-start"
2395
+ });
2396
+
2397
+ this.embedRules(LuaHighlightRules, "lua-", [
2398
+ {
2399
+ token: "keyword1",
2400
+ regex: "\\%>",
2401
+ next: "start"
2402
+ },
2403
+ {
2404
+ token: "keyword2",
2405
+ regex: "\\?>",
2406
+ next: "start"
2407
+ }
2408
+ ]);
2409
+ };
2410
+
2411
+ oop.inherits(LuaHtmlHighlightRules, HtmlHighlightRules);
2412
+
2413
+ exports.LuaHtmlHighlightRules = LuaHtmlHighlightRules;
2414
+
2415
+ });