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 +1,681 @@
1
- define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent"],function(a,b,c){var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./golang_highlight_rules").GolangHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(i,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)\/\//;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var i=new Range(0,0,0,0);for(var h=c;h<=d;h++){var j=b.getLine(h),k=j.match(g);i.start.row=h,i.end.row=h,i.end.column=k[0].length,b.replace(i,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(i.prototype),b.Mode=i}),define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("true|else|false|break|case|return|goto|if|const|continue|struct|default|switch|for|func|import|package|chan|defer|fallthrough|go|interface|map|rangeselect|type|var".split("|")),b=e.arrayToMap("nit|true|false|iota".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},f.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(h,g),b.GolangHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),f.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},f.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}},b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e})
1
+ define('ace/mode/golang', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/golang_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
2
+
3
+ var oop = require("../lib/oop");
4
+ var TextMode = require("./text").Mode;
5
+ var Tokenizer = require("../tokenizer").Tokenizer;
6
+ var GolangHighlightRules = require("./golang_highlight_rules").GolangHighlightRules;
7
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
8
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
9
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
10
+
11
+ var Mode = function() {
12
+ this.$tokenizer = new Tokenizer(new GolangHighlightRules().getRules());
13
+ this.$outdent = new MatchingBraceOutdent();
14
+ this.foldingRules = new CStyleFoldMode();
15
+ };
16
+ oop.inherits(Mode, TextMode);
17
+
18
+ (function() {
19
+
20
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
21
+ var outdent = true;
22
+ var outentedRows = [];
23
+ var re = /^(\s*)\/\//;
24
+
25
+ for (var i=startRow; i<= endRow; i++) {
26
+ if (!re.test(doc.getLine(i))) {
27
+ outdent = false;
28
+ break;
29
+ }
30
+ }
31
+
32
+ if (outdent) {
33
+ var deleteRange = new Range(0, 0, 0, 0);
34
+ for (var i=startRow; i<= endRow; i++)
35
+ {
36
+ var line = doc.getLine(i);
37
+ var m = line.match(re);
38
+ deleteRange.start.row = i;
39
+ deleteRange.end.row = i;
40
+ deleteRange.end.column = m[0].length;
41
+ doc.replace(deleteRange, m[1]);
42
+ }
43
+ }
44
+ else {
45
+ doc.indentRows(startRow, endRow, "//");
46
+ }
47
+ };
48
+
49
+ this.getNextLineIndent = function(state, line, tab) {
50
+ var indent = this.$getIndent(line);
51
+
52
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
53
+ var tokens = tokenizedLine.tokens;
54
+ var endState = tokenizedLine.state;
55
+
56
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
57
+ return indent;
58
+ }
59
+
60
+ if (state == "start") {
61
+ var match = line.match(/^.*[\{\(\[]\s*$/);
62
+ if (match) {
63
+ indent += tab;
64
+ }
65
+ }
66
+
67
+ return indent;
68
+ };//end getNextLineIndent
69
+
70
+ this.checkOutdent = function(state, line, input) {
71
+ return this.$outdent.checkOutdent(line, input);
72
+ };
73
+
74
+ this.autoOutdent = function(state, doc, row) {
75
+ this.$outdent.autoOutdent(doc, row);
76
+ };
77
+
78
+ }).call(Mode.prototype);
79
+
80
+ exports.Mode = Mode;
81
+ });
82
+ define('ace/mode/golang_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
83
+ var oop = require("../lib/oop");
84
+ var lang = require("../lib/lang");
85
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
86
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
87
+
88
+ var GolangHighlightRules = function() {
89
+ var keywords = lang.arrayToMap(
90
+ ("true|else|false|break|case|return|goto|if|const|" +
91
+ "continue|struct|default|switch|for|" +
92
+ "func|import|package|chan|defer|fallthrough|go|interface|map|range" +
93
+ "select|type|var").split("|")
94
+ );
95
+
96
+ var buildinConstants = lang.arrayToMap(
97
+ ("nil|true|false|iota").split("|")
98
+ );
99
+
100
+ this.$rules = {
101
+ "start" : [
102
+ {
103
+ token : "comment",
104
+ regex : "\\/\\/.*$"
105
+ },
106
+ DocCommentHighlightRules.getStartRule("doc-start"),
107
+ {
108
+ token : "comment", // multi line comment
109
+ merge : true,
110
+ regex : "\\/\\*",
111
+ next : "comment"
112
+ }, {
113
+ token : "string", // single line
114
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
115
+ }, {
116
+ token : "string", // multi line string start
117
+ merge : true,
118
+ regex : '["].*\\\\$',
119
+ next : "qqstring"
120
+ }, {
121
+ token : "string", // single line
122
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
123
+ }, {
124
+ token : "string", // multi line string start
125
+ merge : true,
126
+ regex : "['].*\\\\$",
127
+ next : "qstring"
128
+ }, {
129
+ token : "constant.numeric", // hex
130
+ regex : "0[xX][0-9a-fA-F]+\\b"
131
+ }, {
132
+ token : "constant.numeric", // float
133
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
134
+ }, {
135
+ token : "constant", // <CONSTANT>
136
+ regex : "<[a-zA-Z0-9.]+>"
137
+ }, {
138
+ token : "keyword", // pre-compiler directivs
139
+ regex : "(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"
140
+ }, {
141
+ token : function(value) {
142
+ if (value == "this")
143
+ return "variable.language";
144
+ else if (keywords.hasOwnProperty(value))
145
+ return "keyword";
146
+ else if (buildinConstants.hasOwnProperty(value))
147
+ return "constant.language";
148
+ else
149
+ return "identifier";
150
+ },
151
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
152
+ }, {
153
+ token : "keyword.operator",
154
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
155
+ }, {
156
+ token : "punctuation.operator",
157
+ regex : "\\?|\\:|\\,|\\;|\\."
158
+ }, {
159
+ token : "paren.lparen",
160
+ regex : "[[({]"
161
+ }, {
162
+ token : "paren.rparen",
163
+ regex : "[\\])}]"
164
+ }, {
165
+ token : "text",
166
+ regex : "\\s+"
167
+ }
168
+ ],
169
+ "comment" : [
170
+ {
171
+ token : "comment", // closing comment
172
+ regex : ".*?\\*\\/",
173
+ next : "start"
174
+ }, {
175
+ token : "comment", // comment spanning whole line
176
+ merge : true,
177
+ regex : ".+"
178
+ }
179
+ ],
180
+ "qqstring" : [
181
+ {
182
+ token : "string",
183
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
184
+ next : "start"
185
+ }, {
186
+ token : "string",
187
+ merge : true,
188
+ regex : '.+'
189
+ }
190
+ ],
191
+ "qstring" : [
192
+ {
193
+ token : "string",
194
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
195
+ next : "start"
196
+ }, {
197
+ token : "string",
198
+ merge : true,
199
+ regex : '.+'
200
+ }
201
+ ]
202
+ };
203
+
204
+ this.embedRules(DocCommentHighlightRules, "doc-",
205
+ [ DocCommentHighlightRules.getEndRule("start") ]);
206
+ }
207
+ oop.inherits(GolangHighlightRules, TextHighlightRules);
208
+
209
+ exports.GolangHighlightRules = GolangHighlightRules;
210
+ });
211
+
212
+ define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
213
+
214
+
215
+ var oop = require("../lib/oop");
216
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
217
+
218
+ var DocCommentHighlightRules = function() {
219
+
220
+ this.$rules = {
221
+ "start" : [ {
222
+ token : "comment.doc.tag",
223
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
224
+ }, {
225
+ token : "comment.doc",
226
+ merge : true,
227
+ regex : "\\s+"
228
+ }, {
229
+ token : "comment.doc",
230
+ merge : true,
231
+ regex : "TODO"
232
+ }, {
233
+ token : "comment.doc",
234
+ merge : true,
235
+ regex : "[^@\\*]+"
236
+ }, {
237
+ token : "comment.doc",
238
+ merge : true,
239
+ regex : "."
240
+ }]
241
+ };
242
+ };
243
+
244
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
245
+
246
+ DocCommentHighlightRules.getStartRule = function(start) {
247
+ return {
248
+ token : "comment.doc", // doc comment
249
+ merge : true,
250
+ regex : "\\/\\*(?=\\*)",
251
+ next : start
252
+ };
253
+ };
254
+
255
+ DocCommentHighlightRules.getEndRule = function (start) {
256
+ return {
257
+ token : "comment.doc", // closing comment
258
+ merge : true,
259
+ regex : "\\*\\/",
260
+ next : start
261
+ };
262
+ };
263
+
264
+
265
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
266
+
267
+ });
268
+
269
+ define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
270
+
271
+
272
+ var Range = require("../range").Range;
273
+
274
+ var MatchingBraceOutdent = function() {};
275
+
276
+ (function() {
277
+
278
+ this.checkOutdent = function(line, input) {
279
+ if (! /^\s+$/.test(line))
280
+ return false;
281
+
282
+ return /^\s*\}/.test(input);
283
+ };
284
+
285
+ this.autoOutdent = function(doc, row) {
286
+ var line = doc.getLine(row);
287
+ var match = line.match(/^(\s*\})/);
288
+
289
+ if (!match) return 0;
290
+
291
+ var column = match[1].length;
292
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
293
+
294
+ if (!openBracePos || openBracePos.row == row) return 0;
295
+
296
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
297
+ doc.replace(new Range(row, 0, row, column-1), indent);
298
+ };
299
+
300
+ this.$getIndent = function(line) {
301
+ var match = line.match(/^(\s+)/);
302
+ if (match) {
303
+ return match[1];
304
+ }
305
+
306
+ return "";
307
+ };
308
+
309
+ }).call(MatchingBraceOutdent.prototype);
310
+
311
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
312
+ });
313
+
314
+ define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
315
+
316
+
317
+ var oop = require("../../lib/oop");
318
+ var Behaviour = require("../behaviour").Behaviour;
319
+
320
+ var CstyleBehaviour = function () {
321
+
322
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
323
+ if (text == '{') {
324
+ var selection = editor.getSelectionRange();
325
+ var selected = session.doc.getTextRange(selection);
326
+ if (selected !== "") {
327
+ return {
328
+ text: '{' + selected + '}',
329
+ selection: false
330
+ };
331
+ } else {
332
+ return {
333
+ text: '{}',
334
+ selection: [1, 1]
335
+ };
336
+ }
337
+ } else if (text == '}') {
338
+ var cursor = editor.getCursorPosition();
339
+ var line = session.doc.getLine(cursor.row);
340
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
341
+ if (rightChar == '}') {
342
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
343
+ if (matching !== null) {
344
+ return {
345
+ text: '',
346
+ selection: [1, 1]
347
+ };
348
+ }
349
+ }
350
+ } else if (text == "\n") {
351
+ var cursor = editor.getCursorPosition();
352
+ var line = session.doc.getLine(cursor.row);
353
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
354
+ if (rightChar == '}') {
355
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
356
+ if (!openBracePos)
357
+ return null;
358
+
359
+ var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
360
+ var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
361
+
362
+ return {
363
+ text: '\n' + indent + '\n' + next_indent,
364
+ selection: [1, indent.length, 1, indent.length]
365
+ };
366
+ }
367
+ }
368
+ });
369
+
370
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
371
+ var selected = session.doc.getTextRange(range);
372
+ if (!range.isMultiLine() && selected == '{') {
373
+ var line = session.doc.getLine(range.start.row);
374
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
375
+ if (rightChar == '}') {
376
+ range.end.column++;
377
+ return range;
378
+ }
379
+ }
380
+ });
381
+
382
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
383
+ if (text == '(') {
384
+ var selection = editor.getSelectionRange();
385
+ var selected = session.doc.getTextRange(selection);
386
+ if (selected !== "") {
387
+ return {
388
+ text: '(' + selected + ')',
389
+ selection: false
390
+ };
391
+ } else {
392
+ return {
393
+ text: '()',
394
+ selection: [1, 1]
395
+ };
396
+ }
397
+ } else if (text == ')') {
398
+ var cursor = editor.getCursorPosition();
399
+ var line = session.doc.getLine(cursor.row);
400
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
401
+ if (rightChar == ')') {
402
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
403
+ if (matching !== null) {
404
+ return {
405
+ text: '',
406
+ selection: [1, 1]
407
+ };
408
+ }
409
+ }
410
+ }
411
+ });
412
+
413
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
414
+ var selected = session.doc.getTextRange(range);
415
+ if (!range.isMultiLine() && selected == '(') {
416
+ var line = session.doc.getLine(range.start.row);
417
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
418
+ if (rightChar == ')') {
419
+ range.end.column++;
420
+ return range;
421
+ }
422
+ }
423
+ });
424
+
425
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
426
+ if (text == '[') {
427
+ var selection = editor.getSelectionRange();
428
+ var selected = session.doc.getTextRange(selection);
429
+ if (selected !== "") {
430
+ return {
431
+ text: '[' + selected + ']',
432
+ selection: false
433
+ };
434
+ } else {
435
+ return {
436
+ text: '[]',
437
+ selection: [1, 1]
438
+ };
439
+ }
440
+ } else if (text == ']') {
441
+ var cursor = editor.getCursorPosition();
442
+ var line = session.doc.getLine(cursor.row);
443
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
444
+ if (rightChar == ']') {
445
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
446
+ if (matching !== null) {
447
+ return {
448
+ text: '',
449
+ selection: [1, 1]
450
+ };
451
+ }
452
+ }
453
+ }
454
+ });
455
+
456
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
457
+ var selected = session.doc.getTextRange(range);
458
+ if (!range.isMultiLine() && selected == '[') {
459
+ var line = session.doc.getLine(range.start.row);
460
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
461
+ if (rightChar == ']') {
462
+ range.end.column++;
463
+ return range;
464
+ }
465
+ }
466
+ });
467
+
468
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
469
+ if (text == '"' || text == "'") {
470
+ var quote = text;
471
+ var selection = editor.getSelectionRange();
472
+ var selected = session.doc.getTextRange(selection);
473
+ if (selected !== "") {
474
+ return {
475
+ text: quote + selected + quote,
476
+ selection: false
477
+ };
478
+ } else {
479
+ var cursor = editor.getCursorPosition();
480
+ var line = session.doc.getLine(cursor.row);
481
+ var leftChar = line.substring(cursor.column-1, cursor.column);
482
+
483
+ // We're escaped.
484
+ if (leftChar == '\\') {
485
+ return null;
486
+ }
487
+
488
+ // Find what token we're inside.
489
+ var tokens = session.getTokens(selection.start.row);
490
+ var col = 0, token;
491
+ var quotepos = -1; // Track whether we're inside an open quote.
492
+
493
+ for (var x = 0; x < tokens.length; x++) {
494
+ token = tokens[x];
495
+ if (token.type == "string") {
496
+ quotepos = -1;
497
+ } else if (quotepos < 0) {
498
+ quotepos = token.value.indexOf(quote);
499
+ }
500
+ if ((token.value.length + col) > selection.start.column) {
501
+ break;
502
+ }
503
+ col += tokens[x].value.length;
504
+ }
505
+
506
+ // Try and be smart about when we auto insert.
507
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
508
+ return {
509
+ text: quote + quote,
510
+ selection: [1,1]
511
+ };
512
+ } else if (token && token.type === "string") {
513
+ // Ignore input and move right one if we're typing over the closing quote.
514
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
515
+ if (rightChar == quote) {
516
+ return {
517
+ text: '',
518
+ selection: [1, 1]
519
+ };
520
+ }
521
+ }
522
+ }
523
+ }
524
+ });
525
+
526
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
527
+ var selected = session.doc.getTextRange(range);
528
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
529
+ var line = session.doc.getLine(range.start.row);
530
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
531
+ if (rightChar == '"') {
532
+ range.end.column++;
533
+ return range;
534
+ }
535
+ }
536
+ });
537
+
538
+ };
539
+
540
+ oop.inherits(CstyleBehaviour, Behaviour);
541
+
542
+ exports.CstyleBehaviour = CstyleBehaviour;
543
+ });
544
+
545
+ define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
546
+
547
+
548
+ var oop = require("../../lib/oop");
549
+ var Range = require("../../range").Range;
550
+ var BaseFoldMode = require("./fold_mode").FoldMode;
551
+
552
+ var FoldMode = exports.FoldMode = function() {};
553
+ oop.inherits(FoldMode, BaseFoldMode);
554
+
555
+ (function() {
556
+
557
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
558
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
559
+
560
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
561
+ var line = session.getLine(row);
562
+ var match = line.match(this.foldingStartMarker);
563
+ if (match) {
564
+ var i = match.index;
565
+
566
+ if (match[1])
567
+ return this.openingBracketBlock(session, match[1], row, i);
568
+
569
+ var range = session.getCommentFoldRange(row, i + match[0].length);
570
+ range.end.column -= 2;
571
+ return range;
572
+ }
573
+
574
+ if (foldStyle !== "markbeginend")
575
+ return;
576
+
577
+ var match = line.match(this.foldingStopMarker);
578
+ if (match) {
579
+ var i = match.index + match[0].length;
580
+
581
+ if (match[2]) {
582
+ var range = session.getCommentFoldRange(row, i);
583
+ range.end.column -= 2;
584
+ return range;
585
+ }
586
+
587
+ var end = {row: row, column: i};
588
+ var start = session.$findOpeningBracket(match[1], end);
589
+
590
+ if (!start)
591
+ return;
592
+
593
+ start.column++;
594
+ end.column--;
595
+
596
+ return Range.fromPoints(start, end);
597
+ }
598
+ };
599
+
600
+ }).call(FoldMode.prototype);
601
+
602
+ });
603
+
604
+ define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
605
+
606
+
607
+ var Range = require("../../range").Range;
608
+
609
+ var FoldMode = exports.FoldMode = function() {};
610
+
611
+ (function() {
612
+
613
+ this.foldingStartMarker = null;
614
+ this.foldingStopMarker = null;
615
+
616
+ // must return "" if there's no fold, to enable caching
617
+ this.getFoldWidget = function(session, foldStyle, row) {
618
+ var line = session.getLine(row);
619
+ if (this.foldingStartMarker.test(line))
620
+ return "start";
621
+ if (foldStyle == "markbeginend"
622
+ && this.foldingStopMarker
623
+ && this.foldingStopMarker.test(line))
624
+ return "end";
625
+ return "";
626
+ };
627
+
628
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
629
+ return null;
630
+ };
631
+
632
+ this.indentationBlock = function(session, row, column) {
633
+ var re = /\S/;
634
+ var line = session.getLine(row);
635
+ var startLevel = line.search(re);
636
+ if (startLevel == -1)
637
+ return;
638
+
639
+ var startColumn = column || line.length;
640
+ var maxRow = session.getLength();
641
+ var startRow = row;
642
+ var endRow = row;
643
+
644
+ while (++row < maxRow) {
645
+ var level = session.getLine(row).search(re);
646
+
647
+ if (level == -1)
648
+ continue;
649
+
650
+ if (level <= startLevel)
651
+ break;
652
+
653
+ endRow = row;
654
+ }
655
+
656
+ if (endRow > startRow) {
657
+ var endColumn = session.getLine(endRow).length;
658
+ return new Range(startRow, startColumn, endRow, endColumn);
659
+ }
660
+ };
661
+
662
+ this.openingBracketBlock = function(session, bracket, row, column, typeRe) {
663
+ var start = {row: row, column: column + 1};
664
+ var end = session.$findClosingBracket(bracket, start, typeRe);
665
+ if (!end)
666
+ return;
667
+
668
+ var fw = session.foldWidgets[end.row];
669
+ if (fw == null)
670
+ fw = this.getFoldWidget(session, end.row);
671
+
672
+ if (fw == "start" && end.row > start.row) {
673
+ end.row --;
674
+ end.column = session.getLine(end.row).length;
675
+ }
676
+ return Range.fromPoints(start, end);
677
+ };
678
+
679
+ }).call(FoldMode.prototype);
680
+
681
+ });