ace-rails-ap 0.0.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ace/rails/version.rb +1 -1
- data/vendor/assets/javascripts/ace.js +15680 -1
- data/vendor/assets/javascripts/keybinding-emacs.js +367 -1
- data/vendor/assets/javascripts/keybinding-vim.js +1635 -1
- data/vendor/assets/javascripts/mode-c9search.js +275 -0
- data/vendor/assets/javascripts/mode-c_cpp.js +744 -1
- data/vendor/assets/javascripts/mode-clojure.js +364 -1
- data/vendor/assets/javascripts/mode-coffee.js +527 -1
- data/vendor/assets/javascripts/mode-coldfusion.js +1966 -1
- data/vendor/assets/javascripts/mode-csharp.js +633 -1
- data/vendor/assets/javascripts/mode-css.js +499 -1
- data/vendor/assets/javascripts/mode-diff.js +250 -0
- data/vendor/assets/javascripts/{mode-c_cpp-uncompressed.js → mode-glsl.js} +147 -244
- data/vendor/assets/javascripts/mode-golang.js +681 -1
- data/vendor/assets/javascripts/mode-groovy.js +1240 -1
- data/vendor/assets/javascripts/mode-haxe.js +633 -1
- data/vendor/assets/javascripts/mode-html.js +2064 -1
- data/vendor/assets/javascripts/mode-java.js +1202 -1
- data/vendor/assets/javascripts/mode-javascript.js +1069 -1
- data/vendor/assets/javascripts/mode-json.js +588 -1
- data/vendor/assets/javascripts/{mode-haxe-uncompressed.js → mode-jsx.js} +189 -312
- data/vendor/assets/javascripts/mode-latex.js +95 -1
- data/vendor/assets/javascripts/mode-less.js +512 -1
- data/vendor/assets/javascripts/mode-liquid.js +1125 -1
- data/vendor/assets/javascripts/mode-lua.js +551 -1
- data/vendor/assets/javascripts/{mode-html-uncompressed.js → mode-luahtml.js} +544 -604
- data/vendor/assets/javascripts/{mode-coldfusion-uncompressed.js → mode-luapage.js} +2326 -2180
- data/vendor/assets/javascripts/mode-markdown.js +2369 -1
- data/vendor/assets/javascripts/mode-ocaml.js +464 -1
- data/vendor/assets/javascripts/mode-perl.js +432 -1
- data/vendor/assets/javascripts/mode-pgsql.js +970 -1
- data/vendor/assets/javascripts/mode-php.js +1718 -1
- data/vendor/assets/javascripts/mode-powershell.js +610 -1
- data/vendor/assets/javascripts/mode-python.js +397 -1
- data/vendor/assets/javascripts/mode-ruby.js +318 -1
- data/vendor/assets/javascripts/mode-scad.js +732 -1
- data/vendor/assets/javascripts/mode-scala.js +1237 -1
- data/vendor/assets/javascripts/mode-scss.js +537 -1
- data/vendor/assets/javascripts/mode-sh.js +250 -1
- data/vendor/assets/javascripts/mode-sql.js +140 -1
- data/vendor/assets/javascripts/mode-svg.js +1681 -1
- data/vendor/assets/javascripts/mode-tcl.js +320 -0
- data/vendor/assets/javascripts/mode-textile.js +182 -1
- data/vendor/assets/javascripts/mode-xml.js +829 -1
- data/vendor/assets/javascripts/mode-xquery.js +605 -1
- data/vendor/assets/javascripts/mode-yaml.js +189 -0
- data/vendor/assets/javascripts/theme-chrome.js +213 -1
- data/vendor/assets/javascripts/theme-clouds.js +167 -1
- data/vendor/assets/javascripts/theme-clouds_midnight.js +168 -1
- data/vendor/assets/javascripts/theme-cobalt.js +194 -1
- data/vendor/assets/javascripts/theme-crimson_editor.js +200 -1
- data/vendor/assets/javascripts/theme-dawn.js +198 -1
- data/vendor/assets/javascripts/theme-dreamweaver.js +230 -1
- data/vendor/assets/javascripts/theme-eclipse.js +157 -1
- data/vendor/assets/javascripts/theme-github.js +182 -0
- data/vendor/assets/javascripts/theme-idle_fingers.js +186 -1
- data/vendor/assets/javascripts/theme-kr_theme.js +189 -1
- data/vendor/assets/javascripts/theme-merbivore.js +189 -1
- data/vendor/assets/javascripts/theme-merbivore_soft.js +195 -1
- data/vendor/assets/javascripts/theme-mono_industrial.js +197 -1
- data/vendor/assets/javascripts/theme-monokai.js +194 -1
- data/vendor/assets/javascripts/theme-pastel_on_dark.js +199 -1
- data/vendor/assets/javascripts/theme-solarized_dark.js +180 -1
- data/vendor/assets/javascripts/theme-solarized_light.js +179 -1
- data/vendor/assets/javascripts/theme-textmate.js +216 -0
- data/vendor/assets/javascripts/theme-tomorrow.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_blue.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_bright.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties.js +209 -1
- data/vendor/assets/javascripts/theme-twilight.js +211 -1
- data/vendor/assets/javascripts/theme-vibrant_ink.js +190 -1
- data/vendor/assets/javascripts/worker-coffee.js +83 -893
- data/vendor/assets/javascripts/worker-css.js +88 -1402
- data/vendor/assets/javascripts/worker-javascript.js +97 -812
- data/vendor/assets/javascripts/worker-json.js +84 -761
- data/vendor/assets/javascripts/worker-xquery.js +66464 -0
- metadata +12 -195
- data/vendor/assets/javascripts/ace-compat-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace-compat-uncompressed-noconflict.js +0 -480
- data/vendor/assets/javascripts/ace-compat-uncompressed.js +0 -480
- data/vendor/assets/javascripts/ace-compat.js +0 -1
- data/vendor/assets/javascripts/ace-noconflict.js +0 -10
- data/vendor/assets/javascripts/ace-uncompressed-noconflict.js +0 -19976
- data/vendor/assets/javascripts/ace-uncompressed.js +0 -19976
- data/vendor/assets/javascripts/keybinding-emacs-noconflict.js +0 -1
- data/vendor/assets/javascripts/keybinding-emacs-uncompressed-noconflict.js +0 -150
- data/vendor/assets/javascripts/keybinding-emacs-uncompressed.js +0 -150
- data/vendor/assets/javascripts/keybinding-vim-noconflict.js +0 -1
- data/vendor/assets/javascripts/keybinding-vim-uncompressed-noconflict.js +0 -138
- data/vendor/assets/javascripts/keybinding-vim-uncompressed.js +0 -138
- data/vendor/assets/javascripts/mode-c_cpp-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-c_cpp-uncompressed-noconflict.js +0 -919
- data/vendor/assets/javascripts/mode-clojure-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-clojure-uncompressed-noconflict.js +0 -422
- data/vendor/assets/javascripts/mode-clojure-uncompressed.js +0 -422
- data/vendor/assets/javascripts/mode-coffee-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-coffee-uncompressed-noconflict.js +0 -607
- data/vendor/assets/javascripts/mode-coffee-uncompressed.js +0 -607
- data/vendor/assets/javascripts/mode-coldfusion-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-coldfusion-uncompressed-noconflict.js +0 -2458
- data/vendor/assets/javascripts/mode-csharp-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-csharp-uncompressed-noconflict.js +0 -769
- data/vendor/assets/javascripts/mode-csharp-uncompressed.js +0 -769
- data/vendor/assets/javascripts/mode-css-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-css-uncompressed-noconflict.js +0 -641
- data/vendor/assets/javascripts/mode-css-uncompressed.js +0 -641
- data/vendor/assets/javascripts/mode-golang-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-golang-uncompressed-noconflict.js +0 -378
- data/vendor/assets/javascripts/mode-golang-uncompressed.js +0 -378
- data/vendor/assets/javascripts/mode-groovy-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-groovy-uncompressed-noconflict.js +0 -1393
- data/vendor/assets/javascripts/mode-groovy-uncompressed.js +0 -1393
- data/vendor/assets/javascripts/mode-haxe-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-haxe-uncompressed-noconflict.js +0 -769
- data/vendor/assets/javascripts/mode-html-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-html-uncompressed-noconflict.js +0 -2475
- data/vendor/assets/javascripts/mode-java-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-java-uncompressed-noconflict.js +0 -1395
- data/vendor/assets/javascripts/mode-java-uncompressed.js +0 -1395
- data/vendor/assets/javascripts/mode-javascript-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-javascript-uncompressed-noconflict.js +0 -1226
- data/vendor/assets/javascripts/mode-javascript-uncompressed.js +0 -1226
- data/vendor/assets/javascripts/mode-json-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-json-uncompressed-noconflict.js +0 -701
- data/vendor/assets/javascripts/mode-json-uncompressed.js +0 -701
- data/vendor/assets/javascripts/mode-latex-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-latex-uncompressed-noconflict.js +0 -95
- data/vendor/assets/javascripts/mode-latex-uncompressed.js +0 -95
- data/vendor/assets/javascripts/mode-less-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-less-uncompressed-noconflict.js +0 -655
- data/vendor/assets/javascripts/mode-less-uncompressed.js +0 -655
- data/vendor/assets/javascripts/mode-liquid-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-liquid-uncompressed-noconflict.js +0 -1353
- data/vendor/assets/javascripts/mode-liquid-uncompressed.js +0 -1353
- data/vendor/assets/javascripts/mode-lua-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-lua-uncompressed-noconflict.js +0 -523
- data/vendor/assets/javascripts/mode-lua-uncompressed.js +0 -523
- data/vendor/assets/javascripts/mode-markdown-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-markdown-uncompressed-noconflict.js +0 -2925
- data/vendor/assets/javascripts/mode-markdown-uncompressed.js +0 -2925
- data/vendor/assets/javascripts/mode-ocaml-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-ocaml-uncompressed-noconflict.js +0 -539
- data/vendor/assets/javascripts/mode-ocaml-uncompressed.js +0 -539
- data/vendor/assets/javascripts/mode-perl-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-perl-uncompressed-noconflict.js +0 -574
- data/vendor/assets/javascripts/mode-perl-uncompressed.js +0 -574
- data/vendor/assets/javascripts/mode-pgsql-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-pgsql-uncompressed-noconflict.js +0 -1104
- data/vendor/assets/javascripts/mode-pgsql-uncompressed.js +0 -1104
- data/vendor/assets/javascripts/mode-php-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-php-uncompressed-noconflict.js +0 -1885
- data/vendor/assets/javascripts/mode-php-uncompressed.js +0 -1885
- data/vendor/assets/javascripts/mode-powershell-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-powershell-uncompressed-noconflict.js +0 -710
- data/vendor/assets/javascripts/mode-powershell-uncompressed.js +0 -710
- data/vendor/assets/javascripts/mode-python-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-python-uncompressed-noconflict.js +0 -507
- data/vendor/assets/javascripts/mode-python-uncompressed.js +0 -507
- data/vendor/assets/javascripts/mode-ruby-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-ruby-uncompressed-noconflict.js +0 -391
- data/vendor/assets/javascripts/mode-ruby-uncompressed.js +0 -391
- data/vendor/assets/javascripts/mode-scad-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-scad-uncompressed-noconflict.js +0 -907
- data/vendor/assets/javascripts/mode-scad-uncompressed.js +0 -907
- data/vendor/assets/javascripts/mode-scala-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-scala-uncompressed-noconflict.js +0 -1395
- data/vendor/assets/javascripts/mode-scala-uncompressed.js +0 -1395
- data/vendor/assets/javascripts/mode-scss-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-scss-uncompressed-noconflict.js +0 -679
- data/vendor/assets/javascripts/mode-scss-uncompressed.js +0 -679
- data/vendor/assets/javascripts/mode-sh-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-sh-uncompressed-noconflict.js +0 -289
- data/vendor/assets/javascripts/mode-sh-uncompressed.js +0 -289
- data/vendor/assets/javascripts/mode-sql-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-sql-uncompressed-noconflict.js +0 -159
- data/vendor/assets/javascripts/mode-sql-uncompressed.js +0 -159
- data/vendor/assets/javascripts/mode-svg-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-svg-uncompressed-noconflict.js +0 -2137
- data/vendor/assets/javascripts/mode-svg-uncompressed.js +0 -2137
- data/vendor/assets/javascripts/mode-text-noconflict.js +0 -0
- data/vendor/assets/javascripts/mode-text-uncompressed-noconflict.js +0 -0
- data/vendor/assets/javascripts/mode-text-uncompressed.js +0 -0
- data/vendor/assets/javascripts/mode-textile-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-textile-uncompressed-noconflict.js +0 -254
- data/vendor/assets/javascripts/mode-textile-uncompressed.js +0 -254
- data/vendor/assets/javascripts/mode-xml-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-xml-uncompressed-noconflict.js +0 -1012
- data/vendor/assets/javascripts/mode-xml-uncompressed.js +0 -1012
- data/vendor/assets/javascripts/mode-xquery-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-xquery-uncompressed-noconflict.js +0 -540
- data/vendor/assets/javascripts/mode-xquery-uncompressed.js +0 -540
- data/vendor/assets/javascripts/theme-chrome-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-chrome-uncompressed-noconflict.js +0 -207
- data/vendor/assets/javascripts/theme-chrome-uncompressed.js +0 -207
- data/vendor/assets/javascripts/theme-clouds-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-clouds-uncompressed-noconflict.js +0 -160
- data/vendor/assets/javascripts/theme-clouds-uncompressed.js +0 -160
- data/vendor/assets/javascripts/theme-clouds_midnight-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed-noconflict.js +0 -161
- data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed.js +0 -161
- data/vendor/assets/javascripts/theme-cobalt-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-cobalt-uncompressed-noconflict.js +0 -187
- data/vendor/assets/javascripts/theme-cobalt-uncompressed.js +0 -187
- data/vendor/assets/javascripts/theme-crimson_editor-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-crimson_editor-uncompressed-noconflict.js +0 -198
- data/vendor/assets/javascripts/theme-crimson_editor-uncompressed.js +0 -198
- data/vendor/assets/javascripts/theme-dawn-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-dawn-uncompressed-noconflict.js +0 -191
- data/vendor/assets/javascripts/theme-dawn-uncompressed.js +0 -191
- data/vendor/assets/javascripts/theme-dreamweaver-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-dreamweaver-uncompressed-noconflict.js +0 -227
- data/vendor/assets/javascripts/theme-dreamweaver-uncompressed.js +0 -227
- data/vendor/assets/javascripts/theme-eclipse-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-eclipse-uncompressed-noconflict.js +0 -147
- data/vendor/assets/javascripts/theme-eclipse-uncompressed.js +0 -147
- data/vendor/assets/javascripts/theme-idle_fingers-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-idle_fingers-uncompressed-noconflict.js +0 -179
- data/vendor/assets/javascripts/theme-idle_fingers-uncompressed.js +0 -179
- data/vendor/assets/javascripts/theme-kr_theme-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-kr_theme-uncompressed-noconflict.js +0 -182
- data/vendor/assets/javascripts/theme-kr_theme-uncompressed.js +0 -182
- data/vendor/assets/javascripts/theme-merbivore-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-merbivore-uncompressed-noconflict.js +0 -182
- data/vendor/assets/javascripts/theme-merbivore-uncompressed.js +0 -182
- data/vendor/assets/javascripts/theme-merbivore_soft-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed-noconflict.js +0 -188
- data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed.js +0 -188
- data/vendor/assets/javascripts/theme-mono_industrial-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-mono_industrial-uncompressed-noconflict.js +0 -190
- data/vendor/assets/javascripts/theme-mono_industrial-uncompressed.js +0 -190
- data/vendor/assets/javascripts/theme-monokai-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-monokai-uncompressed-noconflict.js +0 -191
- data/vendor/assets/javascripts/theme-monokai-uncompressed.js +0 -191
- data/vendor/assets/javascripts/theme-pastel_on_dark-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed-noconflict.js +0 -192
- data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed.js +0 -192
- data/vendor/assets/javascripts/theme-solarized_dark-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-solarized_dark-uncompressed-noconflict.js +0 -176
- data/vendor/assets/javascripts/theme-solarized_dark-uncompressed.js +0 -176
- data/vendor/assets/javascripts/theme-solarized_light-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-solarized_light-uncompressed-noconflict.js +0 -172
- data/vendor/assets/javascripts/theme-solarized_light-uncompressed.js +0 -172
- data/vendor/assets/javascripts/theme-textmate-noconflict.js +0 -0
- data/vendor/assets/javascripts/theme-textmate-uncompressed-noconflict.js +0 -0
- data/vendor/assets/javascripts/theme-textmate-uncompressed.js +0 -0
- data/vendor/assets/javascripts/theme-tomorrow-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow-uncompressed-noconflict.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow-uncompressed.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed-noconflict.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed-noconflict.js +0 -209
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed.js +0 -209
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed-noconflict.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed-noconflict.js +0 -202
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed.js +0 -202
- data/vendor/assets/javascripts/theme-twilight-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-twilight-uncompressed-noconflict.js +0 -204
- data/vendor/assets/javascripts/theme-twilight-uncompressed.js +0 -204
- data/vendor/assets/javascripts/theme-vibrant_ink-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed-noconflict.js +0 -183
- data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed.js +0 -183
@@ -1 +1,633 @@
|
|
1
|
-
define(
|
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
|
+
|
51
|
+
this.createWorker = function(session) {
|
52
|
+
return null;
|
53
|
+
};
|
54
|
+
|
55
|
+
}).call(Mode.prototype);
|
56
|
+
|
57
|
+
exports.Mode = Mode;
|
58
|
+
});
|
59
|
+
define('ace/mode/haxe_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
60
|
+
|
61
|
+
|
62
|
+
var oop = require("../lib/oop");
|
63
|
+
var lang = require("../lib/lang");
|
64
|
+
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
65
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
66
|
+
|
67
|
+
var HaxeHighlightRules = function() {
|
68
|
+
|
69
|
+
var keywords = lang.arrayToMap(
|
70
|
+
("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").split("|")
|
71
|
+
);
|
72
|
+
|
73
|
+
var buildinConstants = lang.arrayToMap(
|
74
|
+
("null|true|false").split("|")
|
75
|
+
);
|
76
|
+
|
77
|
+
|
78
|
+
// regexp must not have capturing parentheses. Use (?:) instead.
|
79
|
+
// regexps are ordered -> the first match is used
|
80
|
+
|
81
|
+
this.$rules = {
|
82
|
+
"start" : [
|
83
|
+
{
|
84
|
+
token : "comment",
|
85
|
+
regex : "\\/\\/.*$"
|
86
|
+
},
|
87
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
88
|
+
{
|
89
|
+
token : "comment", // multi line comment
|
90
|
+
regex : "\\/\\*",
|
91
|
+
merge : true,
|
92
|
+
next : "comment"
|
93
|
+
}, {
|
94
|
+
token : "string.regexp",
|
95
|
+
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
|
96
|
+
}, {
|
97
|
+
token : "string", // single line
|
98
|
+
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
99
|
+
}, {
|
100
|
+
token : "string", // single line
|
101
|
+
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
102
|
+
}, {
|
103
|
+
token : "constant.numeric", // hex
|
104
|
+
regex : "0[xX][0-9a-fA-F]+\\b"
|
105
|
+
}, {
|
106
|
+
token : "constant.numeric", // float
|
107
|
+
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
108
|
+
}, {
|
109
|
+
token : "constant.language.boolean",
|
110
|
+
regex : "(?:true|false)\\b"
|
111
|
+
}, {
|
112
|
+
token : function(value) {
|
113
|
+
if (value == "this")
|
114
|
+
return "variable.language";
|
115
|
+
else if (keywords.hasOwnProperty(value))
|
116
|
+
return "keyword";
|
117
|
+
else if (buildinConstants.hasOwnProperty(value))
|
118
|
+
return "constant.language";
|
119
|
+
else
|
120
|
+
return "identifier";
|
121
|
+
},
|
122
|
+
// TODO: Unicode escape sequences
|
123
|
+
// TODO: Unicode identifiers
|
124
|
+
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
125
|
+
}, {
|
126
|
+
token : "keyword.operator",
|
127
|
+
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
128
|
+
}, {
|
129
|
+
token : "punctuation.operator",
|
130
|
+
regex : "\\?|\\:|\\,|\\;|\\."
|
131
|
+
}, {
|
132
|
+
token : "paren.lparen",
|
133
|
+
regex : "[[({<]"
|
134
|
+
}, {
|
135
|
+
token : "paren.rparen",
|
136
|
+
regex : "[\\])}>]"
|
137
|
+
}, {
|
138
|
+
token : "text",
|
139
|
+
regex : "\\s+"
|
140
|
+
}
|
141
|
+
],
|
142
|
+
"comment" : [
|
143
|
+
{
|
144
|
+
token : "comment", // closing comment
|
145
|
+
regex : ".*?\\*\\/",
|
146
|
+
next : "start"
|
147
|
+
}, {
|
148
|
+
token : "comment", // comment spanning whole line
|
149
|
+
merge : true,
|
150
|
+
regex : ".+"
|
151
|
+
}
|
152
|
+
]
|
153
|
+
};
|
154
|
+
|
155
|
+
this.embedRules(DocCommentHighlightRules, "doc-",
|
156
|
+
[ DocCommentHighlightRules.getEndRule("start") ]);
|
157
|
+
};
|
158
|
+
|
159
|
+
oop.inherits(HaxeHighlightRules, TextHighlightRules);
|
160
|
+
|
161
|
+
exports.HaxeHighlightRules = HaxeHighlightRules;
|
162
|
+
});
|
163
|
+
|
164
|
+
define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
165
|
+
|
166
|
+
|
167
|
+
var oop = require("../lib/oop");
|
168
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
169
|
+
|
170
|
+
var DocCommentHighlightRules = function() {
|
171
|
+
|
172
|
+
this.$rules = {
|
173
|
+
"start" : [ {
|
174
|
+
token : "comment.doc.tag",
|
175
|
+
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
176
|
+
}, {
|
177
|
+
token : "comment.doc",
|
178
|
+
merge : true,
|
179
|
+
regex : "\\s+"
|
180
|
+
}, {
|
181
|
+
token : "comment.doc",
|
182
|
+
merge : true,
|
183
|
+
regex : "TODO"
|
184
|
+
}, {
|
185
|
+
token : "comment.doc",
|
186
|
+
merge : true,
|
187
|
+
regex : "[^@\\*]+"
|
188
|
+
}, {
|
189
|
+
token : "comment.doc",
|
190
|
+
merge : true,
|
191
|
+
regex : "."
|
192
|
+
}]
|
193
|
+
};
|
194
|
+
};
|
195
|
+
|
196
|
+
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
197
|
+
|
198
|
+
DocCommentHighlightRules.getStartRule = function(start) {
|
199
|
+
return {
|
200
|
+
token : "comment.doc", // doc comment
|
201
|
+
merge : true,
|
202
|
+
regex : "\\/\\*(?=\\*)",
|
203
|
+
next : start
|
204
|
+
};
|
205
|
+
};
|
206
|
+
|
207
|
+
DocCommentHighlightRules.getEndRule = function (start) {
|
208
|
+
return {
|
209
|
+
token : "comment.doc", // closing comment
|
210
|
+
merge : true,
|
211
|
+
regex : "\\*\\/",
|
212
|
+
next : start
|
213
|
+
};
|
214
|
+
};
|
215
|
+
|
216
|
+
|
217
|
+
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
218
|
+
|
219
|
+
});
|
220
|
+
|
221
|
+
define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
222
|
+
|
223
|
+
|
224
|
+
var Range = require("../range").Range;
|
225
|
+
|
226
|
+
var MatchingBraceOutdent = function() {};
|
227
|
+
|
228
|
+
(function() {
|
229
|
+
|
230
|
+
this.checkOutdent = function(line, input) {
|
231
|
+
if (! /^\s+$/.test(line))
|
232
|
+
return false;
|
233
|
+
|
234
|
+
return /^\s*\}/.test(input);
|
235
|
+
};
|
236
|
+
|
237
|
+
this.autoOutdent = function(doc, row) {
|
238
|
+
var line = doc.getLine(row);
|
239
|
+
var match = line.match(/^(\s*\})/);
|
240
|
+
|
241
|
+
if (!match) return 0;
|
242
|
+
|
243
|
+
var column = match[1].length;
|
244
|
+
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
245
|
+
|
246
|
+
if (!openBracePos || openBracePos.row == row) return 0;
|
247
|
+
|
248
|
+
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
249
|
+
doc.replace(new Range(row, 0, row, column-1), indent);
|
250
|
+
};
|
251
|
+
|
252
|
+
this.$getIndent = function(line) {
|
253
|
+
var match = line.match(/^(\s+)/);
|
254
|
+
if (match) {
|
255
|
+
return match[1];
|
256
|
+
}
|
257
|
+
|
258
|
+
return "";
|
259
|
+
};
|
260
|
+
|
261
|
+
}).call(MatchingBraceOutdent.prototype);
|
262
|
+
|
263
|
+
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
264
|
+
});
|
265
|
+
|
266
|
+
define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
|
267
|
+
|
268
|
+
|
269
|
+
var oop = require("../../lib/oop");
|
270
|
+
var Behaviour = require("../behaviour").Behaviour;
|
271
|
+
|
272
|
+
var CstyleBehaviour = function () {
|
273
|
+
|
274
|
+
this.add("braces", "insertion", function (state, action, editor, session, text) {
|
275
|
+
if (text == '{') {
|
276
|
+
var selection = editor.getSelectionRange();
|
277
|
+
var selected = session.doc.getTextRange(selection);
|
278
|
+
if (selected !== "") {
|
279
|
+
return {
|
280
|
+
text: '{' + selected + '}',
|
281
|
+
selection: false
|
282
|
+
};
|
283
|
+
} else {
|
284
|
+
return {
|
285
|
+
text: '{}',
|
286
|
+
selection: [1, 1]
|
287
|
+
};
|
288
|
+
}
|
289
|
+
} else if (text == '}') {
|
290
|
+
var cursor = editor.getCursorPosition();
|
291
|
+
var line = session.doc.getLine(cursor.row);
|
292
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
293
|
+
if (rightChar == '}') {
|
294
|
+
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
295
|
+
if (matching !== null) {
|
296
|
+
return {
|
297
|
+
text: '',
|
298
|
+
selection: [1, 1]
|
299
|
+
};
|
300
|
+
}
|
301
|
+
}
|
302
|
+
} else if (text == "\n") {
|
303
|
+
var cursor = editor.getCursorPosition();
|
304
|
+
var line = session.doc.getLine(cursor.row);
|
305
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
306
|
+
if (rightChar == '}') {
|
307
|
+
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
|
308
|
+
if (!openBracePos)
|
309
|
+
return null;
|
310
|
+
|
311
|
+
var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
|
312
|
+
var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
|
313
|
+
|
314
|
+
return {
|
315
|
+
text: '\n' + indent + '\n' + next_indent,
|
316
|
+
selection: [1, indent.length, 1, indent.length]
|
317
|
+
};
|
318
|
+
}
|
319
|
+
}
|
320
|
+
});
|
321
|
+
|
322
|
+
this.add("braces", "deletion", function (state, action, editor, session, range) {
|
323
|
+
var selected = session.doc.getTextRange(range);
|
324
|
+
if (!range.isMultiLine() && selected == '{') {
|
325
|
+
var line = session.doc.getLine(range.start.row);
|
326
|
+
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
327
|
+
if (rightChar == '}') {
|
328
|
+
range.end.column++;
|
329
|
+
return range;
|
330
|
+
}
|
331
|
+
}
|
332
|
+
});
|
333
|
+
|
334
|
+
this.add("parens", "insertion", function (state, action, editor, session, text) {
|
335
|
+
if (text == '(') {
|
336
|
+
var selection = editor.getSelectionRange();
|
337
|
+
var selected = session.doc.getTextRange(selection);
|
338
|
+
if (selected !== "") {
|
339
|
+
return {
|
340
|
+
text: '(' + selected + ')',
|
341
|
+
selection: false
|
342
|
+
};
|
343
|
+
} else {
|
344
|
+
return {
|
345
|
+
text: '()',
|
346
|
+
selection: [1, 1]
|
347
|
+
};
|
348
|
+
}
|
349
|
+
} else if (text == ')') {
|
350
|
+
var cursor = editor.getCursorPosition();
|
351
|
+
var line = session.doc.getLine(cursor.row);
|
352
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
353
|
+
if (rightChar == ')') {
|
354
|
+
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
355
|
+
if (matching !== null) {
|
356
|
+
return {
|
357
|
+
text: '',
|
358
|
+
selection: [1, 1]
|
359
|
+
};
|
360
|
+
}
|
361
|
+
}
|
362
|
+
}
|
363
|
+
});
|
364
|
+
|
365
|
+
this.add("parens", "deletion", function (state, action, editor, session, range) {
|
366
|
+
var selected = session.doc.getTextRange(range);
|
367
|
+
if (!range.isMultiLine() && selected == '(') {
|
368
|
+
var line = session.doc.getLine(range.start.row);
|
369
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
370
|
+
if (rightChar == ')') {
|
371
|
+
range.end.column++;
|
372
|
+
return range;
|
373
|
+
}
|
374
|
+
}
|
375
|
+
});
|
376
|
+
|
377
|
+
this.add("brackets", "insertion", function (state, action, editor, session, text) {
|
378
|
+
if (text == '[') {
|
379
|
+
var selection = editor.getSelectionRange();
|
380
|
+
var selected = session.doc.getTextRange(selection);
|
381
|
+
if (selected !== "") {
|
382
|
+
return {
|
383
|
+
text: '[' + selected + ']',
|
384
|
+
selection: false
|
385
|
+
};
|
386
|
+
} else {
|
387
|
+
return {
|
388
|
+
text: '[]',
|
389
|
+
selection: [1, 1]
|
390
|
+
};
|
391
|
+
}
|
392
|
+
} else if (text == ']') {
|
393
|
+
var cursor = editor.getCursorPosition();
|
394
|
+
var line = session.doc.getLine(cursor.row);
|
395
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
396
|
+
if (rightChar == ']') {
|
397
|
+
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
398
|
+
if (matching !== null) {
|
399
|
+
return {
|
400
|
+
text: '',
|
401
|
+
selection: [1, 1]
|
402
|
+
};
|
403
|
+
}
|
404
|
+
}
|
405
|
+
}
|
406
|
+
});
|
407
|
+
|
408
|
+
this.add("brackets", "deletion", function (state, action, editor, session, range) {
|
409
|
+
var selected = session.doc.getTextRange(range);
|
410
|
+
if (!range.isMultiLine() && selected == '[') {
|
411
|
+
var line = session.doc.getLine(range.start.row);
|
412
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
413
|
+
if (rightChar == ']') {
|
414
|
+
range.end.column++;
|
415
|
+
return range;
|
416
|
+
}
|
417
|
+
}
|
418
|
+
});
|
419
|
+
|
420
|
+
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
421
|
+
if (text == '"' || text == "'") {
|
422
|
+
var quote = text;
|
423
|
+
var selection = editor.getSelectionRange();
|
424
|
+
var selected = session.doc.getTextRange(selection);
|
425
|
+
if (selected !== "") {
|
426
|
+
return {
|
427
|
+
text: quote + selected + quote,
|
428
|
+
selection: false
|
429
|
+
};
|
430
|
+
} else {
|
431
|
+
var cursor = editor.getCursorPosition();
|
432
|
+
var line = session.doc.getLine(cursor.row);
|
433
|
+
var leftChar = line.substring(cursor.column-1, cursor.column);
|
434
|
+
|
435
|
+
// We're escaped.
|
436
|
+
if (leftChar == '\\') {
|
437
|
+
return null;
|
438
|
+
}
|
439
|
+
|
440
|
+
// Find what token we're inside.
|
441
|
+
var tokens = session.getTokens(selection.start.row);
|
442
|
+
var col = 0, token;
|
443
|
+
var quotepos = -1; // Track whether we're inside an open quote.
|
444
|
+
|
445
|
+
for (var x = 0; x < tokens.length; x++) {
|
446
|
+
token = tokens[x];
|
447
|
+
if (token.type == "string") {
|
448
|
+
quotepos = -1;
|
449
|
+
} else if (quotepos < 0) {
|
450
|
+
quotepos = token.value.indexOf(quote);
|
451
|
+
}
|
452
|
+
if ((token.value.length + col) > selection.start.column) {
|
453
|
+
break;
|
454
|
+
}
|
455
|
+
col += tokens[x].value.length;
|
456
|
+
}
|
457
|
+
|
458
|
+
// Try and be smart about when we auto insert.
|
459
|
+
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)))) {
|
460
|
+
return {
|
461
|
+
text: quote + quote,
|
462
|
+
selection: [1,1]
|
463
|
+
};
|
464
|
+
} else if (token && token.type === "string") {
|
465
|
+
// Ignore input and move right one if we're typing over the closing quote.
|
466
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
467
|
+
if (rightChar == quote) {
|
468
|
+
return {
|
469
|
+
text: '',
|
470
|
+
selection: [1, 1]
|
471
|
+
};
|
472
|
+
}
|
473
|
+
}
|
474
|
+
}
|
475
|
+
}
|
476
|
+
});
|
477
|
+
|
478
|
+
this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
|
479
|
+
var selected = session.doc.getTextRange(range);
|
480
|
+
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
481
|
+
var line = session.doc.getLine(range.start.row);
|
482
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
483
|
+
if (rightChar == '"') {
|
484
|
+
range.end.column++;
|
485
|
+
return range;
|
486
|
+
}
|
487
|
+
}
|
488
|
+
});
|
489
|
+
|
490
|
+
};
|
491
|
+
|
492
|
+
oop.inherits(CstyleBehaviour, Behaviour);
|
493
|
+
|
494
|
+
exports.CstyleBehaviour = CstyleBehaviour;
|
495
|
+
});
|
496
|
+
|
497
|
+
define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
498
|
+
|
499
|
+
|
500
|
+
var oop = require("../../lib/oop");
|
501
|
+
var Range = require("../../range").Range;
|
502
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
503
|
+
|
504
|
+
var FoldMode = exports.FoldMode = function() {};
|
505
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
506
|
+
|
507
|
+
(function() {
|
508
|
+
|
509
|
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
510
|
+
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
511
|
+
|
512
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
513
|
+
var line = session.getLine(row);
|
514
|
+
var match = line.match(this.foldingStartMarker);
|
515
|
+
if (match) {
|
516
|
+
var i = match.index;
|
517
|
+
|
518
|
+
if (match[1])
|
519
|
+
return this.openingBracketBlock(session, match[1], row, i);
|
520
|
+
|
521
|
+
var range = session.getCommentFoldRange(row, i + match[0].length);
|
522
|
+
range.end.column -= 2;
|
523
|
+
return range;
|
524
|
+
}
|
525
|
+
|
526
|
+
if (foldStyle !== "markbeginend")
|
527
|
+
return;
|
528
|
+
|
529
|
+
var match = line.match(this.foldingStopMarker);
|
530
|
+
if (match) {
|
531
|
+
var i = match.index + match[0].length;
|
532
|
+
|
533
|
+
if (match[2]) {
|
534
|
+
var range = session.getCommentFoldRange(row, i);
|
535
|
+
range.end.column -= 2;
|
536
|
+
return range;
|
537
|
+
}
|
538
|
+
|
539
|
+
var end = {row: row, column: i};
|
540
|
+
var start = session.$findOpeningBracket(match[1], end);
|
541
|
+
|
542
|
+
if (!start)
|
543
|
+
return;
|
544
|
+
|
545
|
+
start.column++;
|
546
|
+
end.column--;
|
547
|
+
|
548
|
+
return Range.fromPoints(start, end);
|
549
|
+
}
|
550
|
+
};
|
551
|
+
|
552
|
+
}).call(FoldMode.prototype);
|
553
|
+
|
554
|
+
});
|
555
|
+
|
556
|
+
define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
557
|
+
|
558
|
+
|
559
|
+
var Range = require("../../range").Range;
|
560
|
+
|
561
|
+
var FoldMode = exports.FoldMode = function() {};
|
562
|
+
|
563
|
+
(function() {
|
564
|
+
|
565
|
+
this.foldingStartMarker = null;
|
566
|
+
this.foldingStopMarker = null;
|
567
|
+
|
568
|
+
// must return "" if there's no fold, to enable caching
|
569
|
+
this.getFoldWidget = function(session, foldStyle, row) {
|
570
|
+
var line = session.getLine(row);
|
571
|
+
if (this.foldingStartMarker.test(line))
|
572
|
+
return "start";
|
573
|
+
if (foldStyle == "markbeginend"
|
574
|
+
&& this.foldingStopMarker
|
575
|
+
&& this.foldingStopMarker.test(line))
|
576
|
+
return "end";
|
577
|
+
return "";
|
578
|
+
};
|
579
|
+
|
580
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
581
|
+
return null;
|
582
|
+
};
|
583
|
+
|
584
|
+
this.indentationBlock = function(session, row, column) {
|
585
|
+
var re = /\S/;
|
586
|
+
var line = session.getLine(row);
|
587
|
+
var startLevel = line.search(re);
|
588
|
+
if (startLevel == -1)
|
589
|
+
return;
|
590
|
+
|
591
|
+
var startColumn = column || line.length;
|
592
|
+
var maxRow = session.getLength();
|
593
|
+
var startRow = row;
|
594
|
+
var endRow = row;
|
595
|
+
|
596
|
+
while (++row < maxRow) {
|
597
|
+
var level = session.getLine(row).search(re);
|
598
|
+
|
599
|
+
if (level == -1)
|
600
|
+
continue;
|
601
|
+
|
602
|
+
if (level <= startLevel)
|
603
|
+
break;
|
604
|
+
|
605
|
+
endRow = row;
|
606
|
+
}
|
607
|
+
|
608
|
+
if (endRow > startRow) {
|
609
|
+
var endColumn = session.getLine(endRow).length;
|
610
|
+
return new Range(startRow, startColumn, endRow, endColumn);
|
611
|
+
}
|
612
|
+
};
|
613
|
+
|
614
|
+
this.openingBracketBlock = function(session, bracket, row, column, typeRe) {
|
615
|
+
var start = {row: row, column: column + 1};
|
616
|
+
var end = session.$findClosingBracket(bracket, start, typeRe);
|
617
|
+
if (!end)
|
618
|
+
return;
|
619
|
+
|
620
|
+
var fw = session.foldWidgets[end.row];
|
621
|
+
if (fw == null)
|
622
|
+
fw = this.getFoldWidget(session, end.row);
|
623
|
+
|
624
|
+
if (fw == "start" && end.row > start.row) {
|
625
|
+
end.row --;
|
626
|
+
end.column = session.getLine(end.row).length;
|
627
|
+
}
|
628
|
+
return Range.fromPoints(start, end);
|
629
|
+
};
|
630
|
+
|
631
|
+
}).call(FoldMode.prototype);
|
632
|
+
|
633
|
+
});
|