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,1237 @@
|
|
1
|
-
define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/scala_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./javascript").Mode,f=a("../tokenizer").Tokenizer,g=a("./scala_highlight_rules").ScalaHighlightRules,h=function(){e.call(this),this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.createWorker=function(a){return null}}.call(h.prototype),b.Mode=h}),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(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b",l="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"comment",regex:/\/\/.*$/},g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+k+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"constant.language.boolean",regex:/(?:true|false)\b/},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:["punctuation.operator","support.function"],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(?=\()/},{token:["punctuation.operator","support.function.dom"],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(?=\()/},{token:["punctuation.operator","support.constant"],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/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"storage.type":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,next:"regex_allowed"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"regex_allowed"},{token:"paren.lparen",regex:/[\[({]/,next:"regex_allowed"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"regex_allowed"},{token:"comment",regex:/^#!.*$/},{token:"text",regex:/\s+/}],regex_allowed:[g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",merge:!0},{token:"empty",regex:"",next:"start"}],function_arguments:[{token:"variable.parameter",regex:k},{token:"punctuation.operator",regex:"[, ]+",merge:!0},{token:"punctuation.operator",regex:"$",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]},this.embedRules(g,"doc-",[g.getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),f.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},f.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}},b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'||e=="'"){var f=e,g=c.getSelectionRange(),h=d.doc.getTextRange(g);if(h!=="")return{text:f+h+f,selection:!1};var i=c.getCursorPosition(),j=d.doc.getLine(i.row),k=j.substring(i.column-1,i.column);if(k=="\\")return null;var l=d.getTokens(g.start.row,g.start.row)[0].tokens,m=0,n,o=-1;for(var p=0;p<l.length;p++){n=l[p],n.type=="string"?o=-1:o<0&&(o=n.value.indexOf(f));if(n.value.length+m>g.start.column)break;m+=l[p].value.length}if(!n||o<0&&n.type!=="comment"&&(n.type!=="string"||g.start.column!==n.value.length+m-1&&n.value.lastIndexOf(f)===n.value.length-1))return{text:f+f,selection:[1,1]};if(n&&n.type==="string"){var q=j.substring(i.column,i.column+1);if(q==f)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&(f=='"'||f=="'")){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}}).call(e.prototype)}),define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|override|package|private|protected|sealed|super|this|trait|type|val|var|with".split("|")),b=e.arrayToMap("true|false".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object|Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|Option|Array|Char|Byte|Short|Int|Long|Nothing".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},f.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[f.getEndRule("start")])};d.inherits(h,g),b.ScalaHighlightRules=h})
|
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
|
+
var errors = [];
|
125
|
+
for (var i=0; i<results.data.length; i++) {
|
126
|
+
var error = results.data[i];
|
127
|
+
if (error)
|
128
|
+
errors.push({
|
129
|
+
row: error.line-1,
|
130
|
+
column: error.character-1,
|
131
|
+
text: error.reason,
|
132
|
+
type: "warning",
|
133
|
+
lint: error
|
134
|
+
});
|
135
|
+
}
|
136
|
+
session.setAnnotations(errors);
|
137
|
+
});
|
138
|
+
|
139
|
+
worker.on("narcissus", function(e) {
|
140
|
+
session.setAnnotations([e.data]);
|
141
|
+
});
|
142
|
+
|
143
|
+
worker.on("terminate", function() {
|
144
|
+
session.clearAnnotations();
|
145
|
+
});
|
146
|
+
|
147
|
+
return worker;
|
148
|
+
};
|
149
|
+
|
150
|
+
}).call(Mode.prototype);
|
151
|
+
|
152
|
+
exports.Mode = Mode;
|
153
|
+
});
|
154
|
+
|
155
|
+
define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
156
|
+
|
157
|
+
|
158
|
+
var oop = require("../lib/oop");
|
159
|
+
var lang = require("../lib/lang");
|
160
|
+
var unicode = require("../unicode");
|
161
|
+
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
162
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
163
|
+
|
164
|
+
var JavaScriptHighlightRules = function() {
|
165
|
+
|
166
|
+
// see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
|
167
|
+
var globals = lang.arrayToMap(
|
168
|
+
// Constructors
|
169
|
+
("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
|
170
|
+
// E4X
|
171
|
+
"Namespace|QName|XML|XMLList|" +
|
172
|
+
"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
|
173
|
+
"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
|
174
|
+
// Errors
|
175
|
+
"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
|
176
|
+
"SyntaxError|TypeError|URIError|" +
|
177
|
+
// Non-constructor functions
|
178
|
+
"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
|
179
|
+
"isNaN|parseFloat|parseInt|" +
|
180
|
+
// Other
|
181
|
+
"JSON|Math|" +
|
182
|
+
// Pseudo
|
183
|
+
"this|arguments|prototype|window|document"
|
184
|
+
).split("|")
|
185
|
+
);
|
186
|
+
|
187
|
+
var keywords = lang.arrayToMap(
|
188
|
+
("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
189
|
+
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
|
190
|
+
"const|yield|import|get|set").split("|")
|
191
|
+
);
|
192
|
+
|
193
|
+
// keywords which can be followed by regular expressions
|
194
|
+
var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
|
195
|
+
|
196
|
+
var deprecated = lang.arrayToMap(
|
197
|
+
("__parent__|__count__|escape|unescape|with|__proto__").split("|")
|
198
|
+
);
|
199
|
+
|
200
|
+
var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
|
201
|
+
|
202
|
+
var buildinConstants = lang.arrayToMap(
|
203
|
+
("null|Infinity|NaN|undefined").split("|")
|
204
|
+
);
|
205
|
+
|
206
|
+
var futureReserved = lang.arrayToMap(
|
207
|
+
("class|enum|extends|super|export|implements|private|" +
|
208
|
+
"public|interface|package|protected|static").split("|")
|
209
|
+
);
|
210
|
+
|
211
|
+
// TODO: Unicode escape sequences
|
212
|
+
var identifierRe = "[" + unicode.packages.L + "\\$_]["
|
213
|
+
+ unicode.packages.L
|
214
|
+
+ unicode.packages.Mn + unicode.packages.Mc
|
215
|
+
+ unicode.packages.Nd
|
216
|
+
+ unicode.packages.Pc + "\\$_]*\\b";
|
217
|
+
|
218
|
+
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
|
219
|
+
"u[0-9a-fA-F]{4}|" + // unicode
|
220
|
+
"[0-2][0-7]{0,2}|" + // oct
|
221
|
+
"3[0-6][0-7]?|" + // oct
|
222
|
+
"37[0-7]?|" + // oct
|
223
|
+
"[4-7][0-7]?|" + //oct
|
224
|
+
".)";
|
225
|
+
|
226
|
+
// regexp must not have capturing parentheses. Use (?:) instead.
|
227
|
+
// regexps are ordered -> the first match is used
|
228
|
+
|
229
|
+
this.$rules = {
|
230
|
+
"start" : [
|
231
|
+
{
|
232
|
+
token : "comment",
|
233
|
+
regex : /\/\/.*$/
|
234
|
+
},
|
235
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
236
|
+
{
|
237
|
+
token : "comment", // multi line comment
|
238
|
+
merge : true,
|
239
|
+
regex : /\/\*/,
|
240
|
+
next : "comment"
|
241
|
+
}, {
|
242
|
+
token : "string",
|
243
|
+
regex : "'(?=.)",
|
244
|
+
next : "qstring"
|
245
|
+
}, {
|
246
|
+
token : "string",
|
247
|
+
regex : '"(?=.)',
|
248
|
+
next : "qqstring"
|
249
|
+
}, {
|
250
|
+
token : "constant.numeric", // hex
|
251
|
+
regex : /0[xX][0-9a-fA-F]+\b/
|
252
|
+
}, {
|
253
|
+
token : "constant.numeric", // float
|
254
|
+
regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
|
255
|
+
}, { // match stuff like: Sound.prototype.play = function() { }
|
256
|
+
token : [
|
257
|
+
"storage.type",
|
258
|
+
"punctuation.operator",
|
259
|
+
"support.function",
|
260
|
+
"punctuation.operator",
|
261
|
+
"entity.name.function",
|
262
|
+
"text",
|
263
|
+
"keyword.operator",
|
264
|
+
"text",
|
265
|
+
"storage.type",
|
266
|
+
"text",
|
267
|
+
"paren.lparen"
|
268
|
+
],
|
269
|
+
regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
270
|
+
next: "function_arguments"
|
271
|
+
}, { // match stuff like: Sound.prototype.play = myfunc
|
272
|
+
token : [
|
273
|
+
"storage.type",
|
274
|
+
"punctuation.operator",
|
275
|
+
"support.function",
|
276
|
+
"punctuation.operator",
|
277
|
+
"entity.name.function",
|
278
|
+
"text",
|
279
|
+
"keyword.operator",
|
280
|
+
"text"
|
281
|
+
],
|
282
|
+
regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)",
|
283
|
+
next: "function_arguments"
|
284
|
+
}, { // match stuff like: Sound.play = function() { }
|
285
|
+
token : [
|
286
|
+
"storage.type",
|
287
|
+
"punctuation.operator",
|
288
|
+
"entity.name.function",
|
289
|
+
"text",
|
290
|
+
"keyword.operator",
|
291
|
+
"text",
|
292
|
+
"storage.type",
|
293
|
+
"text",
|
294
|
+
"paren.lparen"
|
295
|
+
],
|
296
|
+
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
297
|
+
next: "function_arguments"
|
298
|
+
}, { // match stuff like: play = function() { }
|
299
|
+
token : [
|
300
|
+
"entity.name.function",
|
301
|
+
"text",
|
302
|
+
"keyword.operator",
|
303
|
+
"text",
|
304
|
+
"storage.type",
|
305
|
+
"text",
|
306
|
+
"paren.lparen"
|
307
|
+
],
|
308
|
+
regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
309
|
+
next: "function_arguments"
|
310
|
+
}, { // match stuff like: Sound.play = function play() { }
|
311
|
+
token : [
|
312
|
+
"storage.type",
|
313
|
+
"punctuation.operator",
|
314
|
+
"entity.name.function",
|
315
|
+
"text",
|
316
|
+
"keyword.operator",
|
317
|
+
"text",
|
318
|
+
"storage.type",
|
319
|
+
"text",
|
320
|
+
"entity.name.function",
|
321
|
+
"text",
|
322
|
+
"paren.lparen"
|
323
|
+
],
|
324
|
+
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
|
325
|
+
next: "function_arguments"
|
326
|
+
}, { // match regular function like: function myFunc(arg) { }
|
327
|
+
token : [
|
328
|
+
"storage.type",
|
329
|
+
"text",
|
330
|
+
"entity.name.function",
|
331
|
+
"text",
|
332
|
+
"paren.lparen"
|
333
|
+
],
|
334
|
+
regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
|
335
|
+
next: "function_arguments"
|
336
|
+
}, { // match stuff like: foobar: function() { }
|
337
|
+
token : [
|
338
|
+
"entity.name.function",
|
339
|
+
"text",
|
340
|
+
"punctuation.operator",
|
341
|
+
"text",
|
342
|
+
"storage.type",
|
343
|
+
"text",
|
344
|
+
"paren.lparen"
|
345
|
+
],
|
346
|
+
regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
|
347
|
+
next: "function_arguments"
|
348
|
+
}, { // Attempt to match : function() { } (this is for issues with 'foo': function() { })
|
349
|
+
token : [
|
350
|
+
"text",
|
351
|
+
"text",
|
352
|
+
"storage.type",
|
353
|
+
"text",
|
354
|
+
"paren.lparen"
|
355
|
+
],
|
356
|
+
regex : "(:)(\\s*)(function)(\\s*)(\\()",
|
357
|
+
next: "function_arguments"
|
358
|
+
}, {
|
359
|
+
token : "constant.language.boolean",
|
360
|
+
regex : /(?:true|false)\b/
|
361
|
+
}, {
|
362
|
+
token : "keyword",
|
363
|
+
regex : "(?:" + kwBeforeRe + ")\\b",
|
364
|
+
next : "regex_allowed"
|
365
|
+
}, {
|
366
|
+
token : ["punctuation.operator", "support.function"],
|
367
|
+
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(?=\()/
|
368
|
+
}, {
|
369
|
+
token : ["punctuation.operator", "support.function.dom"],
|
370
|
+
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(?=\()/
|
371
|
+
}, {
|
372
|
+
token : ["punctuation.operator", "support.constant"],
|
373
|
+
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/
|
374
|
+
}, {
|
375
|
+
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
|
376
|
+
regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
|
377
|
+
}, {
|
378
|
+
token : function(value) {
|
379
|
+
if (globals.hasOwnProperty(value))
|
380
|
+
return "variable.language";
|
381
|
+
else if (deprecated.hasOwnProperty(value))
|
382
|
+
return "invalid.deprecated";
|
383
|
+
else if (definitions.hasOwnProperty(value))
|
384
|
+
return "storage.type";
|
385
|
+
else if (keywords.hasOwnProperty(value))
|
386
|
+
return "keyword";
|
387
|
+
else if (buildinConstants.hasOwnProperty(value))
|
388
|
+
return "constant.language";
|
389
|
+
else if (futureReserved.hasOwnProperty(value))
|
390
|
+
return "invalid.illegal";
|
391
|
+
else if (value == "debugger")
|
392
|
+
return "invalid.deprecated";
|
393
|
+
else
|
394
|
+
return "identifier";
|
395
|
+
},
|
396
|
+
regex : identifierRe
|
397
|
+
}, {
|
398
|
+
token : "keyword.operator",
|
399
|
+
regex : /!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,
|
400
|
+
next : "regex_allowed"
|
401
|
+
}, {
|
402
|
+
token : "punctuation.operator",
|
403
|
+
regex : /\?|\:|\,|\;|\./,
|
404
|
+
next : "regex_allowed"
|
405
|
+
}, {
|
406
|
+
token : "paren.lparen",
|
407
|
+
regex : /[\[({]/,
|
408
|
+
next : "regex_allowed"
|
409
|
+
}, {
|
410
|
+
token : "paren.rparen",
|
411
|
+
regex : /[\])}]/
|
412
|
+
}, {
|
413
|
+
token : "keyword.operator",
|
414
|
+
regex : /\/=?/,
|
415
|
+
next : "regex_allowed"
|
416
|
+
}, {
|
417
|
+
token: "comment",
|
418
|
+
regex: /^#!.*$/
|
419
|
+
}, {
|
420
|
+
token : "text",
|
421
|
+
regex : /\s+/
|
422
|
+
}
|
423
|
+
],
|
424
|
+
// regular expressions are only allowed after certain tokens. This
|
425
|
+
// makes sure we don't mix up regexps with the divison operator
|
426
|
+
"regex_allowed": [
|
427
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
428
|
+
{
|
429
|
+
token : "comment", // multi line comment
|
430
|
+
merge : true,
|
431
|
+
regex : "\\/\\*",
|
432
|
+
next : "comment_regex_allowed"
|
433
|
+
}, {
|
434
|
+
token : "comment",
|
435
|
+
regex : "\\/\\/.*$"
|
436
|
+
}, {
|
437
|
+
token: "string.regexp",
|
438
|
+
regex: "\\/",
|
439
|
+
next: "regex",
|
440
|
+
merge: true
|
441
|
+
}, {
|
442
|
+
token : "text",
|
443
|
+
regex : "\\s+"
|
444
|
+
}, {
|
445
|
+
// immediately return to the start mode without matching
|
446
|
+
// anything
|
447
|
+
token: "empty",
|
448
|
+
regex: "",
|
449
|
+
next: "start"
|
450
|
+
}
|
451
|
+
],
|
452
|
+
"regex": [
|
453
|
+
{
|
454
|
+
token: "regexp.keyword.operator",
|
455
|
+
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
456
|
+
}, {
|
457
|
+
// flag
|
458
|
+
token: "string.regexp",
|
459
|
+
regex: "/\\w*",
|
460
|
+
next: "start",
|
461
|
+
merge: true
|
462
|
+
}, {
|
463
|
+
token: "string.regexp",
|
464
|
+
regex: "[^\\\\/\\[]+",
|
465
|
+
merge: true
|
466
|
+
}, {
|
467
|
+
token: "string.regexp.charachterclass",
|
468
|
+
regex: "\\[",
|
469
|
+
next: "regex_character_class",
|
470
|
+
merge: true
|
471
|
+
}, {
|
472
|
+
token: "empty",
|
473
|
+
regex: "",
|
474
|
+
next: "start"
|
475
|
+
}
|
476
|
+
],
|
477
|
+
"regex_character_class": [
|
478
|
+
{
|
479
|
+
token: "regexp.keyword.operator",
|
480
|
+
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
481
|
+
}, {
|
482
|
+
token: "string.regexp.charachterclass",
|
483
|
+
regex: "]",
|
484
|
+
next: "regex",
|
485
|
+
merge: true
|
486
|
+
}, {
|
487
|
+
token: "string.regexp.charachterclass",
|
488
|
+
regex: "[^\\\\\\]]+",
|
489
|
+
merge: true
|
490
|
+
}, {
|
491
|
+
token: "empty",
|
492
|
+
regex: "",
|
493
|
+
next: "start"
|
494
|
+
}
|
495
|
+
],
|
496
|
+
"function_arguments": [
|
497
|
+
{
|
498
|
+
token: "variable.parameter",
|
499
|
+
regex: identifierRe
|
500
|
+
}, {
|
501
|
+
token: "punctuation.operator",
|
502
|
+
regex: "[, ]+",
|
503
|
+
merge: true
|
504
|
+
}, {
|
505
|
+
token: "punctuation.operator",
|
506
|
+
regex: "$",
|
507
|
+
merge: true
|
508
|
+
}, {
|
509
|
+
token: "empty",
|
510
|
+
regex: "",
|
511
|
+
next: "start"
|
512
|
+
}
|
513
|
+
],
|
514
|
+
"comment_regex_allowed" : [
|
515
|
+
{
|
516
|
+
token : "comment", // closing comment
|
517
|
+
regex : ".*?\\*\\/",
|
518
|
+
merge : true,
|
519
|
+
next : "regex_allowed"
|
520
|
+
}, {
|
521
|
+
token : "comment", // comment spanning whole line
|
522
|
+
merge : true,
|
523
|
+
regex : ".+"
|
524
|
+
}
|
525
|
+
],
|
526
|
+
"comment" : [
|
527
|
+
{
|
528
|
+
token : "comment", // closing comment
|
529
|
+
regex : ".*?\\*\\/",
|
530
|
+
merge : true,
|
531
|
+
next : "start"
|
532
|
+
}, {
|
533
|
+
token : "comment", // comment spanning whole line
|
534
|
+
merge : true,
|
535
|
+
regex : ".+"
|
536
|
+
}
|
537
|
+
],
|
538
|
+
"qqstring" : [
|
539
|
+
{
|
540
|
+
token : "constant.language.escape",
|
541
|
+
regex : escapedRe
|
542
|
+
}, {
|
543
|
+
token : "string",
|
544
|
+
regex : '[^"\\\\]+',
|
545
|
+
merge : true
|
546
|
+
}, {
|
547
|
+
token : "string",
|
548
|
+
regex : "\\\\$",
|
549
|
+
next : "qqstring",
|
550
|
+
merge : true
|
551
|
+
}, {
|
552
|
+
token : "string",
|
553
|
+
regex : '"|$',
|
554
|
+
next : "start",
|
555
|
+
merge : true
|
556
|
+
}
|
557
|
+
],
|
558
|
+
"qstring" : [
|
559
|
+
{
|
560
|
+
token : "constant.language.escape",
|
561
|
+
regex : escapedRe
|
562
|
+
}, {
|
563
|
+
token : "string",
|
564
|
+
regex : "[^'\\\\]+",
|
565
|
+
merge : true
|
566
|
+
}, {
|
567
|
+
token : "string",
|
568
|
+
regex : "\\\\$",
|
569
|
+
next : "qstring",
|
570
|
+
merge : true
|
571
|
+
}, {
|
572
|
+
token : "string",
|
573
|
+
regex : "'|$",
|
574
|
+
next : "start",
|
575
|
+
merge : true
|
576
|
+
}
|
577
|
+
]
|
578
|
+
};
|
579
|
+
|
580
|
+
this.embedRules(DocCommentHighlightRules, "doc-",
|
581
|
+
[ DocCommentHighlightRules.getEndRule("start") ]);
|
582
|
+
};
|
583
|
+
|
584
|
+
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
|
585
|
+
|
586
|
+
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
|
587
|
+
});
|
588
|
+
|
589
|
+
define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
590
|
+
|
591
|
+
|
592
|
+
var oop = require("../lib/oop");
|
593
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
594
|
+
|
595
|
+
var DocCommentHighlightRules = function() {
|
596
|
+
|
597
|
+
this.$rules = {
|
598
|
+
"start" : [ {
|
599
|
+
token : "comment.doc.tag",
|
600
|
+
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
601
|
+
}, {
|
602
|
+
token : "comment.doc",
|
603
|
+
merge : true,
|
604
|
+
regex : "\\s+"
|
605
|
+
}, {
|
606
|
+
token : "comment.doc",
|
607
|
+
merge : true,
|
608
|
+
regex : "TODO"
|
609
|
+
}, {
|
610
|
+
token : "comment.doc",
|
611
|
+
merge : true,
|
612
|
+
regex : "[^@\\*]+"
|
613
|
+
}, {
|
614
|
+
token : "comment.doc",
|
615
|
+
merge : true,
|
616
|
+
regex : "."
|
617
|
+
}]
|
618
|
+
};
|
619
|
+
};
|
620
|
+
|
621
|
+
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
622
|
+
|
623
|
+
DocCommentHighlightRules.getStartRule = function(start) {
|
624
|
+
return {
|
625
|
+
token : "comment.doc", // doc comment
|
626
|
+
merge : true,
|
627
|
+
regex : "\\/\\*(?=\\*)",
|
628
|
+
next : start
|
629
|
+
};
|
630
|
+
};
|
631
|
+
|
632
|
+
DocCommentHighlightRules.getEndRule = function (start) {
|
633
|
+
return {
|
634
|
+
token : "comment.doc", // closing comment
|
635
|
+
merge : true,
|
636
|
+
regex : "\\*\\/",
|
637
|
+
next : start
|
638
|
+
};
|
639
|
+
};
|
640
|
+
|
641
|
+
|
642
|
+
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
643
|
+
|
644
|
+
});
|
645
|
+
|
646
|
+
define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
647
|
+
|
648
|
+
|
649
|
+
var Range = require("../range").Range;
|
650
|
+
|
651
|
+
var MatchingBraceOutdent = function() {};
|
652
|
+
|
653
|
+
(function() {
|
654
|
+
|
655
|
+
this.checkOutdent = function(line, input) {
|
656
|
+
if (! /^\s+$/.test(line))
|
657
|
+
return false;
|
658
|
+
|
659
|
+
return /^\s*\}/.test(input);
|
660
|
+
};
|
661
|
+
|
662
|
+
this.autoOutdent = function(doc, row) {
|
663
|
+
var line = doc.getLine(row);
|
664
|
+
var match = line.match(/^(\s*\})/);
|
665
|
+
|
666
|
+
if (!match) return 0;
|
667
|
+
|
668
|
+
var column = match[1].length;
|
669
|
+
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
670
|
+
|
671
|
+
if (!openBracePos || openBracePos.row == row) return 0;
|
672
|
+
|
673
|
+
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
674
|
+
doc.replace(new Range(row, 0, row, column-1), indent);
|
675
|
+
};
|
676
|
+
|
677
|
+
this.$getIndent = function(line) {
|
678
|
+
var match = line.match(/^(\s+)/);
|
679
|
+
if (match) {
|
680
|
+
return match[1];
|
681
|
+
}
|
682
|
+
|
683
|
+
return "";
|
684
|
+
};
|
685
|
+
|
686
|
+
}).call(MatchingBraceOutdent.prototype);
|
687
|
+
|
688
|
+
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
689
|
+
});
|
690
|
+
|
691
|
+
define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
|
692
|
+
|
693
|
+
|
694
|
+
var oop = require("../../lib/oop");
|
695
|
+
var Behaviour = require("../behaviour").Behaviour;
|
696
|
+
|
697
|
+
var CstyleBehaviour = function () {
|
698
|
+
|
699
|
+
this.add("braces", "insertion", function (state, action, editor, session, text) {
|
700
|
+
if (text == '{') {
|
701
|
+
var selection = editor.getSelectionRange();
|
702
|
+
var selected = session.doc.getTextRange(selection);
|
703
|
+
if (selected !== "") {
|
704
|
+
return {
|
705
|
+
text: '{' + selected + '}',
|
706
|
+
selection: false
|
707
|
+
};
|
708
|
+
} else {
|
709
|
+
return {
|
710
|
+
text: '{}',
|
711
|
+
selection: [1, 1]
|
712
|
+
};
|
713
|
+
}
|
714
|
+
} else if (text == '}') {
|
715
|
+
var cursor = editor.getCursorPosition();
|
716
|
+
var line = session.doc.getLine(cursor.row);
|
717
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
718
|
+
if (rightChar == '}') {
|
719
|
+
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
720
|
+
if (matching !== null) {
|
721
|
+
return {
|
722
|
+
text: '',
|
723
|
+
selection: [1, 1]
|
724
|
+
};
|
725
|
+
}
|
726
|
+
}
|
727
|
+
} else if (text == "\n") {
|
728
|
+
var cursor = editor.getCursorPosition();
|
729
|
+
var line = session.doc.getLine(cursor.row);
|
730
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
731
|
+
if (rightChar == '}') {
|
732
|
+
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
|
733
|
+
if (!openBracePos)
|
734
|
+
return null;
|
735
|
+
|
736
|
+
var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
|
737
|
+
var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
|
738
|
+
|
739
|
+
return {
|
740
|
+
text: '\n' + indent + '\n' + next_indent,
|
741
|
+
selection: [1, indent.length, 1, indent.length]
|
742
|
+
};
|
743
|
+
}
|
744
|
+
}
|
745
|
+
});
|
746
|
+
|
747
|
+
this.add("braces", "deletion", function (state, action, editor, session, range) {
|
748
|
+
var selected = session.doc.getTextRange(range);
|
749
|
+
if (!range.isMultiLine() && selected == '{') {
|
750
|
+
var line = session.doc.getLine(range.start.row);
|
751
|
+
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
752
|
+
if (rightChar == '}') {
|
753
|
+
range.end.column++;
|
754
|
+
return range;
|
755
|
+
}
|
756
|
+
}
|
757
|
+
});
|
758
|
+
|
759
|
+
this.add("parens", "insertion", function (state, action, editor, session, text) {
|
760
|
+
if (text == '(') {
|
761
|
+
var selection = editor.getSelectionRange();
|
762
|
+
var selected = session.doc.getTextRange(selection);
|
763
|
+
if (selected !== "") {
|
764
|
+
return {
|
765
|
+
text: '(' + selected + ')',
|
766
|
+
selection: false
|
767
|
+
};
|
768
|
+
} else {
|
769
|
+
return {
|
770
|
+
text: '()',
|
771
|
+
selection: [1, 1]
|
772
|
+
};
|
773
|
+
}
|
774
|
+
} else if (text == ')') {
|
775
|
+
var cursor = editor.getCursorPosition();
|
776
|
+
var line = session.doc.getLine(cursor.row);
|
777
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
778
|
+
if (rightChar == ')') {
|
779
|
+
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
780
|
+
if (matching !== null) {
|
781
|
+
return {
|
782
|
+
text: '',
|
783
|
+
selection: [1, 1]
|
784
|
+
};
|
785
|
+
}
|
786
|
+
}
|
787
|
+
}
|
788
|
+
});
|
789
|
+
|
790
|
+
this.add("parens", "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("brackets", "insertion", function (state, action, editor, session, text) {
|
803
|
+
if (text == '[') {
|
804
|
+
var selection = editor.getSelectionRange();
|
805
|
+
var selected = session.doc.getTextRange(selection);
|
806
|
+
if (selected !== "") {
|
807
|
+
return {
|
808
|
+
text: '[' + selected + ']',
|
809
|
+
selection: false
|
810
|
+
};
|
811
|
+
} else {
|
812
|
+
return {
|
813
|
+
text: '[]',
|
814
|
+
selection: [1, 1]
|
815
|
+
};
|
816
|
+
}
|
817
|
+
} else if (text == ']') {
|
818
|
+
var cursor = editor.getCursorPosition();
|
819
|
+
var line = session.doc.getLine(cursor.row);
|
820
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
821
|
+
if (rightChar == ']') {
|
822
|
+
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
823
|
+
if (matching !== null) {
|
824
|
+
return {
|
825
|
+
text: '',
|
826
|
+
selection: [1, 1]
|
827
|
+
};
|
828
|
+
}
|
829
|
+
}
|
830
|
+
}
|
831
|
+
});
|
832
|
+
|
833
|
+
this.add("brackets", "deletion", function (state, action, editor, session, range) {
|
834
|
+
var selected = session.doc.getTextRange(range);
|
835
|
+
if (!range.isMultiLine() && selected == '[') {
|
836
|
+
var line = session.doc.getLine(range.start.row);
|
837
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
838
|
+
if (rightChar == ']') {
|
839
|
+
range.end.column++;
|
840
|
+
return range;
|
841
|
+
}
|
842
|
+
}
|
843
|
+
});
|
844
|
+
|
845
|
+
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
846
|
+
if (text == '"' || text == "'") {
|
847
|
+
var quote = text;
|
848
|
+
var selection = editor.getSelectionRange();
|
849
|
+
var selected = session.doc.getTextRange(selection);
|
850
|
+
if (selected !== "") {
|
851
|
+
return {
|
852
|
+
text: quote + selected + quote,
|
853
|
+
selection: false
|
854
|
+
};
|
855
|
+
} else {
|
856
|
+
var cursor = editor.getCursorPosition();
|
857
|
+
var line = session.doc.getLine(cursor.row);
|
858
|
+
var leftChar = line.substring(cursor.column-1, cursor.column);
|
859
|
+
|
860
|
+
// We're escaped.
|
861
|
+
if (leftChar == '\\') {
|
862
|
+
return null;
|
863
|
+
}
|
864
|
+
|
865
|
+
// Find what token we're inside.
|
866
|
+
var tokens = session.getTokens(selection.start.row);
|
867
|
+
var col = 0, token;
|
868
|
+
var quotepos = -1; // Track whether we're inside an open quote.
|
869
|
+
|
870
|
+
for (var x = 0; x < tokens.length; x++) {
|
871
|
+
token = tokens[x];
|
872
|
+
if (token.type == "string") {
|
873
|
+
quotepos = -1;
|
874
|
+
} else if (quotepos < 0) {
|
875
|
+
quotepos = token.value.indexOf(quote);
|
876
|
+
}
|
877
|
+
if ((token.value.length + col) > selection.start.column) {
|
878
|
+
break;
|
879
|
+
}
|
880
|
+
col += tokens[x].value.length;
|
881
|
+
}
|
882
|
+
|
883
|
+
// Try and be smart about when we auto insert.
|
884
|
+
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)))) {
|
885
|
+
return {
|
886
|
+
text: quote + quote,
|
887
|
+
selection: [1,1]
|
888
|
+
};
|
889
|
+
} else if (token && token.type === "string") {
|
890
|
+
// Ignore input and move right one if we're typing over the closing quote.
|
891
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
892
|
+
if (rightChar == quote) {
|
893
|
+
return {
|
894
|
+
text: '',
|
895
|
+
selection: [1, 1]
|
896
|
+
};
|
897
|
+
}
|
898
|
+
}
|
899
|
+
}
|
900
|
+
}
|
901
|
+
});
|
902
|
+
|
903
|
+
this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
|
904
|
+
var selected = session.doc.getTextRange(range);
|
905
|
+
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
906
|
+
var line = session.doc.getLine(range.start.row);
|
907
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
908
|
+
if (rightChar == '"') {
|
909
|
+
range.end.column++;
|
910
|
+
return range;
|
911
|
+
}
|
912
|
+
}
|
913
|
+
});
|
914
|
+
|
915
|
+
};
|
916
|
+
|
917
|
+
oop.inherits(CstyleBehaviour, Behaviour);
|
918
|
+
|
919
|
+
exports.CstyleBehaviour = CstyleBehaviour;
|
920
|
+
});
|
921
|
+
|
922
|
+
define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
923
|
+
|
924
|
+
|
925
|
+
var oop = require("../../lib/oop");
|
926
|
+
var Range = require("../../range").Range;
|
927
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
928
|
+
|
929
|
+
var FoldMode = exports.FoldMode = function() {};
|
930
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
931
|
+
|
932
|
+
(function() {
|
933
|
+
|
934
|
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
935
|
+
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
936
|
+
|
937
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
938
|
+
var line = session.getLine(row);
|
939
|
+
var match = line.match(this.foldingStartMarker);
|
940
|
+
if (match) {
|
941
|
+
var i = match.index;
|
942
|
+
|
943
|
+
if (match[1])
|
944
|
+
return this.openingBracketBlock(session, match[1], row, i);
|
945
|
+
|
946
|
+
var range = session.getCommentFoldRange(row, i + match[0].length);
|
947
|
+
range.end.column -= 2;
|
948
|
+
return range;
|
949
|
+
}
|
950
|
+
|
951
|
+
if (foldStyle !== "markbeginend")
|
952
|
+
return;
|
953
|
+
|
954
|
+
var match = line.match(this.foldingStopMarker);
|
955
|
+
if (match) {
|
956
|
+
var i = match.index + match[0].length;
|
957
|
+
|
958
|
+
if (match[2]) {
|
959
|
+
var range = session.getCommentFoldRange(row, i);
|
960
|
+
range.end.column -= 2;
|
961
|
+
return range;
|
962
|
+
}
|
963
|
+
|
964
|
+
var end = {row: row, column: i};
|
965
|
+
var start = session.$findOpeningBracket(match[1], end);
|
966
|
+
|
967
|
+
if (!start)
|
968
|
+
return;
|
969
|
+
|
970
|
+
start.column++;
|
971
|
+
end.column--;
|
972
|
+
|
973
|
+
return Range.fromPoints(start, end);
|
974
|
+
}
|
975
|
+
};
|
976
|
+
|
977
|
+
}).call(FoldMode.prototype);
|
978
|
+
|
979
|
+
});
|
980
|
+
|
981
|
+
define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
982
|
+
|
983
|
+
|
984
|
+
var Range = require("../../range").Range;
|
985
|
+
|
986
|
+
var FoldMode = exports.FoldMode = function() {};
|
987
|
+
|
988
|
+
(function() {
|
989
|
+
|
990
|
+
this.foldingStartMarker = null;
|
991
|
+
this.foldingStopMarker = null;
|
992
|
+
|
993
|
+
// must return "" if there's no fold, to enable caching
|
994
|
+
this.getFoldWidget = function(session, foldStyle, row) {
|
995
|
+
var line = session.getLine(row);
|
996
|
+
if (this.foldingStartMarker.test(line))
|
997
|
+
return "start";
|
998
|
+
if (foldStyle == "markbeginend"
|
999
|
+
&& this.foldingStopMarker
|
1000
|
+
&& this.foldingStopMarker.test(line))
|
1001
|
+
return "end";
|
1002
|
+
return "";
|
1003
|
+
};
|
1004
|
+
|
1005
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
1006
|
+
return null;
|
1007
|
+
};
|
1008
|
+
|
1009
|
+
this.indentationBlock = function(session, row, column) {
|
1010
|
+
var re = /\S/;
|
1011
|
+
var line = session.getLine(row);
|
1012
|
+
var startLevel = line.search(re);
|
1013
|
+
if (startLevel == -1)
|
1014
|
+
return;
|
1015
|
+
|
1016
|
+
var startColumn = column || line.length;
|
1017
|
+
var maxRow = session.getLength();
|
1018
|
+
var startRow = row;
|
1019
|
+
var endRow = row;
|
1020
|
+
|
1021
|
+
while (++row < maxRow) {
|
1022
|
+
var level = session.getLine(row).search(re);
|
1023
|
+
|
1024
|
+
if (level == -1)
|
1025
|
+
continue;
|
1026
|
+
|
1027
|
+
if (level <= startLevel)
|
1028
|
+
break;
|
1029
|
+
|
1030
|
+
endRow = row;
|
1031
|
+
}
|
1032
|
+
|
1033
|
+
if (endRow > startRow) {
|
1034
|
+
var endColumn = session.getLine(endRow).length;
|
1035
|
+
return new Range(startRow, startColumn, endRow, endColumn);
|
1036
|
+
}
|
1037
|
+
};
|
1038
|
+
|
1039
|
+
this.openingBracketBlock = function(session, bracket, row, column, typeRe) {
|
1040
|
+
var start = {row: row, column: column + 1};
|
1041
|
+
var end = session.$findClosingBracket(bracket, start, typeRe);
|
1042
|
+
if (!end)
|
1043
|
+
return;
|
1044
|
+
|
1045
|
+
var fw = session.foldWidgets[end.row];
|
1046
|
+
if (fw == null)
|
1047
|
+
fw = this.getFoldWidget(session, end.row);
|
1048
|
+
|
1049
|
+
if (fw == "start" && end.row > start.row) {
|
1050
|
+
end.row --;
|
1051
|
+
end.column = session.getLine(end.row).length;
|
1052
|
+
}
|
1053
|
+
return Range.fromPoints(start, end);
|
1054
|
+
};
|
1055
|
+
|
1056
|
+
}).call(FoldMode.prototype);
|
1057
|
+
|
1058
|
+
});
|
1059
|
+
define('ace/mode/scala_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) {
|
1060
|
+
|
1061
|
+
|
1062
|
+
var oop = require("../lib/oop");
|
1063
|
+
var lang = require("../lib/lang");
|
1064
|
+
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
1065
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
1066
|
+
|
1067
|
+
var ScalaHighlightRules = function() {
|
1068
|
+
|
1069
|
+
// taken from http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
|
1070
|
+
var keywords = lang.arrayToMap(
|
1071
|
+
(
|
1072
|
+
"case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|" +
|
1073
|
+
"abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|" +
|
1074
|
+
"override|package|private|protected|sealed|super|this|trait|type|val|var|with"
|
1075
|
+
).split("|")
|
1076
|
+
);
|
1077
|
+
|
1078
|
+
var buildinConstants = lang.arrayToMap(
|
1079
|
+
("true|false").split("|")
|
1080
|
+
);
|
1081
|
+
|
1082
|
+
var langClasses = lang.arrayToMap(
|
1083
|
+
("AbstractMethodError|AssertionError|ClassCircularityError|"+
|
1084
|
+
"ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
|
1085
|
+
"ExceptionInInitializerError|IllegalAccessError|"+
|
1086
|
+
"IllegalThreadStateException|InstantiationError|InternalError|"+
|
1087
|
+
|
1088
|
+
"NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
|
1089
|
+
"ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
|
1090
|
+
"SuppressWarnings|TypeNotPresentException|UnknownError|"+
|
1091
|
+
"UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
|
1092
|
+
"InstantiationException|IndexOutOfBoundsException|"+
|
1093
|
+
"ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
|
1094
|
+
"NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
|
1095
|
+
"SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
|
1096
|
+
"InterruptedException|NoSuchMethodException|IllegalAccessException|"+
|
1097
|
+
"UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
|
1098
|
+
"Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
|
1099
|
+
"NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
|
1100
|
+
"NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
|
1101
|
+
"Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
|
1102
|
+
"Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
|
1103
|
+
"StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
|
1104
|
+
"ArrayStoreException|ClassCastException|LinkageError|"+
|
1105
|
+
"NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
|
1106
|
+
"Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
|
1107
|
+
"Cloneable|Class|CharSequence|Comparable|String|Object|" +
|
1108
|
+
"Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" +
|
1109
|
+
"Option|Array|Char|Byte|Short|Int|Long|Nothing"
|
1110
|
+
|
1111
|
+
).split("|")
|
1112
|
+
);
|
1113
|
+
|
1114
|
+
var importClasses = lang.arrayToMap(
|
1115
|
+
("").split("|")
|
1116
|
+
);
|
1117
|
+
// regexp must not have capturing parentheses. Use (?:) instead.
|
1118
|
+
// regexps are ordered -> the first match is used
|
1119
|
+
|
1120
|
+
this.$rules = {
|
1121
|
+
"start" : [
|
1122
|
+
{
|
1123
|
+
token : "comment",
|
1124
|
+
regex : "\\/\\/.*$"
|
1125
|
+
},
|
1126
|
+
DocCommentHighlightRules.getStartRule("doc-start"),
|
1127
|
+
{
|
1128
|
+
token : "comment", // multi line comment
|
1129
|
+
merge : true,
|
1130
|
+
regex : "\\/\\*",
|
1131
|
+
next : "comment"
|
1132
|
+
}, {
|
1133
|
+
token : "string.regexp",
|
1134
|
+
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
|
1135
|
+
}, {
|
1136
|
+
token : "string",
|
1137
|
+
regex : '"""',
|
1138
|
+
next : "tstring"
|
1139
|
+
}, {
|
1140
|
+
token : "string",
|
1141
|
+
regex : '"(?=.)', // " strings can't span multiple lines
|
1142
|
+
next : "string"
|
1143
|
+
}, {
|
1144
|
+
token : "symbol.constant", // single line
|
1145
|
+
regex : "'[\\w\\d_]+"
|
1146
|
+
}, {
|
1147
|
+
token : "constant.numeric", // hex
|
1148
|
+
regex : "0[xX][0-9a-fA-F]+\\b"
|
1149
|
+
}, {
|
1150
|
+
token : "constant.numeric", // float
|
1151
|
+
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
1152
|
+
}, {
|
1153
|
+
token : "constant.language.boolean",
|
1154
|
+
regex : "(?:true|false)\\b"
|
1155
|
+
}, {
|
1156
|
+
token : function(value) {
|
1157
|
+
if (value == "this")
|
1158
|
+
return "variable.language";
|
1159
|
+
else if (keywords.hasOwnProperty(value))
|
1160
|
+
return "keyword";
|
1161
|
+
else if (langClasses.hasOwnProperty(value))
|
1162
|
+
return "support.function";
|
1163
|
+
else if (importClasses.hasOwnProperty(value))
|
1164
|
+
return "support.function";
|
1165
|
+
else if (buildinConstants.hasOwnProperty(value))
|
1166
|
+
return "constant.language";
|
1167
|
+
else
|
1168
|
+
return "identifier";
|
1169
|
+
},
|
1170
|
+
// TODO: Unicode escape sequences
|
1171
|
+
// TODO: Unicode identifiers
|
1172
|
+
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
1173
|
+
}, {
|
1174
|
+
token : "keyword.operator",
|
1175
|
+
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
1176
|
+
}, {
|
1177
|
+
token : "paren.lparen",
|
1178
|
+
regex : "[[({]"
|
1179
|
+
}, {
|
1180
|
+
token : "paren.rparen",
|
1181
|
+
regex : "[\\])}]"
|
1182
|
+
}, {
|
1183
|
+
token : "text",
|
1184
|
+
regex : "\\s+"
|
1185
|
+
}
|
1186
|
+
],
|
1187
|
+
"comment" : [
|
1188
|
+
{
|
1189
|
+
token : "comment", // closing comment
|
1190
|
+
regex : ".*?\\*\\/",
|
1191
|
+
next : "start"
|
1192
|
+
}, {
|
1193
|
+
token : "comment", // comment spanning whole line
|
1194
|
+
merge : true,
|
1195
|
+
regex : ".+"
|
1196
|
+
}
|
1197
|
+
],
|
1198
|
+
"string" : [
|
1199
|
+
{
|
1200
|
+
token : "escape",
|
1201
|
+
regex : '\\\\"',
|
1202
|
+
}, {
|
1203
|
+
token : "string",
|
1204
|
+
merge : true,
|
1205
|
+
regex : '"',
|
1206
|
+
next : "start"
|
1207
|
+
}, {
|
1208
|
+
token : "string.invalid",
|
1209
|
+
regex : '[^"\\\\]*$',
|
1210
|
+
next : "start"
|
1211
|
+
}, {
|
1212
|
+
token : "string",
|
1213
|
+
regex : '[^"\\\\]+',
|
1214
|
+
merge : true
|
1215
|
+
}
|
1216
|
+
],
|
1217
|
+
"tstring" : [
|
1218
|
+
{
|
1219
|
+
token : "string", // closing comment
|
1220
|
+
regex : '"{3,5}',
|
1221
|
+
next : "start"
|
1222
|
+
}, {
|
1223
|
+
token : "string", // comment spanning whole line
|
1224
|
+
merge : true,
|
1225
|
+
regex : ".+?"
|
1226
|
+
}
|
1227
|
+
]
|
1228
|
+
};
|
1229
|
+
|
1230
|
+
this.embedRules(DocCommentHighlightRules, "doc-",
|
1231
|
+
[ DocCommentHighlightRules.getEndRule("start") ]);
|
1232
|
+
};
|
1233
|
+
|
1234
|
+
oop.inherits(ScalaHighlightRules, TextHighlightRules);
|
1235
|
+
|
1236
|
+
exports.ScalaHighlightRules = ScalaHighlightRules;
|
1237
|
+
});
|