jquery-ace-rails 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +36 -0
- data/lib/jquery-ace-rails.rb +5 -0
- data/lib/jquery-ace-rails/engine.rb +4 -0
- data/lib/jquery-ace-rails/version.rb +3 -0
- data/vendor/assets/javascripts/jquery-ace/jquery-ace.coffee +126 -0
- data/vendor/assets/javascripts/jquery-ace/jquery-ace.js +195 -0
- data/vendor/assets/javascripts/jquery-ace/jquery-ace.min.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ace.js +11 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ext-static_highlight.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ext-textarea.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/keybinding-emacs.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/keybinding-vim.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-abap.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-asciidoc.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-c9search.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-c_cpp.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-clojure.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-coffee.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-coldfusion.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-csharp.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-css.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-dart.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-diff.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-dot.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-glsl.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-golang.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-groovy.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-haml.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-haxe.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-html.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jade.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-java.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-javascript.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-json.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jsp.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jsx.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-latex.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-less.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-liquid.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lisp.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lua.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-luapage.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lucene.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-makefile.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-markdown.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-objectivec.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-ocaml.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-perl.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-pgsql.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-php.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-powershell.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-python.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-r.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-rdoc.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-rhtml.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-ruby.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scad.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scala.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scss.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-sh.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-sql.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-stylus.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-svg.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-tcl.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-tex.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-text.js +0 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-textile.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-typescript.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-xml.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-xquery.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-yaml.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-ambiance.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-chaos.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-chrome.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-clouds.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-clouds_midnight.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-cobalt.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-crimson_editor.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-dawn.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-dreamweaver.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-eclipse.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-github.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-idle_fingers.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-kr.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-merbivore.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-merbivore_soft.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-mono_industrial.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-monokai.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-pastel_on_dark.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-solarized_dark.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-solarized_light.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-textmate.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_blue.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_bright.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_eighties.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-twilight.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-vibrant_ink.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-xcode.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-coffee.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-css.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-javascript.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-json.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-xquery.js +1 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ace.js +14262 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-static_highlight.js +96 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-textarea.js +591 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-emacs.js +364 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-vim.js +1646 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-abap.js +259 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-asciidoc.js +372 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c9search.js +187 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c_cpp.js +765 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-clojure.js +325 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coffee.js +520 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coldfusion.js +1725 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-csharp.js +605 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-css.js +680 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dart.js +279 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-diff.js +163 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dot.js +348 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-glsl.js +838 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-golang.js +660 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-groovy.js +1082 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haml.js +440 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haxe.js +610 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-html.js +1850 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jade.js +2035 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-java.js +1041 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-javascript.js +921 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-json.js +574 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsp.js +1371 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsx.js +635 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-latex.js +217 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-less.js +394 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-liquid.js +921 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lisp.js +142 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lua.js +609 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-luapage.js +2463 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lucene.js +64 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-makefile.js +314 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-markdown.js +2228 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-objectivec.js +655 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ocaml.js +448 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-perl.js +319 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-pgsql.js +928 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-php.js +2299 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-powershell.js +611 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-python.js +290 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-r.js +410 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rdoc.js +189 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rhtml.js +2138 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ruby.js +410 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scad.js +698 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scala.js +1070 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scss.js +416 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sh.js +232 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sql.js +145 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-stylus.js +474 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-svg.js +1490 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tcl.js +342 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tex.js +171 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-text.js +0 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-textile.js +175 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-typescript.js +1011 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xml.js +792 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xquery.js +676 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-yaml.js +298 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-ambiance.js +202 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chaos.js +167 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chrome.js +161 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds.js +135 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds_midnight.js +136 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-cobalt.js +150 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-crimson_editor.js +154 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dawn.js +146 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dreamweaver.js +173 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-eclipse.js +122 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-github.js +136 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-idle_fingers.js +136 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-kr.js +143 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore.js +135 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore_soft.js +136 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-mono_industrial.js +148 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-monokai.js +140 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-pastel_on_dark.js +148 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_dark.js +128 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_light.js +131 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-textmate.js +163 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow.js +147 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night.js +147 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_blue.js +145 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_bright.js +147 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_eighties.js +144 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-twilight.js +147 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-vibrant_ink.js +131 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-xcode.js +125 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-coffee.js +6985 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-css.js +7741 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-javascript.js +6387 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-json.js +2228 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-xquery.js +21719 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/jquery-1.8.3.min.js +2 -0
- metadata +249 -0
@@ -0,0 +1,440 @@
|
|
1
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
2
|
+
* Distributed under the BSD license:
|
3
|
+
*
|
4
|
+
* Copyright (c) 2012, Ajax.org B.V.
|
5
|
+
* All rights reserved.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following conditions are met:
|
9
|
+
* * Redistributions of source code must retain the above copyright
|
10
|
+
* notice, this list of conditions and the following disclaimer.
|
11
|
+
* * Redistributions in binary form must reproduce the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer in the
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
14
|
+
* * Neither the name of Ajax.org B.V. nor the
|
15
|
+
* names of its contributors may be used to endorse or promote products
|
16
|
+
* derived from this software without specific prior written permission.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
22
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
24
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
25
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
|
+
*
|
29
|
+
*
|
30
|
+
* Contributor(s):
|
31
|
+
*
|
32
|
+
* Garen J. Torikian < gjtorikian AT gmail DOT com >
|
33
|
+
*
|
34
|
+
* ***** END LICENSE BLOCK ***** */
|
35
|
+
|
36
|
+
define('ace/mode/haml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haml_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
|
37
|
+
|
38
|
+
|
39
|
+
var oop = require("../lib/oop");
|
40
|
+
var TextMode = require("./text").Mode;
|
41
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
42
|
+
var HamlHighlightRules = require("./haml_highlight_rules").HamlHighlightRules;
|
43
|
+
var FoldMode = require("./folding/coffee").FoldMode;
|
44
|
+
|
45
|
+
var Mode = function() {
|
46
|
+
var highlighter = new HamlHighlightRules();
|
47
|
+
this.foldingRules = new FoldMode();
|
48
|
+
|
49
|
+
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
50
|
+
};
|
51
|
+
oop.inherits(Mode, TextMode);
|
52
|
+
|
53
|
+
(function() {
|
54
|
+
}).call(Mode.prototype);
|
55
|
+
|
56
|
+
exports.Mode = Mode;
|
57
|
+
});define('ace/mode/haml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/ruby_highlight_rules'], function(require, exports, module) {
|
58
|
+
|
59
|
+
|
60
|
+
var oop = require("../lib/oop");
|
61
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
62
|
+
var RubyExports = require("./ruby_highlight_rules");
|
63
|
+
var RubyHighlightRules = RubyExports.RubyHighlightRules;
|
64
|
+
|
65
|
+
var HamlHighlightRules = function() {
|
66
|
+
|
67
|
+
this.$rules =
|
68
|
+
{
|
69
|
+
"start": [
|
70
|
+
{
|
71
|
+
"token" : "punctuation.section.comment",
|
72
|
+
"regex" : /^\s*\/.*/
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"token" : "punctuation.section.comment",
|
76
|
+
"regex" : /^\s*#.*/
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"token": "string.quoted.double",
|
80
|
+
"regex": "==.+?=="
|
81
|
+
},
|
82
|
+
{
|
83
|
+
"token": "keyword.other.doctype",
|
84
|
+
"regex": "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
|
85
|
+
},
|
86
|
+
RubyExports.qString,
|
87
|
+
RubyExports.qqString,
|
88
|
+
RubyExports.tString,
|
89
|
+
{
|
90
|
+
"token": ["entity.name.tag.haml"],
|
91
|
+
"regex": /^\s*%[\w:]+/,
|
92
|
+
"next": "tag_single"
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"token": [ "meta.escape.haml" ],
|
96
|
+
"regex": "^\\s*\\\\."
|
97
|
+
},
|
98
|
+
RubyExports.constantNumericHex,
|
99
|
+
RubyExports.constantNumericFloat,
|
100
|
+
|
101
|
+
RubyExports.constantOtherSymbol,
|
102
|
+
{
|
103
|
+
"token": "text",
|
104
|
+
"regex": "=|-|~",
|
105
|
+
"next": "embedded_ruby"
|
106
|
+
}
|
107
|
+
],
|
108
|
+
"tag_single": [
|
109
|
+
{
|
110
|
+
"token": "entity.other.attribute-name.class.haml",
|
111
|
+
"regex": "\\.[\\w-]+"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"token": "entity.other.attribute-name.id.haml",
|
115
|
+
"regex": "#[\\w-]+"
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"token": "punctuation.section",
|
119
|
+
"regex": "\\{",
|
120
|
+
"next": "section"
|
121
|
+
},
|
122
|
+
|
123
|
+
RubyExports.constantOtherSymbol,
|
124
|
+
|
125
|
+
{
|
126
|
+
"token": "text",
|
127
|
+
"regex": /\s/,
|
128
|
+
"next": "start"
|
129
|
+
},
|
130
|
+
{
|
131
|
+
"token": ["text", "punctuation"],
|
132
|
+
"regex": "($)|((?!\\.|#|\\{|\\[|=|-|~|\\/))",
|
133
|
+
"next": "start"
|
134
|
+
}
|
135
|
+
],
|
136
|
+
"section": [
|
137
|
+
RubyExports.constantOtherSymbol,
|
138
|
+
|
139
|
+
RubyExports.qString,
|
140
|
+
RubyExports.qqString,
|
141
|
+
RubyExports.tString,
|
142
|
+
|
143
|
+
RubyExports.constantNumericHex,
|
144
|
+
RubyExports.constantNumericFloat,
|
145
|
+
{
|
146
|
+
"token": "punctuation.section",
|
147
|
+
"regex": "\\}",
|
148
|
+
"next": "start"
|
149
|
+
}
|
150
|
+
],
|
151
|
+
"embedded_ruby": [
|
152
|
+
RubyExports.constantNumericHex,
|
153
|
+
RubyExports.constantNumericFloat,
|
154
|
+
{
|
155
|
+
token : "support.class", // class name
|
156
|
+
regex : "[A-Z][a-zA-Z_\\d]+"
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"token" : new RubyHighlightRules().getKeywords(),
|
160
|
+
"regex" : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
161
|
+
},
|
162
|
+
{
|
163
|
+
"token" : ["keyword", "text", "text"],
|
164
|
+
"regex" : "(?:do|\\{)(?: \\|[^|]+\\|)?$",
|
165
|
+
"next" : "start"
|
166
|
+
},
|
167
|
+
{
|
168
|
+
"token" : ["text"],
|
169
|
+
"regex" : "^$",
|
170
|
+
"next" : "start"
|
171
|
+
},
|
172
|
+
{
|
173
|
+
"token" : ["text"],
|
174
|
+
"regex" : "^(?!.*\\|\\s*$)",
|
175
|
+
"next" : "start"
|
176
|
+
}
|
177
|
+
]
|
178
|
+
}
|
179
|
+
|
180
|
+
};
|
181
|
+
|
182
|
+
oop.inherits(HamlHighlightRules, TextHighlightRules);
|
183
|
+
|
184
|
+
exports.HamlHighlightRules = HamlHighlightRules;
|
185
|
+
});
|
186
|
+
|
187
|
+
define('ace/mode/ruby_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
188
|
+
|
189
|
+
|
190
|
+
var oop = require("../lib/oop");
|
191
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
192
|
+
var constantOtherSymbol = exports.constantOtherSymbol = {
|
193
|
+
token : "constant.other.symbol.ruby", // symbol
|
194
|
+
regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
|
195
|
+
};
|
196
|
+
|
197
|
+
var qString = exports.qString = {
|
198
|
+
token : "string", // single line
|
199
|
+
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
200
|
+
};
|
201
|
+
|
202
|
+
var qqString = exports.qqString = {
|
203
|
+
token : "string", // single line
|
204
|
+
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
205
|
+
};
|
206
|
+
|
207
|
+
var tString = exports.tString = {
|
208
|
+
token : "string", // backtick string
|
209
|
+
regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
|
210
|
+
};
|
211
|
+
|
212
|
+
var constantNumericHex = exports.constantNumericHex = {
|
213
|
+
token : "constant.numeric", // hex
|
214
|
+
regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
|
215
|
+
};
|
216
|
+
|
217
|
+
var constantNumericFloat = exports.constantNumericFloat = {
|
218
|
+
token : "constant.numeric", // float
|
219
|
+
regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
|
220
|
+
};
|
221
|
+
|
222
|
+
var RubyHighlightRules = function() {
|
223
|
+
|
224
|
+
var builtinFunctions = (
|
225
|
+
"abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
|
226
|
+
"assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
|
227
|
+
"assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
|
228
|
+
"assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
|
229
|
+
"assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
|
230
|
+
"assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
|
231
|
+
"attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
|
232
|
+
"caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
|
233
|
+
"exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
|
234
|
+
"gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|" +
|
235
|
+
"link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
|
236
|
+
"p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
|
237
|
+
"raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
|
238
|
+
"set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
|
239
|
+
"throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
|
240
|
+
"render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
|
241
|
+
"content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
|
242
|
+
"fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
|
243
|
+
"time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
|
244
|
+
"select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
|
245
|
+
"file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
|
246
|
+
"protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
|
247
|
+
"send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
|
248
|
+
"validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
|
249
|
+
"validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
|
250
|
+
"authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
|
251
|
+
"filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
|
252
|
+
"translate|localize|extract_locale_from_tld|t|l|caches_page|expire_page|caches_action|expire_action|" +
|
253
|
+
"cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
|
254
|
+
"has_many|has_one|belongs_to|has_and_belongs_to_many"
|
255
|
+
);
|
256
|
+
|
257
|
+
var keywords = (
|
258
|
+
"alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
|
259
|
+
"__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
|
260
|
+
"redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield"
|
261
|
+
);
|
262
|
+
|
263
|
+
var buildinConstants = (
|
264
|
+
"true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
|
265
|
+
"RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING"
|
266
|
+
);
|
267
|
+
|
268
|
+
var builtinVariables = (
|
269
|
+
"\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" +
|
270
|
+
"$!|root_url|flash|session|cookies|params|request|response|logger|self"
|
271
|
+
);
|
272
|
+
|
273
|
+
var keywordMapper = this.$keywords = this.createKeywordMapper({
|
274
|
+
"keyword": keywords,
|
275
|
+
"constant.language": buildinConstants,
|
276
|
+
"variable.language": builtinVariables,
|
277
|
+
"support.function": builtinFunctions,
|
278
|
+
"invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
|
279
|
+
}, "identifier");
|
280
|
+
|
281
|
+
this.$rules = {
|
282
|
+
"start" : [
|
283
|
+
{
|
284
|
+
token : "comment",
|
285
|
+
regex : "#.*$"
|
286
|
+
}, {
|
287
|
+
token : "comment", // multi line comment
|
288
|
+
regex : "^=begin\\s",
|
289
|
+
next : "comment"
|
290
|
+
}, {
|
291
|
+
token : "string.regexp",
|
292
|
+
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
|
293
|
+
},
|
294
|
+
|
295
|
+
qString,
|
296
|
+
qqString,
|
297
|
+
tString,
|
298
|
+
|
299
|
+
{
|
300
|
+
token : "text", // namespaces aren't symbols
|
301
|
+
regex : "::"
|
302
|
+
}, {
|
303
|
+
token : "variable.instance", // instance variable
|
304
|
+
regex : "@{1,2}[a-zA-Z_\\d]+"
|
305
|
+
}, {
|
306
|
+
token : "support.class", // class name
|
307
|
+
regex : "[A-Z][a-zA-Z_\\d]+"
|
308
|
+
},
|
309
|
+
|
310
|
+
constantOtherSymbol,
|
311
|
+
constantNumericHex,
|
312
|
+
constantNumericFloat,
|
313
|
+
|
314
|
+
{
|
315
|
+
token : "constant.language.boolean",
|
316
|
+
regex : "(?:true|false)\\b"
|
317
|
+
}, {
|
318
|
+
token : keywordMapper,
|
319
|
+
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
320
|
+
}, {
|
321
|
+
token : "punctuation.separator.key-value",
|
322
|
+
regex : "=>"
|
323
|
+
}, {
|
324
|
+
token : "keyword.operator",
|
325
|
+
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
326
|
+
}, {
|
327
|
+
token : "paren.lparen",
|
328
|
+
regex : "[[({]"
|
329
|
+
}, {
|
330
|
+
token : "paren.rparen",
|
331
|
+
regex : "[\\])}]"
|
332
|
+
}, {
|
333
|
+
token : "text",
|
334
|
+
regex : "\\s+"
|
335
|
+
}
|
336
|
+
],
|
337
|
+
"comment" : [
|
338
|
+
{
|
339
|
+
token : "comment", // closing comment
|
340
|
+
regex : "^=end\\s.*$",
|
341
|
+
next : "start"
|
342
|
+
}, {
|
343
|
+
token : "comment", // comment spanning whole line
|
344
|
+
regex : ".+"
|
345
|
+
}
|
346
|
+
]
|
347
|
+
};
|
348
|
+
};
|
349
|
+
|
350
|
+
oop.inherits(RubyHighlightRules, TextHighlightRules);
|
351
|
+
|
352
|
+
exports.RubyHighlightRules = RubyHighlightRules;
|
353
|
+
});
|
354
|
+
|
355
|
+
define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
|
356
|
+
|
357
|
+
|
358
|
+
var oop = require("../../lib/oop");
|
359
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
360
|
+
var Range = require("../../range").Range;
|
361
|
+
|
362
|
+
var FoldMode = exports.FoldMode = function() {};
|
363
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
364
|
+
|
365
|
+
(function() {
|
366
|
+
|
367
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
368
|
+
var range = this.indentationBlock(session, row);
|
369
|
+
if (range)
|
370
|
+
return range;
|
371
|
+
|
372
|
+
var re = /\S/;
|
373
|
+
var line = session.getLine(row);
|
374
|
+
var startLevel = line.search(re);
|
375
|
+
if (startLevel == -1 || line[startLevel] != "#")
|
376
|
+
return;
|
377
|
+
|
378
|
+
var startColumn = line.length;
|
379
|
+
var maxRow = session.getLength();
|
380
|
+
var startRow = row;
|
381
|
+
var endRow = row;
|
382
|
+
|
383
|
+
while (++row < maxRow) {
|
384
|
+
line = session.getLine(row);
|
385
|
+
var level = line.search(re);
|
386
|
+
|
387
|
+
if (level == -1)
|
388
|
+
continue;
|
389
|
+
|
390
|
+
if (line[level] != "#")
|
391
|
+
break;
|
392
|
+
|
393
|
+
endRow = row;
|
394
|
+
}
|
395
|
+
|
396
|
+
if (endRow > startRow) {
|
397
|
+
var endColumn = session.getLine(endRow).length;
|
398
|
+
return new Range(startRow, startColumn, endRow, endColumn);
|
399
|
+
}
|
400
|
+
};
|
401
|
+
this.getFoldWidget = function(session, foldStyle, row) {
|
402
|
+
var line = session.getLine(row);
|
403
|
+
var indent = line.search(/\S/);
|
404
|
+
var next = session.getLine(row + 1);
|
405
|
+
var prev = session.getLine(row - 1);
|
406
|
+
var prevIndent = prev.search(/\S/);
|
407
|
+
var nextIndent = next.search(/\S/);
|
408
|
+
|
409
|
+
if (indent == -1) {
|
410
|
+
session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
|
411
|
+
return "";
|
412
|
+
}
|
413
|
+
if (prevIndent == -1) {
|
414
|
+
if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
|
415
|
+
session.foldWidgets[row - 1] = "";
|
416
|
+
session.foldWidgets[row + 1] = "";
|
417
|
+
return "start";
|
418
|
+
}
|
419
|
+
} else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
|
420
|
+
if (session.getLine(row - 2).search(/\S/) == -1) {
|
421
|
+
session.foldWidgets[row - 1] = "start";
|
422
|
+
session.foldWidgets[row + 1] = "";
|
423
|
+
return "";
|
424
|
+
}
|
425
|
+
}
|
426
|
+
|
427
|
+
if (prevIndent!= -1 && prevIndent < indent)
|
428
|
+
session.foldWidgets[row - 1] = "start";
|
429
|
+
else
|
430
|
+
session.foldWidgets[row - 1] = "";
|
431
|
+
|
432
|
+
if (indent < nextIndent)
|
433
|
+
return "start";
|
434
|
+
else
|
435
|
+
return "";
|
436
|
+
};
|
437
|
+
|
438
|
+
}).call(FoldMode.prototype);
|
439
|
+
|
440
|
+
});
|
@@ -0,0 +1,610 @@
|
|
1
|
+
define('ace/mode/haxe', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haxe_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
|
2
|
+
|
3
|
+
|
4
|
+
var oop = require("../lib/oop");
|
5
|
+
var TextMode = require("./text").Mode;
|
6
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
7
|
+
var HaxeHighlightRules = require("./haxe_highlight_rules").HaxeHighlightRules;
|
8
|
+
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
9
|
+
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
10
|
+
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
11
|
+
|
12
|
+
var Mode = function() {
|
13
|
+
this.$tokenizer = new Tokenizer(new HaxeHighlightRules().getRules());
|
14
|
+
this.$outdent = new MatchingBraceOutdent();
|
15
|
+
this.$behaviour = new CstyleBehaviour();
|
16
|
+
this.foldingRules = new CStyleFoldMode();
|
17
|
+
};
|
18
|
+
oop.inherits(Mode, TextMode);
|
19
|
+
|
20
|
+
(function() {
|
21
|
+
|
22
|
+
this.getNextLineIndent = function(state, line, tab) {
|
23
|
+
var indent = this.$getIndent(line);
|
24
|
+
|
25
|
+
var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
|
26
|
+
var tokens = tokenizedLine.tokens;
|
27
|
+
|
28
|
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
29
|
+
return indent;
|
30
|
+
}
|
31
|
+
|
32
|
+
if (state == "start") {
|
33
|
+
var match = line.match(/^.*[\{\(\[]\s*$/);
|
34
|
+
if (match) {
|
35
|
+
indent += tab;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
return indent;
|
40
|
+
};
|
41
|
+
|
42
|
+
this.checkOutdent = function(state, line, input) {
|
43
|
+
return this.$outdent.checkOutdent(line, input);
|
44
|
+
};
|
45
|
+
|
46
|
+
this.autoOutdent = function(state, doc, row) {
|
47
|
+
this.$outdent.autoOutdent(doc, row);
|
48
|
+
};
|
49
|
+
|
50
|
+
}).call(Mode.prototype);
|
51
|
+
|
52
|
+
exports.Mode = Mode;
|
53
|
+
});
|
54
|
+
define('ace/mode/haxe_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
55
|
+
|
56
|
+
|
57
|
+
var oop = require("../lib/oop");
|
58
|
+
|
59
|
+
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
60
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
61
|
+
|
62
|
+
var HaxeHighlightRules = function() {
|
63
|
+
|
64
|
+
var keywords = (
|
65
|
+
"break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std"
|
66
|
+
);
|
67
|
+
|
68
|
+
var buildinConstants = (
|
69
|
+
"null|true|false"
|
70
|
+
);
|
71
|
+
|
72
|
+
var keywordMapper = this.createKeywordMapper({
|
73
|
+
"variable.language": "this",
|
74
|
+
"keyword": keywords,
|
75
|
+
"constant.language": buildinConstants
|
76
|
+
}, "identifier");
|
77
|
+
|
78
|
+
this.$rules = {
|
79
|
+
"start" : [
|
80
|
+
{
|
81
|
+
token : "comment",
|
82
|
+
regex : "\\/\\/.*$"
|
83
|
+
},
|
84
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
85
|
+
{
|
86
|
+
token : "comment", // multi line comment
|
87
|
+
regex : "\\/\\*",
|
88
|
+
next : "comment"
|
89
|
+
}, {
|
90
|
+
token : "string.regexp",
|
91
|
+
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
|
92
|
+
}, {
|
93
|
+
token : "string", // single line
|
94
|
+
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
95
|
+
}, {
|
96
|
+
token : "string", // single line
|
97
|
+
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
98
|
+
}, {
|
99
|
+
token : "constant.numeric", // hex
|
100
|
+
regex : "0[xX][0-9a-fA-F]+\\b"
|
101
|
+
}, {
|
102
|
+
token : "constant.numeric", // float
|
103
|
+
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
104
|
+
}, {
|
105
|
+
token : "constant.language.boolean",
|
106
|
+
regex : "(?:true|false)\\b"
|
107
|
+
}, {
|
108
|
+
token : keywordMapper,
|
109
|
+
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
110
|
+
}, {
|
111
|
+
token : "keyword.operator",
|
112
|
+
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
113
|
+
}, {
|
114
|
+
token : "punctuation.operator",
|
115
|
+
regex : "\\?|\\:|\\,|\\;|\\."
|
116
|
+
}, {
|
117
|
+
token : "paren.lparen",
|
118
|
+
regex : "[[({<]"
|
119
|
+
}, {
|
120
|
+
token : "paren.rparen",
|
121
|
+
regex : "[\\])}>]"
|
122
|
+
}, {
|
123
|
+
token : "text",
|
124
|
+
regex : "\\s+"
|
125
|
+
}
|
126
|
+
],
|
127
|
+
"comment" : [
|
128
|
+
{
|
129
|
+
token : "comment", // closing comment
|
130
|
+
regex : ".*?\\*\\/",
|
131
|
+
next : "start"
|
132
|
+
}, {
|
133
|
+
token : "comment", // comment spanning whole line
|
134
|
+
regex : ".+"
|
135
|
+
}
|
136
|
+
]
|
137
|
+
};
|
138
|
+
|
139
|
+
this.embedRules(DocCommentHighlightRules, "doc-",
|
140
|
+
[ DocCommentHighlightRules.getEndRule("start") ]);
|
141
|
+
};
|
142
|
+
|
143
|
+
oop.inherits(HaxeHighlightRules, TextHighlightRules);
|
144
|
+
|
145
|
+
exports.HaxeHighlightRules = HaxeHighlightRules;
|
146
|
+
});
|
147
|
+
|
148
|
+
define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
149
|
+
|
150
|
+
|
151
|
+
var oop = require("../lib/oop");
|
152
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
153
|
+
|
154
|
+
var DocCommentHighlightRules = function() {
|
155
|
+
|
156
|
+
this.$rules = {
|
157
|
+
"start" : [ {
|
158
|
+
token : "comment.doc.tag",
|
159
|
+
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
160
|
+
}, {
|
161
|
+
token : "comment.doc",
|
162
|
+
regex : "\\s+"
|
163
|
+
}, {
|
164
|
+
token : "comment.doc",
|
165
|
+
regex : "TODO"
|
166
|
+
}, {
|
167
|
+
token : "comment.doc",
|
168
|
+
regex : "[^@\\*]+"
|
169
|
+
}, {
|
170
|
+
token : "comment.doc",
|
171
|
+
regex : "."
|
172
|
+
}]
|
173
|
+
};
|
174
|
+
};
|
175
|
+
|
176
|
+
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
177
|
+
|
178
|
+
DocCommentHighlightRules.getStartRule = function(start) {
|
179
|
+
return {
|
180
|
+
token : "comment.doc", // doc comment
|
181
|
+
regex : "\\/\\*(?=\\*)",
|
182
|
+
next : start
|
183
|
+
};
|
184
|
+
};
|
185
|
+
|
186
|
+
DocCommentHighlightRules.getEndRule = function (start) {
|
187
|
+
return {
|
188
|
+
token : "comment.doc", // closing comment
|
189
|
+
regex : "\\*\\/",
|
190
|
+
next : start
|
191
|
+
};
|
192
|
+
};
|
193
|
+
|
194
|
+
|
195
|
+
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
196
|
+
|
197
|
+
});
|
198
|
+
|
199
|
+
define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
200
|
+
|
201
|
+
|
202
|
+
var Range = require("../range").Range;
|
203
|
+
|
204
|
+
var MatchingBraceOutdent = function() {};
|
205
|
+
|
206
|
+
(function() {
|
207
|
+
|
208
|
+
this.checkOutdent = function(line, input) {
|
209
|
+
if (! /^\s+$/.test(line))
|
210
|
+
return false;
|
211
|
+
|
212
|
+
return /^\s*\}/.test(input);
|
213
|
+
};
|
214
|
+
|
215
|
+
this.autoOutdent = function(doc, row) {
|
216
|
+
var line = doc.getLine(row);
|
217
|
+
var match = line.match(/^(\s*\})/);
|
218
|
+
|
219
|
+
if (!match) return 0;
|
220
|
+
|
221
|
+
var column = match[1].length;
|
222
|
+
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
223
|
+
|
224
|
+
if (!openBracePos || openBracePos.row == row) return 0;
|
225
|
+
|
226
|
+
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
227
|
+
doc.replace(new Range(row, 0, row, column-1), indent);
|
228
|
+
};
|
229
|
+
|
230
|
+
this.$getIndent = function(line) {
|
231
|
+
var match = line.match(/^(\s+)/);
|
232
|
+
if (match) {
|
233
|
+
return match[1];
|
234
|
+
}
|
235
|
+
|
236
|
+
return "";
|
237
|
+
};
|
238
|
+
|
239
|
+
}).call(MatchingBraceOutdent.prototype);
|
240
|
+
|
241
|
+
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
242
|
+
});
|
243
|
+
|
244
|
+
define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
|
245
|
+
|
246
|
+
|
247
|
+
var oop = require("../../lib/oop");
|
248
|
+
var Behaviour = require("../behaviour").Behaviour;
|
249
|
+
var TokenIterator = require("../../token_iterator").TokenIterator;
|
250
|
+
var lang = require("../../lib/lang");
|
251
|
+
|
252
|
+
var SAFE_INSERT_IN_TOKENS =
|
253
|
+
["text", "paren.rparen", "punctuation.operator"];
|
254
|
+
var SAFE_INSERT_BEFORE_TOKENS =
|
255
|
+
["text", "paren.rparen", "punctuation.operator", "comment"];
|
256
|
+
|
257
|
+
|
258
|
+
var autoInsertedBrackets = 0;
|
259
|
+
var autoInsertedRow = -1;
|
260
|
+
var autoInsertedLineEnd = "";
|
261
|
+
var maybeInsertedBrackets = 0;
|
262
|
+
var maybeInsertedRow = -1;
|
263
|
+
var maybeInsertedLineStart = "";
|
264
|
+
var maybeInsertedLineEnd = "";
|
265
|
+
|
266
|
+
var CstyleBehaviour = function () {
|
267
|
+
|
268
|
+
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
269
|
+
var cursor = editor.getCursorPosition();
|
270
|
+
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
271
|
+
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
272
|
+
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
273
|
+
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
274
|
+
return false;
|
275
|
+
}
|
276
|
+
iterator.stepForward();
|
277
|
+
return iterator.getCurrentTokenRow() !== cursor.row ||
|
278
|
+
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
279
|
+
};
|
280
|
+
|
281
|
+
CstyleBehaviour.$matchTokenType = function(token, types) {
|
282
|
+
return types.indexOf(token.type || token) > -1;
|
283
|
+
};
|
284
|
+
|
285
|
+
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
286
|
+
var cursor = editor.getCursorPosition();
|
287
|
+
var line = session.doc.getLine(cursor.row);
|
288
|
+
if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
|
289
|
+
autoInsertedBrackets = 0;
|
290
|
+
autoInsertedRow = cursor.row;
|
291
|
+
autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
292
|
+
autoInsertedBrackets++;
|
293
|
+
};
|
294
|
+
|
295
|
+
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
296
|
+
var cursor = editor.getCursorPosition();
|
297
|
+
var line = session.doc.getLine(cursor.row);
|
298
|
+
if (!this.isMaybeInsertedClosing(cursor, line))
|
299
|
+
maybeInsertedBrackets = 0;
|
300
|
+
maybeInsertedRow = cursor.row;
|
301
|
+
maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
302
|
+
maybeInsertedLineEnd = line.substr(cursor.column);
|
303
|
+
maybeInsertedBrackets++;
|
304
|
+
};
|
305
|
+
|
306
|
+
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
307
|
+
return autoInsertedBrackets > 0 &&
|
308
|
+
cursor.row === autoInsertedRow &&
|
309
|
+
bracket === autoInsertedLineEnd[0] &&
|
310
|
+
line.substr(cursor.column) === autoInsertedLineEnd;
|
311
|
+
};
|
312
|
+
|
313
|
+
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
314
|
+
return maybeInsertedBrackets > 0 &&
|
315
|
+
cursor.row === maybeInsertedRow &&
|
316
|
+
line.substr(cursor.column) === maybeInsertedLineEnd &&
|
317
|
+
line.substr(0, cursor.column) == maybeInsertedLineStart;
|
318
|
+
};
|
319
|
+
|
320
|
+
CstyleBehaviour.popAutoInsertedClosing = function() {
|
321
|
+
autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
|
322
|
+
autoInsertedBrackets--;
|
323
|
+
};
|
324
|
+
|
325
|
+
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
326
|
+
maybeInsertedBrackets = 0;
|
327
|
+
maybeInsertedRow = -1;
|
328
|
+
};
|
329
|
+
|
330
|
+
this.add("braces", "insertion", function (state, action, editor, session, text) {
|
331
|
+
var cursor = editor.getCursorPosition();
|
332
|
+
var line = session.doc.getLine(cursor.row);
|
333
|
+
if (text == '{') {
|
334
|
+
var selection = editor.getSelectionRange();
|
335
|
+
var selected = session.doc.getTextRange(selection);
|
336
|
+
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
337
|
+
return {
|
338
|
+
text: '{' + selected + '}',
|
339
|
+
selection: false
|
340
|
+
};
|
341
|
+
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
342
|
+
if (/[\]\}\)]/.test(line[cursor.column])) {
|
343
|
+
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
344
|
+
return {
|
345
|
+
text: '{}',
|
346
|
+
selection: [1, 1]
|
347
|
+
};
|
348
|
+
} else {
|
349
|
+
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
350
|
+
return {
|
351
|
+
text: '{',
|
352
|
+
selection: [1, 1]
|
353
|
+
};
|
354
|
+
}
|
355
|
+
}
|
356
|
+
} else if (text == '}') {
|
357
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
358
|
+
if (rightChar == '}') {
|
359
|
+
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
360
|
+
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
361
|
+
CstyleBehaviour.popAutoInsertedClosing();
|
362
|
+
return {
|
363
|
+
text: '',
|
364
|
+
selection: [1, 1]
|
365
|
+
};
|
366
|
+
}
|
367
|
+
}
|
368
|
+
} else if (text == "\n" || text == "\r\n") {
|
369
|
+
var closing = "";
|
370
|
+
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
371
|
+
closing = lang.stringRepeat("}", maybeInsertedBrackets);
|
372
|
+
CstyleBehaviour.clearMaybeInsertedClosing();
|
373
|
+
}
|
374
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
375
|
+
if (rightChar == '}' || closing !== "") {
|
376
|
+
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
|
377
|
+
if (!openBracePos)
|
378
|
+
return null;
|
379
|
+
|
380
|
+
var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
|
381
|
+
var next_indent = this.$getIndent(line);
|
382
|
+
|
383
|
+
return {
|
384
|
+
text: '\n' + indent + '\n' + next_indent + closing,
|
385
|
+
selection: [1, indent.length, 1, indent.length]
|
386
|
+
};
|
387
|
+
}
|
388
|
+
}
|
389
|
+
});
|
390
|
+
|
391
|
+
this.add("braces", "deletion", function (state, action, editor, session, range) {
|
392
|
+
var selected = session.doc.getTextRange(range);
|
393
|
+
if (!range.isMultiLine() && selected == '{') {
|
394
|
+
var line = session.doc.getLine(range.start.row);
|
395
|
+
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
396
|
+
if (rightChar == '}') {
|
397
|
+
range.end.column++;
|
398
|
+
return range;
|
399
|
+
} else {
|
400
|
+
maybeInsertedBrackets--;
|
401
|
+
}
|
402
|
+
}
|
403
|
+
});
|
404
|
+
|
405
|
+
this.add("parens", "insertion", function (state, action, editor, session, text) {
|
406
|
+
if (text == '(') {
|
407
|
+
var selection = editor.getSelectionRange();
|
408
|
+
var selected = session.doc.getTextRange(selection);
|
409
|
+
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
410
|
+
return {
|
411
|
+
text: '(' + selected + ')',
|
412
|
+
selection: false
|
413
|
+
};
|
414
|
+
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
415
|
+
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
416
|
+
return {
|
417
|
+
text: '()',
|
418
|
+
selection: [1, 1]
|
419
|
+
};
|
420
|
+
}
|
421
|
+
} else if (text == ')') {
|
422
|
+
var cursor = editor.getCursorPosition();
|
423
|
+
var line = session.doc.getLine(cursor.row);
|
424
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
425
|
+
if (rightChar == ')') {
|
426
|
+
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
427
|
+
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
428
|
+
CstyleBehaviour.popAutoInsertedClosing();
|
429
|
+
return {
|
430
|
+
text: '',
|
431
|
+
selection: [1, 1]
|
432
|
+
};
|
433
|
+
}
|
434
|
+
}
|
435
|
+
}
|
436
|
+
});
|
437
|
+
|
438
|
+
this.add("parens", "deletion", function (state, action, editor, session, range) {
|
439
|
+
var selected = session.doc.getTextRange(range);
|
440
|
+
if (!range.isMultiLine() && selected == '(') {
|
441
|
+
var line = session.doc.getLine(range.start.row);
|
442
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
443
|
+
if (rightChar == ')') {
|
444
|
+
range.end.column++;
|
445
|
+
return range;
|
446
|
+
}
|
447
|
+
}
|
448
|
+
});
|
449
|
+
|
450
|
+
this.add("brackets", "insertion", function (state, action, editor, session, text) {
|
451
|
+
if (text == '[') {
|
452
|
+
var selection = editor.getSelectionRange();
|
453
|
+
var selected = session.doc.getTextRange(selection);
|
454
|
+
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
455
|
+
return {
|
456
|
+
text: '[' + selected + ']',
|
457
|
+
selection: false
|
458
|
+
};
|
459
|
+
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
460
|
+
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
461
|
+
return {
|
462
|
+
text: '[]',
|
463
|
+
selection: [1, 1]
|
464
|
+
};
|
465
|
+
}
|
466
|
+
} else if (text == ']') {
|
467
|
+
var cursor = editor.getCursorPosition();
|
468
|
+
var line = session.doc.getLine(cursor.row);
|
469
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
470
|
+
if (rightChar == ']') {
|
471
|
+
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
472
|
+
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
473
|
+
CstyleBehaviour.popAutoInsertedClosing();
|
474
|
+
return {
|
475
|
+
text: '',
|
476
|
+
selection: [1, 1]
|
477
|
+
};
|
478
|
+
}
|
479
|
+
}
|
480
|
+
}
|
481
|
+
});
|
482
|
+
|
483
|
+
this.add("brackets", "deletion", function (state, action, editor, session, range) {
|
484
|
+
var selected = session.doc.getTextRange(range);
|
485
|
+
if (!range.isMultiLine() && selected == '[') {
|
486
|
+
var line = session.doc.getLine(range.start.row);
|
487
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
488
|
+
if (rightChar == ']') {
|
489
|
+
range.end.column++;
|
490
|
+
return range;
|
491
|
+
}
|
492
|
+
}
|
493
|
+
});
|
494
|
+
|
495
|
+
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
496
|
+
if (text == '"' || text == "'") {
|
497
|
+
var quote = text;
|
498
|
+
var selection = editor.getSelectionRange();
|
499
|
+
var selected = session.doc.getTextRange(selection);
|
500
|
+
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
501
|
+
return {
|
502
|
+
text: quote + selected + quote,
|
503
|
+
selection: false
|
504
|
+
};
|
505
|
+
} else {
|
506
|
+
var cursor = editor.getCursorPosition();
|
507
|
+
var line = session.doc.getLine(cursor.row);
|
508
|
+
var leftChar = line.substring(cursor.column-1, cursor.column);
|
509
|
+
if (leftChar == '\\') {
|
510
|
+
return null;
|
511
|
+
}
|
512
|
+
var tokens = session.getTokens(selection.start.row);
|
513
|
+
var col = 0, token;
|
514
|
+
var quotepos = -1; // Track whether we're inside an open quote.
|
515
|
+
|
516
|
+
for (var x = 0; x < tokens.length; x++) {
|
517
|
+
token = tokens[x];
|
518
|
+
if (token.type == "string") {
|
519
|
+
quotepos = -1;
|
520
|
+
} else if (quotepos < 0) {
|
521
|
+
quotepos = token.value.indexOf(quote);
|
522
|
+
}
|
523
|
+
if ((token.value.length + col) > selection.start.column) {
|
524
|
+
break;
|
525
|
+
}
|
526
|
+
col += tokens[x].value.length;
|
527
|
+
}
|
528
|
+
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)))) {
|
529
|
+
if (!CstyleBehaviour.isSaneInsertion(editor, session))
|
530
|
+
return;
|
531
|
+
return {
|
532
|
+
text: quote + quote,
|
533
|
+
selection: [1,1]
|
534
|
+
};
|
535
|
+
} else if (token && token.type === "string") {
|
536
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
537
|
+
if (rightChar == quote) {
|
538
|
+
return {
|
539
|
+
text: '',
|
540
|
+
selection: [1, 1]
|
541
|
+
};
|
542
|
+
}
|
543
|
+
}
|
544
|
+
}
|
545
|
+
}
|
546
|
+
});
|
547
|
+
|
548
|
+
this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
|
549
|
+
var selected = session.doc.getTextRange(range);
|
550
|
+
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
551
|
+
var line = session.doc.getLine(range.start.row);
|
552
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
553
|
+
if (rightChar == '"') {
|
554
|
+
range.end.column++;
|
555
|
+
return range;
|
556
|
+
}
|
557
|
+
}
|
558
|
+
});
|
559
|
+
|
560
|
+
};
|
561
|
+
|
562
|
+
oop.inherits(CstyleBehaviour, Behaviour);
|
563
|
+
|
564
|
+
exports.CstyleBehaviour = CstyleBehaviour;
|
565
|
+
});
|
566
|
+
|
567
|
+
define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
568
|
+
|
569
|
+
|
570
|
+
var oop = require("../../lib/oop");
|
571
|
+
var Range = require("../../range").Range;
|
572
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
573
|
+
|
574
|
+
var FoldMode = exports.FoldMode = function() {};
|
575
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
576
|
+
|
577
|
+
(function() {
|
578
|
+
|
579
|
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
580
|
+
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
581
|
+
|
582
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
583
|
+
var line = session.getLine(row);
|
584
|
+
var match = line.match(this.foldingStartMarker);
|
585
|
+
if (match) {
|
586
|
+
var i = match.index;
|
587
|
+
|
588
|
+
if (match[1])
|
589
|
+
return this.openingBracketBlock(session, match[1], row, i);
|
590
|
+
|
591
|
+
return session.getCommentFoldRange(row, i + match[0].length, 1);
|
592
|
+
}
|
593
|
+
|
594
|
+
if (foldStyle !== "markbeginend")
|
595
|
+
return;
|
596
|
+
|
597
|
+
var match = line.match(this.foldingStopMarker);
|
598
|
+
if (match) {
|
599
|
+
var i = match.index + match[0].length;
|
600
|
+
|
601
|
+
if (match[1])
|
602
|
+
return this.closingBracketBlock(session, match[1], row, i);
|
603
|
+
|
604
|
+
return session.getCommentFoldRange(row, i, -1);
|
605
|
+
}
|
606
|
+
};
|
607
|
+
|
608
|
+
}).call(FoldMode.prototype);
|
609
|
+
|
610
|
+
});
|