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,1070 @@
|
|
1
|
+
define('ace/mode/scala', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/scala_highlight_rules'], function(require, exports, module) {
|
2
|
+
|
3
|
+
|
4
|
+
var oop = require("../lib/oop");
|
5
|
+
var JavaScriptMode = require("./javascript").Mode;
|
6
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
7
|
+
var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules;
|
8
|
+
|
9
|
+
var Mode = function() {
|
10
|
+
JavaScriptMode.call(this);
|
11
|
+
|
12
|
+
this.$tokenizer = new Tokenizer(new ScalaHighlightRules().getRules());
|
13
|
+
};
|
14
|
+
oop.inherits(Mode, JavaScriptMode);
|
15
|
+
|
16
|
+
(function() {
|
17
|
+
|
18
|
+
this.createWorker = function(session) {
|
19
|
+
return null;
|
20
|
+
};
|
21
|
+
|
22
|
+
}).call(Mode.prototype);
|
23
|
+
|
24
|
+
exports.Mode = Mode;
|
25
|
+
});
|
26
|
+
|
27
|
+
define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
|
28
|
+
|
29
|
+
|
30
|
+
var oop = require("../lib/oop");
|
31
|
+
var TextMode = require("./text").Mode;
|
32
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
33
|
+
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
34
|
+
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
35
|
+
var Range = require("../range").Range;
|
36
|
+
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
37
|
+
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
38
|
+
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
39
|
+
|
40
|
+
var Mode = function() {
|
41
|
+
this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
|
42
|
+
this.$outdent = new MatchingBraceOutdent();
|
43
|
+
this.$behaviour = new CstyleBehaviour();
|
44
|
+
this.foldingRules = new CStyleFoldMode();
|
45
|
+
};
|
46
|
+
oop.inherits(Mode, TextMode);
|
47
|
+
|
48
|
+
(function() {
|
49
|
+
|
50
|
+
|
51
|
+
this.toggleCommentLines = function(state, doc, startRow, endRow) {
|
52
|
+
var outdent = true;
|
53
|
+
var re = /^(\s*)\/\//;
|
54
|
+
|
55
|
+
for (var i=startRow; i<= endRow; i++) {
|
56
|
+
if (!re.test(doc.getLine(i))) {
|
57
|
+
outdent = false;
|
58
|
+
break;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
if (outdent) {
|
63
|
+
var deleteRange = new Range(0, 0, 0, 0);
|
64
|
+
for (var i=startRow; i<= endRow; i++)
|
65
|
+
{
|
66
|
+
var line = doc.getLine(i);
|
67
|
+
var m = line.match(re);
|
68
|
+
deleteRange.start.row = i;
|
69
|
+
deleteRange.end.row = i;
|
70
|
+
deleteRange.end.column = m[0].length;
|
71
|
+
doc.replace(deleteRange, m[1]);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
else {
|
75
|
+
doc.indentRows(startRow, endRow, "//");
|
76
|
+
}
|
77
|
+
};
|
78
|
+
|
79
|
+
this.getNextLineIndent = function(state, line, tab) {
|
80
|
+
var indent = this.$getIndent(line);
|
81
|
+
|
82
|
+
var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
|
83
|
+
var tokens = tokenizedLine.tokens;
|
84
|
+
var endState = tokenizedLine.state;
|
85
|
+
|
86
|
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
87
|
+
return indent;
|
88
|
+
}
|
89
|
+
|
90
|
+
if (state == "start" || state == "regex_allowed") {
|
91
|
+
var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
|
92
|
+
if (match) {
|
93
|
+
indent += tab;
|
94
|
+
}
|
95
|
+
} else if (state == "doc-start") {
|
96
|
+
if (endState == "start" || state == "regex_allowed") {
|
97
|
+
return "";
|
98
|
+
}
|
99
|
+
var match = line.match(/^\s*(\/?)\*/);
|
100
|
+
if (match) {
|
101
|
+
if (match[1]) {
|
102
|
+
indent += " ";
|
103
|
+
}
|
104
|
+
indent += "* ";
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
return indent;
|
109
|
+
};
|
110
|
+
|
111
|
+
this.checkOutdent = function(state, line, input) {
|
112
|
+
return this.$outdent.checkOutdent(line, input);
|
113
|
+
};
|
114
|
+
|
115
|
+
this.autoOutdent = function(state, doc, row) {
|
116
|
+
this.$outdent.autoOutdent(doc, row);
|
117
|
+
};
|
118
|
+
|
119
|
+
this.createWorker = function(session) {
|
120
|
+
var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
|
121
|
+
worker.attachToDocument(session.getDocument());
|
122
|
+
|
123
|
+
worker.on("jslint", function(results) {
|
124
|
+
session.setAnnotations(results.data);
|
125
|
+
});
|
126
|
+
|
127
|
+
worker.on("terminate", function() {
|
128
|
+
session.clearAnnotations();
|
129
|
+
});
|
130
|
+
|
131
|
+
return worker;
|
132
|
+
};
|
133
|
+
|
134
|
+
}).call(Mode.prototype);
|
135
|
+
|
136
|
+
exports.Mode = Mode;
|
137
|
+
});
|
138
|
+
|
139
|
+
define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
140
|
+
|
141
|
+
|
142
|
+
var oop = require("../lib/oop");
|
143
|
+
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
144
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
145
|
+
|
146
|
+
var JavaScriptHighlightRules = function() {
|
147
|
+
var keywordMapper = this.createKeywordMapper({
|
148
|
+
"variable.language":
|
149
|
+
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
|
150
|
+
"Namespace|QName|XML|XMLList|" + // E4X
|
151
|
+
"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
|
152
|
+
"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
|
153
|
+
"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
|
154
|
+
"SyntaxError|TypeError|URIError|" +
|
155
|
+
"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
|
156
|
+
"isNaN|parseFloat|parseInt|" +
|
157
|
+
"JSON|Math|" + // Other
|
158
|
+
"this|arguments|prototype|window|document" , // Pseudo
|
159
|
+
"keyword":
|
160
|
+
"const|yield|import|get|set|" +
|
161
|
+
"break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
162
|
+
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
163
|
+
"__parent__|__count__|escape|unescape|with|__proto__|" +
|
164
|
+
"class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
|
165
|
+
"storage.type":
|
166
|
+
"const|let|var|function",
|
167
|
+
"constant.language":
|
168
|
+
"null|Infinity|NaN|undefined",
|
169
|
+
"support.function":
|
170
|
+
"alert"
|
171
|
+
}, "identifier");
|
172
|
+
var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
|
173
|
+
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
|
174
|
+
|
175
|
+
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
|
176
|
+
"u[0-9a-fA-F]{4}|" + // unicode
|
177
|
+
"[0-2][0-7]{0,2}|" + // oct
|
178
|
+
"3[0-6][0-7]?|" + // oct
|
179
|
+
"37[0-7]?|" + // oct
|
180
|
+
"[4-7][0-7]?|" + //oct
|
181
|
+
".)";
|
182
|
+
|
183
|
+
this.$rules = {
|
184
|
+
"start" : [
|
185
|
+
{
|
186
|
+
token : "comment",
|
187
|
+
regex : /\/\/.*$/
|
188
|
+
},
|
189
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
190
|
+
{
|
191
|
+
token : "comment", // multi line comment
|
192
|
+
regex : /\/\*/,
|
193
|
+
next : "comment"
|
194
|
+
}, {
|
195
|
+
token : "string",
|
196
|
+
regex : "'(?=.)",
|
197
|
+
next : "qstring"
|
198
|
+
}, {
|
199
|
+
token : "string",
|
200
|
+
regex : '"(?=.)',
|
201
|
+
next : "qqstring"
|
202
|
+
}, {
|
203
|
+
token : "constant.numeric", // hex
|
204
|
+
regex : /0[xX][0-9a-fA-F]+\b/
|
205
|
+
}, {
|
206
|
+
token : "constant.numeric", // float
|
207
|
+
regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
|
208
|
+
}, {
|
209
|
+
token : [
|
210
|
+
"storage.type", "punctuation.operator", "support.function",
|
211
|
+
"punctuation.operator", "entity.name.function", "text","keyword.operator"
|
212
|
+
],
|
213
|
+
regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
|
214
|
+
next: "function_arguments"
|
215
|
+
}, {
|
216
|
+
token : [
|
217
|
+
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
218
|
+
"keyword.operator", "text", "storage.type", "text", "paren.lparen"
|
219
|
+
],
|
220
|
+
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
221
|
+
next: "function_arguments"
|
222
|
+
}, {
|
223
|
+
token : [
|
224
|
+
"entity.name.function", "text", "keyword.operator", "text", "storage.type",
|
225
|
+
"text", "paren.lparen"
|
226
|
+
],
|
227
|
+
regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
228
|
+
next: "function_arguments"
|
229
|
+
}, {
|
230
|
+
token : [
|
231
|
+
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
232
|
+
"keyword.operator", "text",
|
233
|
+
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
234
|
+
],
|
235
|
+
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
|
236
|
+
next: "function_arguments"
|
237
|
+
}, {
|
238
|
+
token : [
|
239
|
+
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
240
|
+
],
|
241
|
+
regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
|
242
|
+
next: "function_arguments"
|
243
|
+
}, {
|
244
|
+
token : [
|
245
|
+
"entity.name.function", "text", "punctuation.operator",
|
246
|
+
"text", "storage.type", "text", "paren.lparen"
|
247
|
+
],
|
248
|
+
regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
|
249
|
+
next: "function_arguments"
|
250
|
+
}, {
|
251
|
+
token : [
|
252
|
+
"text", "text", "storage.type", "text", "paren.lparen"
|
253
|
+
],
|
254
|
+
regex : "(:)(\\s*)(function)(\\s*)(\\()",
|
255
|
+
next: "function_arguments"
|
256
|
+
}, {
|
257
|
+
token : "constant.language.boolean",
|
258
|
+
regex : /(?:true|false)\b/
|
259
|
+
}, {
|
260
|
+
token : "keyword",
|
261
|
+
regex : "(?:" + kwBeforeRe + ")\\b",
|
262
|
+
next : "regex_allowed"
|
263
|
+
}, {
|
264
|
+
token : ["punctuation.operator", "support.function"],
|
265
|
+
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
|
266
|
+
}, {
|
267
|
+
token : ["punctuation.operator", "support.function.dom"],
|
268
|
+
regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
|
269
|
+
}, {
|
270
|
+
token : ["punctuation.operator", "support.constant"],
|
271
|
+
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
|
272
|
+
}, {
|
273
|
+
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
|
274
|
+
regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
|
275
|
+
}, {
|
276
|
+
token : keywordMapper,
|
277
|
+
regex : identifierRe
|
278
|
+
}, {
|
279
|
+
token : "keyword.operator",
|
280
|
+
regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
|
281
|
+
next : "regex_allowed"
|
282
|
+
}, {
|
283
|
+
token : "punctuation.operator",
|
284
|
+
regex : /\?|\:|\,|\;|\./,
|
285
|
+
next : "regex_allowed"
|
286
|
+
}, {
|
287
|
+
token : "paren.lparen",
|
288
|
+
regex : /[\[({]/,
|
289
|
+
next : "regex_allowed"
|
290
|
+
}, {
|
291
|
+
token : "paren.rparen",
|
292
|
+
regex : /[\])}]/
|
293
|
+
}, {
|
294
|
+
token : "keyword.operator",
|
295
|
+
regex : /\/=?/,
|
296
|
+
next : "regex_allowed"
|
297
|
+
}, {
|
298
|
+
token: "comment",
|
299
|
+
regex: /^#!.*$/
|
300
|
+
}, {
|
301
|
+
token : "text",
|
302
|
+
regex : /\s+/
|
303
|
+
}
|
304
|
+
],
|
305
|
+
"regex_allowed": [
|
306
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
307
|
+
{
|
308
|
+
token : "comment", // multi line comment
|
309
|
+
regex : "\\/\\*",
|
310
|
+
next : "comment_regex_allowed"
|
311
|
+
}, {
|
312
|
+
token : "comment",
|
313
|
+
regex : "\\/\\/.*$"
|
314
|
+
}, {
|
315
|
+
token: "string.regexp",
|
316
|
+
regex: "\\/",
|
317
|
+
next: "regex",
|
318
|
+
}, {
|
319
|
+
token : "text",
|
320
|
+
regex : "\\s+"
|
321
|
+
}, {
|
322
|
+
token: "empty",
|
323
|
+
regex: "",
|
324
|
+
next: "start"
|
325
|
+
}
|
326
|
+
],
|
327
|
+
"regex": [
|
328
|
+
{
|
329
|
+
token: "regexp.keyword.operator",
|
330
|
+
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
331
|
+
}, {
|
332
|
+
token: "string.regexp",
|
333
|
+
regex: "/\\w*",
|
334
|
+
next: "start",
|
335
|
+
}, {
|
336
|
+
token : "invalid",
|
337
|
+
regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
|
338
|
+
}, {
|
339
|
+
token : "constant.language.escape",
|
340
|
+
regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
|
341
|
+
}, {
|
342
|
+
token: "string.regexp",
|
343
|
+
regex: /{|[^{\[\/\\(|)$^+*?]+/,
|
344
|
+
}, {
|
345
|
+
token: "constant.language.escape",
|
346
|
+
regex: /\[\^?/,
|
347
|
+
next: "regex_character_class",
|
348
|
+
}, {
|
349
|
+
token: "empty",
|
350
|
+
regex: "",
|
351
|
+
next: "start"
|
352
|
+
}
|
353
|
+
],
|
354
|
+
"regex_character_class": [
|
355
|
+
{
|
356
|
+
token: "regexp.keyword.operator",
|
357
|
+
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
358
|
+
}, {
|
359
|
+
token: "constant.language.escape",
|
360
|
+
regex: "]",
|
361
|
+
next: "regex",
|
362
|
+
}, {
|
363
|
+
token: "constant.language.escape",
|
364
|
+
regex: "-"
|
365
|
+
}, {
|
366
|
+
token: "string.regexp.charachterclass",
|
367
|
+
regex: /[^\]\-\\]+/,
|
368
|
+
}, {
|
369
|
+
token: "empty",
|
370
|
+
regex: "",
|
371
|
+
next: "start"
|
372
|
+
}
|
373
|
+
],
|
374
|
+
"function_arguments": [
|
375
|
+
{
|
376
|
+
token: "variable.parameter",
|
377
|
+
regex: identifierRe
|
378
|
+
}, {
|
379
|
+
token: "punctuation.operator",
|
380
|
+
regex: "[, ]+",
|
381
|
+
}, {
|
382
|
+
token: "punctuation.operator",
|
383
|
+
regex: "$",
|
384
|
+
}, {
|
385
|
+
token: "empty",
|
386
|
+
regex: "",
|
387
|
+
next: "start"
|
388
|
+
}
|
389
|
+
],
|
390
|
+
"comment_regex_allowed" : [
|
391
|
+
{
|
392
|
+
token : "comment", // closing comment
|
393
|
+
regex : ".*?\\*\\/",
|
394
|
+
next : "regex_allowed"
|
395
|
+
}, {
|
396
|
+
token : "comment", // comment spanning whole line
|
397
|
+
regex : ".+"
|
398
|
+
}
|
399
|
+
],
|
400
|
+
"comment" : [
|
401
|
+
{
|
402
|
+
token : "comment", // closing comment
|
403
|
+
regex : ".*?\\*\\/",
|
404
|
+
next : "start"
|
405
|
+
}, {
|
406
|
+
token : "comment", // comment spanning whole line
|
407
|
+
regex : ".+"
|
408
|
+
}
|
409
|
+
],
|
410
|
+
"qqstring" : [
|
411
|
+
{
|
412
|
+
token : "constant.language.escape",
|
413
|
+
regex : escapedRe
|
414
|
+
}, {
|
415
|
+
token : "string",
|
416
|
+
regex : "\\\\$",
|
417
|
+
next : "qqstring",
|
418
|
+
}, {
|
419
|
+
token : "string",
|
420
|
+
regex : '"|$',
|
421
|
+
next : "start",
|
422
|
+
}, {
|
423
|
+
token : "string",
|
424
|
+
regex : '.|\\w+|\\s+',
|
425
|
+
}
|
426
|
+
],
|
427
|
+
"qstring" : [
|
428
|
+
{
|
429
|
+
token : "constant.language.escape",
|
430
|
+
regex : escapedRe
|
431
|
+
}, {
|
432
|
+
token : "string",
|
433
|
+
regex : "\\\\$",
|
434
|
+
next : "qstring",
|
435
|
+
}, {
|
436
|
+
token : "string",
|
437
|
+
regex : "'|$",
|
438
|
+
next : "start",
|
439
|
+
}, {
|
440
|
+
token : "string",
|
441
|
+
regex : '.|\\w+|\\s+',
|
442
|
+
}
|
443
|
+
]
|
444
|
+
};
|
445
|
+
|
446
|
+
this.embedRules(DocCommentHighlightRules, "doc-",
|
447
|
+
[ DocCommentHighlightRules.getEndRule("start") ]);
|
448
|
+
};
|
449
|
+
|
450
|
+
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
|
451
|
+
|
452
|
+
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
|
453
|
+
});
|
454
|
+
|
455
|
+
define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
456
|
+
|
457
|
+
|
458
|
+
var oop = require("../lib/oop");
|
459
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
460
|
+
|
461
|
+
var DocCommentHighlightRules = function() {
|
462
|
+
|
463
|
+
this.$rules = {
|
464
|
+
"start" : [ {
|
465
|
+
token : "comment.doc.tag",
|
466
|
+
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
467
|
+
}, {
|
468
|
+
token : "comment.doc",
|
469
|
+
regex : "\\s+"
|
470
|
+
}, {
|
471
|
+
token : "comment.doc",
|
472
|
+
regex : "TODO"
|
473
|
+
}, {
|
474
|
+
token : "comment.doc",
|
475
|
+
regex : "[^@\\*]+"
|
476
|
+
}, {
|
477
|
+
token : "comment.doc",
|
478
|
+
regex : "."
|
479
|
+
}]
|
480
|
+
};
|
481
|
+
};
|
482
|
+
|
483
|
+
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
484
|
+
|
485
|
+
DocCommentHighlightRules.getStartRule = function(start) {
|
486
|
+
return {
|
487
|
+
token : "comment.doc", // doc comment
|
488
|
+
regex : "\\/\\*(?=\\*)",
|
489
|
+
next : start
|
490
|
+
};
|
491
|
+
};
|
492
|
+
|
493
|
+
DocCommentHighlightRules.getEndRule = function (start) {
|
494
|
+
return {
|
495
|
+
token : "comment.doc", // closing comment
|
496
|
+
regex : "\\*\\/",
|
497
|
+
next : start
|
498
|
+
};
|
499
|
+
};
|
500
|
+
|
501
|
+
|
502
|
+
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
503
|
+
|
504
|
+
});
|
505
|
+
|
506
|
+
define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
507
|
+
|
508
|
+
|
509
|
+
var Range = require("../range").Range;
|
510
|
+
|
511
|
+
var MatchingBraceOutdent = function() {};
|
512
|
+
|
513
|
+
(function() {
|
514
|
+
|
515
|
+
this.checkOutdent = function(line, input) {
|
516
|
+
if (! /^\s+$/.test(line))
|
517
|
+
return false;
|
518
|
+
|
519
|
+
return /^\s*\}/.test(input);
|
520
|
+
};
|
521
|
+
|
522
|
+
this.autoOutdent = function(doc, row) {
|
523
|
+
var line = doc.getLine(row);
|
524
|
+
var match = line.match(/^(\s*\})/);
|
525
|
+
|
526
|
+
if (!match) return 0;
|
527
|
+
|
528
|
+
var column = match[1].length;
|
529
|
+
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
530
|
+
|
531
|
+
if (!openBracePos || openBracePos.row == row) return 0;
|
532
|
+
|
533
|
+
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
534
|
+
doc.replace(new Range(row, 0, row, column-1), indent);
|
535
|
+
};
|
536
|
+
|
537
|
+
this.$getIndent = function(line) {
|
538
|
+
var match = line.match(/^(\s+)/);
|
539
|
+
if (match) {
|
540
|
+
return match[1];
|
541
|
+
}
|
542
|
+
|
543
|
+
return "";
|
544
|
+
};
|
545
|
+
|
546
|
+
}).call(MatchingBraceOutdent.prototype);
|
547
|
+
|
548
|
+
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
549
|
+
});
|
550
|
+
|
551
|
+
define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
|
552
|
+
|
553
|
+
|
554
|
+
var oop = require("../../lib/oop");
|
555
|
+
var Behaviour = require("../behaviour").Behaviour;
|
556
|
+
var TokenIterator = require("../../token_iterator").TokenIterator;
|
557
|
+
var lang = require("../../lib/lang");
|
558
|
+
|
559
|
+
var SAFE_INSERT_IN_TOKENS =
|
560
|
+
["text", "paren.rparen", "punctuation.operator"];
|
561
|
+
var SAFE_INSERT_BEFORE_TOKENS =
|
562
|
+
["text", "paren.rparen", "punctuation.operator", "comment"];
|
563
|
+
|
564
|
+
|
565
|
+
var autoInsertedBrackets = 0;
|
566
|
+
var autoInsertedRow = -1;
|
567
|
+
var autoInsertedLineEnd = "";
|
568
|
+
var maybeInsertedBrackets = 0;
|
569
|
+
var maybeInsertedRow = -1;
|
570
|
+
var maybeInsertedLineStart = "";
|
571
|
+
var maybeInsertedLineEnd = "";
|
572
|
+
|
573
|
+
var CstyleBehaviour = function () {
|
574
|
+
|
575
|
+
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
576
|
+
var cursor = editor.getCursorPosition();
|
577
|
+
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
578
|
+
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
579
|
+
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
580
|
+
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
581
|
+
return false;
|
582
|
+
}
|
583
|
+
iterator.stepForward();
|
584
|
+
return iterator.getCurrentTokenRow() !== cursor.row ||
|
585
|
+
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
586
|
+
};
|
587
|
+
|
588
|
+
CstyleBehaviour.$matchTokenType = function(token, types) {
|
589
|
+
return types.indexOf(token.type || token) > -1;
|
590
|
+
};
|
591
|
+
|
592
|
+
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
593
|
+
var cursor = editor.getCursorPosition();
|
594
|
+
var line = session.doc.getLine(cursor.row);
|
595
|
+
if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
|
596
|
+
autoInsertedBrackets = 0;
|
597
|
+
autoInsertedRow = cursor.row;
|
598
|
+
autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
599
|
+
autoInsertedBrackets++;
|
600
|
+
};
|
601
|
+
|
602
|
+
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
603
|
+
var cursor = editor.getCursorPosition();
|
604
|
+
var line = session.doc.getLine(cursor.row);
|
605
|
+
if (!this.isMaybeInsertedClosing(cursor, line))
|
606
|
+
maybeInsertedBrackets = 0;
|
607
|
+
maybeInsertedRow = cursor.row;
|
608
|
+
maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
609
|
+
maybeInsertedLineEnd = line.substr(cursor.column);
|
610
|
+
maybeInsertedBrackets++;
|
611
|
+
};
|
612
|
+
|
613
|
+
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
614
|
+
return autoInsertedBrackets > 0 &&
|
615
|
+
cursor.row === autoInsertedRow &&
|
616
|
+
bracket === autoInsertedLineEnd[0] &&
|
617
|
+
line.substr(cursor.column) === autoInsertedLineEnd;
|
618
|
+
};
|
619
|
+
|
620
|
+
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
621
|
+
return maybeInsertedBrackets > 0 &&
|
622
|
+
cursor.row === maybeInsertedRow &&
|
623
|
+
line.substr(cursor.column) === maybeInsertedLineEnd &&
|
624
|
+
line.substr(0, cursor.column) == maybeInsertedLineStart;
|
625
|
+
};
|
626
|
+
|
627
|
+
CstyleBehaviour.popAutoInsertedClosing = function() {
|
628
|
+
autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
|
629
|
+
autoInsertedBrackets--;
|
630
|
+
};
|
631
|
+
|
632
|
+
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
633
|
+
maybeInsertedBrackets = 0;
|
634
|
+
maybeInsertedRow = -1;
|
635
|
+
};
|
636
|
+
|
637
|
+
this.add("braces", "insertion", function (state, action, editor, session, text) {
|
638
|
+
var cursor = editor.getCursorPosition();
|
639
|
+
var line = session.doc.getLine(cursor.row);
|
640
|
+
if (text == '{') {
|
641
|
+
var selection = editor.getSelectionRange();
|
642
|
+
var selected = session.doc.getTextRange(selection);
|
643
|
+
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
644
|
+
return {
|
645
|
+
text: '{' + selected + '}',
|
646
|
+
selection: false
|
647
|
+
};
|
648
|
+
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
649
|
+
if (/[\]\}\)]/.test(line[cursor.column])) {
|
650
|
+
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
651
|
+
return {
|
652
|
+
text: '{}',
|
653
|
+
selection: [1, 1]
|
654
|
+
};
|
655
|
+
} else {
|
656
|
+
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
657
|
+
return {
|
658
|
+
text: '{',
|
659
|
+
selection: [1, 1]
|
660
|
+
};
|
661
|
+
}
|
662
|
+
}
|
663
|
+
} else if (text == '}') {
|
664
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
665
|
+
if (rightChar == '}') {
|
666
|
+
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
667
|
+
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
668
|
+
CstyleBehaviour.popAutoInsertedClosing();
|
669
|
+
return {
|
670
|
+
text: '',
|
671
|
+
selection: [1, 1]
|
672
|
+
};
|
673
|
+
}
|
674
|
+
}
|
675
|
+
} else if (text == "\n" || text == "\r\n") {
|
676
|
+
var closing = "";
|
677
|
+
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
678
|
+
closing = lang.stringRepeat("}", maybeInsertedBrackets);
|
679
|
+
CstyleBehaviour.clearMaybeInsertedClosing();
|
680
|
+
}
|
681
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
682
|
+
if (rightChar == '}' || closing !== "") {
|
683
|
+
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
|
684
|
+
if (!openBracePos)
|
685
|
+
return null;
|
686
|
+
|
687
|
+
var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
|
688
|
+
var next_indent = this.$getIndent(line);
|
689
|
+
|
690
|
+
return {
|
691
|
+
text: '\n' + indent + '\n' + next_indent + closing,
|
692
|
+
selection: [1, indent.length, 1, indent.length]
|
693
|
+
};
|
694
|
+
}
|
695
|
+
}
|
696
|
+
});
|
697
|
+
|
698
|
+
this.add("braces", "deletion", function (state, action, editor, session, range) {
|
699
|
+
var selected = session.doc.getTextRange(range);
|
700
|
+
if (!range.isMultiLine() && selected == '{') {
|
701
|
+
var line = session.doc.getLine(range.start.row);
|
702
|
+
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
703
|
+
if (rightChar == '}') {
|
704
|
+
range.end.column++;
|
705
|
+
return range;
|
706
|
+
} else {
|
707
|
+
maybeInsertedBrackets--;
|
708
|
+
}
|
709
|
+
}
|
710
|
+
});
|
711
|
+
|
712
|
+
this.add("parens", "insertion", function (state, action, editor, session, text) {
|
713
|
+
if (text == '(') {
|
714
|
+
var selection = editor.getSelectionRange();
|
715
|
+
var selected = session.doc.getTextRange(selection);
|
716
|
+
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
717
|
+
return {
|
718
|
+
text: '(' + selected + ')',
|
719
|
+
selection: false
|
720
|
+
};
|
721
|
+
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
722
|
+
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
723
|
+
return {
|
724
|
+
text: '()',
|
725
|
+
selection: [1, 1]
|
726
|
+
};
|
727
|
+
}
|
728
|
+
} else if (text == ')') {
|
729
|
+
var cursor = editor.getCursorPosition();
|
730
|
+
var line = session.doc.getLine(cursor.row);
|
731
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
732
|
+
if (rightChar == ')') {
|
733
|
+
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
734
|
+
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
735
|
+
CstyleBehaviour.popAutoInsertedClosing();
|
736
|
+
return {
|
737
|
+
text: '',
|
738
|
+
selection: [1, 1]
|
739
|
+
};
|
740
|
+
}
|
741
|
+
}
|
742
|
+
}
|
743
|
+
});
|
744
|
+
|
745
|
+
this.add("parens", "deletion", function (state, action, editor, session, range) {
|
746
|
+
var selected = session.doc.getTextRange(range);
|
747
|
+
if (!range.isMultiLine() && selected == '(') {
|
748
|
+
var line = session.doc.getLine(range.start.row);
|
749
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
750
|
+
if (rightChar == ')') {
|
751
|
+
range.end.column++;
|
752
|
+
return range;
|
753
|
+
}
|
754
|
+
}
|
755
|
+
});
|
756
|
+
|
757
|
+
this.add("brackets", "insertion", function (state, action, editor, session, text) {
|
758
|
+
if (text == '[') {
|
759
|
+
var selection = editor.getSelectionRange();
|
760
|
+
var selected = session.doc.getTextRange(selection);
|
761
|
+
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
762
|
+
return {
|
763
|
+
text: '[' + selected + ']',
|
764
|
+
selection: false
|
765
|
+
};
|
766
|
+
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
767
|
+
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
768
|
+
return {
|
769
|
+
text: '[]',
|
770
|
+
selection: [1, 1]
|
771
|
+
};
|
772
|
+
}
|
773
|
+
} else if (text == ']') {
|
774
|
+
var cursor = editor.getCursorPosition();
|
775
|
+
var line = session.doc.getLine(cursor.row);
|
776
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
777
|
+
if (rightChar == ']') {
|
778
|
+
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
779
|
+
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
780
|
+
CstyleBehaviour.popAutoInsertedClosing();
|
781
|
+
return {
|
782
|
+
text: '',
|
783
|
+
selection: [1, 1]
|
784
|
+
};
|
785
|
+
}
|
786
|
+
}
|
787
|
+
}
|
788
|
+
});
|
789
|
+
|
790
|
+
this.add("brackets", "deletion", function (state, action, editor, session, range) {
|
791
|
+
var selected = session.doc.getTextRange(range);
|
792
|
+
if (!range.isMultiLine() && selected == '[') {
|
793
|
+
var line = session.doc.getLine(range.start.row);
|
794
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
795
|
+
if (rightChar == ']') {
|
796
|
+
range.end.column++;
|
797
|
+
return range;
|
798
|
+
}
|
799
|
+
}
|
800
|
+
});
|
801
|
+
|
802
|
+
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
803
|
+
if (text == '"' || text == "'") {
|
804
|
+
var quote = text;
|
805
|
+
var selection = editor.getSelectionRange();
|
806
|
+
var selected = session.doc.getTextRange(selection);
|
807
|
+
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
808
|
+
return {
|
809
|
+
text: quote + selected + quote,
|
810
|
+
selection: false
|
811
|
+
};
|
812
|
+
} else {
|
813
|
+
var cursor = editor.getCursorPosition();
|
814
|
+
var line = session.doc.getLine(cursor.row);
|
815
|
+
var leftChar = line.substring(cursor.column-1, cursor.column);
|
816
|
+
if (leftChar == '\\') {
|
817
|
+
return null;
|
818
|
+
}
|
819
|
+
var tokens = session.getTokens(selection.start.row);
|
820
|
+
var col = 0, token;
|
821
|
+
var quotepos = -1; // Track whether we're inside an open quote.
|
822
|
+
|
823
|
+
for (var x = 0; x < tokens.length; x++) {
|
824
|
+
token = tokens[x];
|
825
|
+
if (token.type == "string") {
|
826
|
+
quotepos = -1;
|
827
|
+
} else if (quotepos < 0) {
|
828
|
+
quotepos = token.value.indexOf(quote);
|
829
|
+
}
|
830
|
+
if ((token.value.length + col) > selection.start.column) {
|
831
|
+
break;
|
832
|
+
}
|
833
|
+
col += tokens[x].value.length;
|
834
|
+
}
|
835
|
+
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)))) {
|
836
|
+
if (!CstyleBehaviour.isSaneInsertion(editor, session))
|
837
|
+
return;
|
838
|
+
return {
|
839
|
+
text: quote + quote,
|
840
|
+
selection: [1,1]
|
841
|
+
};
|
842
|
+
} else if (token && token.type === "string") {
|
843
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
844
|
+
if (rightChar == quote) {
|
845
|
+
return {
|
846
|
+
text: '',
|
847
|
+
selection: [1, 1]
|
848
|
+
};
|
849
|
+
}
|
850
|
+
}
|
851
|
+
}
|
852
|
+
}
|
853
|
+
});
|
854
|
+
|
855
|
+
this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
|
856
|
+
var selected = session.doc.getTextRange(range);
|
857
|
+
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
858
|
+
var line = session.doc.getLine(range.start.row);
|
859
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
860
|
+
if (rightChar == '"') {
|
861
|
+
range.end.column++;
|
862
|
+
return range;
|
863
|
+
}
|
864
|
+
}
|
865
|
+
});
|
866
|
+
|
867
|
+
};
|
868
|
+
|
869
|
+
oop.inherits(CstyleBehaviour, Behaviour);
|
870
|
+
|
871
|
+
exports.CstyleBehaviour = CstyleBehaviour;
|
872
|
+
});
|
873
|
+
|
874
|
+
define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
875
|
+
|
876
|
+
|
877
|
+
var oop = require("../../lib/oop");
|
878
|
+
var Range = require("../../range").Range;
|
879
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
880
|
+
|
881
|
+
var FoldMode = exports.FoldMode = function() {};
|
882
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
883
|
+
|
884
|
+
(function() {
|
885
|
+
|
886
|
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
887
|
+
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
888
|
+
|
889
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
890
|
+
var line = session.getLine(row);
|
891
|
+
var match = line.match(this.foldingStartMarker);
|
892
|
+
if (match) {
|
893
|
+
var i = match.index;
|
894
|
+
|
895
|
+
if (match[1])
|
896
|
+
return this.openingBracketBlock(session, match[1], row, i);
|
897
|
+
|
898
|
+
return session.getCommentFoldRange(row, i + match[0].length, 1);
|
899
|
+
}
|
900
|
+
|
901
|
+
if (foldStyle !== "markbeginend")
|
902
|
+
return;
|
903
|
+
|
904
|
+
var match = line.match(this.foldingStopMarker);
|
905
|
+
if (match) {
|
906
|
+
var i = match.index + match[0].length;
|
907
|
+
|
908
|
+
if (match[1])
|
909
|
+
return this.closingBracketBlock(session, match[1], row, i);
|
910
|
+
|
911
|
+
return session.getCommentFoldRange(row, i, -1);
|
912
|
+
}
|
913
|
+
};
|
914
|
+
|
915
|
+
}).call(FoldMode.prototype);
|
916
|
+
|
917
|
+
});
|
918
|
+
define('ace/mode/scala_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
919
|
+
|
920
|
+
|
921
|
+
var oop = require("../lib/oop");
|
922
|
+
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
923
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
924
|
+
|
925
|
+
var ScalaHighlightRules = function() {
|
926
|
+
var keywords = (
|
927
|
+
"case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|" +
|
928
|
+
"abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|" +
|
929
|
+
"override|package|private|protected|sealed|super|this|trait|type|val|var|with"
|
930
|
+
);
|
931
|
+
|
932
|
+
var buildinConstants = ("true|false");
|
933
|
+
|
934
|
+
var langClasses = (
|
935
|
+
"AbstractMethodError|AssertionError|ClassCircularityError|"+
|
936
|
+
"ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
|
937
|
+
"ExceptionInInitializerError|IllegalAccessError|"+
|
938
|
+
"IllegalThreadStateException|InstantiationError|InternalError|"+
|
939
|
+
|
940
|
+
"NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
|
941
|
+
"ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
|
942
|
+
"SuppressWarnings|TypeNotPresentException|UnknownError|"+
|
943
|
+
"UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
|
944
|
+
"InstantiationException|IndexOutOfBoundsException|"+
|
945
|
+
"ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
|
946
|
+
"NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
|
947
|
+
"SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
|
948
|
+
"InterruptedException|NoSuchMethodException|IllegalAccessException|"+
|
949
|
+
"UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
|
950
|
+
"Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
|
951
|
+
"NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
|
952
|
+
"NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
|
953
|
+
"Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
|
954
|
+
"Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
|
955
|
+
"StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
|
956
|
+
"ArrayStoreException|ClassCastException|LinkageError|"+
|
957
|
+
"NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
|
958
|
+
"Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
|
959
|
+
"Cloneable|Class|CharSequence|Comparable|String|Object|" +
|
960
|
+
"Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" +
|
961
|
+
"Option|Array|Char|Byte|Short|Int|Long|Nothing"
|
962
|
+
|
963
|
+
|
964
|
+
);
|
965
|
+
|
966
|
+
var keywordMapper = this.createKeywordMapper({
|
967
|
+
"variable.language": "this",
|
968
|
+
"keyword": keywords,
|
969
|
+
"support.function": langClasses,
|
970
|
+
"constant.language": buildinConstants
|
971
|
+
}, "identifier");
|
972
|
+
|
973
|
+
this.$rules = {
|
974
|
+
"start" : [
|
975
|
+
{
|
976
|
+
token : "comment",
|
977
|
+
regex : "\\/\\/.*$"
|
978
|
+
},
|
979
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
980
|
+
{
|
981
|
+
token : "comment", // multi line comment
|
982
|
+
regex : "\\/\\*",
|
983
|
+
next : "comment"
|
984
|
+
}, {
|
985
|
+
token : "string.regexp",
|
986
|
+
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
|
987
|
+
}, {
|
988
|
+
token : "string",
|
989
|
+
regex : '"""',
|
990
|
+
next : "tstring"
|
991
|
+
}, {
|
992
|
+
token : "string",
|
993
|
+
regex : '"(?=.)', // " strings can't span multiple lines
|
994
|
+
next : "string"
|
995
|
+
}, {
|
996
|
+
token : "symbol.constant", // single line
|
997
|
+
regex : "'[\\w\\d_]+"
|
998
|
+
}, {
|
999
|
+
token : "constant.numeric", // hex
|
1000
|
+
regex : "0[xX][0-9a-fA-F]+\\b"
|
1001
|
+
}, {
|
1002
|
+
token : "constant.numeric", // float
|
1003
|
+
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
1004
|
+
}, {
|
1005
|
+
token : "constant.language.boolean",
|
1006
|
+
regex : "(?:true|false)\\b"
|
1007
|
+
}, {
|
1008
|
+
token : keywordMapper,
|
1009
|
+
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
1010
|
+
}, {
|
1011
|
+
token : "keyword.operator",
|
1012
|
+
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
1013
|
+
}, {
|
1014
|
+
token : "paren.lparen",
|
1015
|
+
regex : "[[({]"
|
1016
|
+
}, {
|
1017
|
+
token : "paren.rparen",
|
1018
|
+
regex : "[\\])}]"
|
1019
|
+
}, {
|
1020
|
+
token : "text",
|
1021
|
+
regex : "\\s+"
|
1022
|
+
}
|
1023
|
+
],
|
1024
|
+
"comment" : [
|
1025
|
+
{
|
1026
|
+
token : "comment", // closing comment
|
1027
|
+
regex : ".*?\\*\\/",
|
1028
|
+
next : "start"
|
1029
|
+
}, {
|
1030
|
+
token : "comment", // comment spanning whole line
|
1031
|
+
regex : ".+"
|
1032
|
+
}
|
1033
|
+
],
|
1034
|
+
"string" : [
|
1035
|
+
{
|
1036
|
+
token : "escape",
|
1037
|
+
regex : '\\\\"'
|
1038
|
+
}, {
|
1039
|
+
token : "string",
|
1040
|
+
regex : '"',
|
1041
|
+
next : "start"
|
1042
|
+
}, {
|
1043
|
+
token : "string.invalid",
|
1044
|
+
regex : '[^"\\\\]*$',
|
1045
|
+
next : "start"
|
1046
|
+
}, {
|
1047
|
+
token : "string",
|
1048
|
+
regex : '[^"\\\\]+'
|
1049
|
+
}
|
1050
|
+
],
|
1051
|
+
"tstring" : [
|
1052
|
+
{
|
1053
|
+
token : "string", // closing comment
|
1054
|
+
regex : '"{3,5}',
|
1055
|
+
next : "start"
|
1056
|
+
}, {
|
1057
|
+
token : "string", // comment spanning whole line
|
1058
|
+
regex : ".+?"
|
1059
|
+
}
|
1060
|
+
]
|
1061
|
+
};
|
1062
|
+
|
1063
|
+
this.embedRules(DocCommentHighlightRules, "doc-",
|
1064
|
+
[ DocCommentHighlightRules.getEndRule("start") ]);
|
1065
|
+
};
|
1066
|
+
|
1067
|
+
oop.inherits(ScalaHighlightRules, TextHighlightRules);
|
1068
|
+
|
1069
|
+
exports.ScalaHighlightRules = ScalaHighlightRules;
|
1070
|
+
});
|