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 +0,0 @@
|
|
1
|
-
ace.define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent"],function(a,b,c){var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./golang_highlight_rules").GolangHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(i,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)\/\//;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var i=new Range(0,0,0,0);for(var h=c;h<=d;h++){var j=b.getLine(h),k=j.match(g);i.start.row=h,i.end.row=h,i.end.column=k[0].length,b.replace(i,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(i.prototype),b.Mode=i}),ace.define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("true|else|false|break|case|return|goto|if|const|continue|struct|default|switch|for|func|import|package|chan|defer|fallthrough|go|interface|map|rangeselect|type|var".split("|")),b=e.arrayToMap("nit|true|false|iota".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},f.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(h,g),b.GolangHighlightRules=h}),ace.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}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e})
|
@@ -1,378 +0,0 @@
|
|
1
|
-
ace.define('ace/mode/golang', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/golang_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
|
2
|
-
|
3
|
-
var oop = require("../lib/oop");
|
4
|
-
var TextMode = require("./text").Mode;
|
5
|
-
var Tokenizer = require("../tokenizer").Tokenizer;
|
6
|
-
var GolangHighlightRules = require("./golang_highlight_rules").GolangHighlightRules;
|
7
|
-
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
8
|
-
|
9
|
-
var Mode = function() {
|
10
|
-
this.$tokenizer = new Tokenizer(new GolangHighlightRules().getRules());
|
11
|
-
this.$outdent = new MatchingBraceOutdent();
|
12
|
-
};
|
13
|
-
oop.inherits(Mode, TextMode);
|
14
|
-
|
15
|
-
(function() {
|
16
|
-
|
17
|
-
this.toggleCommentLines = function(state, doc, startRow, endRow) {
|
18
|
-
var outdent = true;
|
19
|
-
var outentedRows = [];
|
20
|
-
var re = /^(\s*)\/\//;
|
21
|
-
|
22
|
-
for (var i=startRow; i<= endRow; i++) {
|
23
|
-
if (!re.test(doc.getLine(i))) {
|
24
|
-
outdent = false;
|
25
|
-
break;
|
26
|
-
}
|
27
|
-
}
|
28
|
-
|
29
|
-
if (outdent) {
|
30
|
-
var deleteRange = new Range(0, 0, 0, 0);
|
31
|
-
for (var i=startRow; i<= endRow; i++)
|
32
|
-
{
|
33
|
-
var line = doc.getLine(i);
|
34
|
-
var m = line.match(re);
|
35
|
-
deleteRange.start.row = i;
|
36
|
-
deleteRange.end.row = i;
|
37
|
-
deleteRange.end.column = m[0].length;
|
38
|
-
doc.replace(deleteRange, m[1]);
|
39
|
-
}
|
40
|
-
}
|
41
|
-
else {
|
42
|
-
doc.indentRows(startRow, endRow, "//");
|
43
|
-
}
|
44
|
-
};
|
45
|
-
|
46
|
-
this.getNextLineIndent = function(state, line, tab) {
|
47
|
-
var indent = this.$getIndent(line);
|
48
|
-
|
49
|
-
var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
|
50
|
-
var tokens = tokenizedLine.tokens;
|
51
|
-
var endState = tokenizedLine.state;
|
52
|
-
|
53
|
-
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
54
|
-
return indent;
|
55
|
-
}
|
56
|
-
|
57
|
-
if (state == "start") {
|
58
|
-
var match = line.match(/^.*[\{\(\[]\s*$/);
|
59
|
-
if (match) {
|
60
|
-
indent += tab;
|
61
|
-
}
|
62
|
-
}
|
63
|
-
|
64
|
-
return indent;
|
65
|
-
};//end getNextLineIndent
|
66
|
-
|
67
|
-
this.checkOutdent = function(state, line, input) {
|
68
|
-
return this.$outdent.checkOutdent(line, input);
|
69
|
-
};
|
70
|
-
|
71
|
-
this.autoOutdent = function(state, doc, row) {
|
72
|
-
this.$outdent.autoOutdent(doc, row);
|
73
|
-
};
|
74
|
-
|
75
|
-
}).call(Mode.prototype);
|
76
|
-
|
77
|
-
exports.Mode = Mode;
|
78
|
-
});
|
79
|
-
ace.define('ace/mode/golang_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
80
|
-
var oop = require("../lib/oop");
|
81
|
-
var lang = require("../lib/lang");
|
82
|
-
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
83
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
84
|
-
|
85
|
-
var GolangHighlightRules = function() {
|
86
|
-
var keywords = lang.arrayToMap(
|
87
|
-
("true|else|false|break|case|return|goto|if|const|" +
|
88
|
-
"continue|struct|default|switch|for|" +
|
89
|
-
"func|import|package|chan|defer|fallthrough|go|interface|map|range" +
|
90
|
-
"select|type|var").split("|")
|
91
|
-
);
|
92
|
-
|
93
|
-
var buildinConstants = lang.arrayToMap(
|
94
|
-
("nit|true|false|iota").split("|")
|
95
|
-
);
|
96
|
-
|
97
|
-
this.$rules = {
|
98
|
-
"start" : [
|
99
|
-
{
|
100
|
-
token : "comment",
|
101
|
-
regex : "\\/\\/.*$"
|
102
|
-
},
|
103
|
-
DocCommentHighlightRules.getStartRule("doc-start"),
|
104
|
-
{
|
105
|
-
token : "comment", // multi line comment
|
106
|
-
merge : true,
|
107
|
-
regex : "\\/\\*",
|
108
|
-
next : "comment"
|
109
|
-
}, {
|
110
|
-
token : "string", // single line
|
111
|
-
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
112
|
-
}, {
|
113
|
-
token : "string", // multi line string start
|
114
|
-
merge : true,
|
115
|
-
regex : '["].*\\\\$',
|
116
|
-
next : "qqstring"
|
117
|
-
}, {
|
118
|
-
token : "string", // single line
|
119
|
-
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
120
|
-
}, {
|
121
|
-
token : "string", // multi line string start
|
122
|
-
merge : true,
|
123
|
-
regex : "['].*\\\\$",
|
124
|
-
next : "qstring"
|
125
|
-
}, {
|
126
|
-
token : "constant.numeric", // hex
|
127
|
-
regex : "0[xX][0-9a-fA-F]+\\b"
|
128
|
-
}, {
|
129
|
-
token : "constant.numeric", // float
|
130
|
-
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
131
|
-
}, {
|
132
|
-
token : "constant", // <CONSTANT>
|
133
|
-
regex : "<[a-zA-Z0-9.]+>"
|
134
|
-
}, {
|
135
|
-
token : "keyword", // pre-compiler directivs
|
136
|
-
regex : "(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"
|
137
|
-
}, {
|
138
|
-
token : function(value) {
|
139
|
-
if (value == "this")
|
140
|
-
return "variable.language";
|
141
|
-
else if (keywords.hasOwnProperty(value))
|
142
|
-
return "keyword";
|
143
|
-
else if (buildinConstants.hasOwnProperty(value))
|
144
|
-
return "constant.language";
|
145
|
-
else
|
146
|
-
return "identifier";
|
147
|
-
},
|
148
|
-
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
149
|
-
}, {
|
150
|
-
token : "keyword.operator",
|
151
|
-
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
|
152
|
-
}, {
|
153
|
-
token : "punctuation.operator",
|
154
|
-
regex : "\\?|\\:|\\,|\\;|\\."
|
155
|
-
}, {
|
156
|
-
token : "paren.lparen",
|
157
|
-
regex : "[[({]"
|
158
|
-
}, {
|
159
|
-
token : "paren.rparen",
|
160
|
-
regex : "[\\])}]"
|
161
|
-
}, {
|
162
|
-
token : "text",
|
163
|
-
regex : "\\s+"
|
164
|
-
}
|
165
|
-
],
|
166
|
-
"comment" : [
|
167
|
-
{
|
168
|
-
token : "comment", // closing comment
|
169
|
-
regex : ".*?\\*\\/",
|
170
|
-
next : "start"
|
171
|
-
}, {
|
172
|
-
token : "comment", // comment spanning whole line
|
173
|
-
merge : true,
|
174
|
-
regex : ".+"
|
175
|
-
}
|
176
|
-
],
|
177
|
-
"qqstring" : [
|
178
|
-
{
|
179
|
-
token : "string",
|
180
|
-
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
|
181
|
-
next : "start"
|
182
|
-
}, {
|
183
|
-
token : "string",
|
184
|
-
merge : true,
|
185
|
-
regex : '.+'
|
186
|
-
}
|
187
|
-
],
|
188
|
-
"qstring" : [
|
189
|
-
{
|
190
|
-
token : "string",
|
191
|
-
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
|
192
|
-
next : "start"
|
193
|
-
}, {
|
194
|
-
token : "string",
|
195
|
-
merge : true,
|
196
|
-
regex : '.+'
|
197
|
-
}
|
198
|
-
]
|
199
|
-
};
|
200
|
-
}
|
201
|
-
oop.inherits(GolangHighlightRules, TextHighlightRules);
|
202
|
-
|
203
|
-
exports.GolangHighlightRules = GolangHighlightRules;
|
204
|
-
});
|
205
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
206
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
207
|
-
*
|
208
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
209
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
210
|
-
* the License. You may obtain a copy of the License at
|
211
|
-
* http://www.mozilla.org/MPL/
|
212
|
-
*
|
213
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
214
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
215
|
-
* for the specific language governing rights and limitations under the
|
216
|
-
* License.
|
217
|
-
*
|
218
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
219
|
-
*
|
220
|
-
* The Initial Developer of the Original Code is
|
221
|
-
* Ajax.org B.V.
|
222
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
223
|
-
* the Initial Developer. All Rights Reserved.
|
224
|
-
*
|
225
|
-
* Contributor(s):
|
226
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
227
|
-
*
|
228
|
-
* Alternatively, the contents of this file may be used under the terms of
|
229
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
230
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
231
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
232
|
-
* of those above. If you wish to allow use of your version of this file only
|
233
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
234
|
-
* use your version of this file under the terms of the MPL, indicate your
|
235
|
-
* decision by deleting the provisions above and replace them with the notice
|
236
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
237
|
-
* the provisions above, a recipient may use your version of this file under
|
238
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
239
|
-
*
|
240
|
-
* ***** END LICENSE BLOCK ***** */
|
241
|
-
|
242
|
-
ace.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
243
|
-
"use strict";
|
244
|
-
|
245
|
-
var oop = require("../lib/oop");
|
246
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
247
|
-
|
248
|
-
var DocCommentHighlightRules = function() {
|
249
|
-
|
250
|
-
this.$rules = {
|
251
|
-
"start" : [ {
|
252
|
-
token : "comment.doc.tag",
|
253
|
-
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
254
|
-
}, {
|
255
|
-
token : "comment.doc",
|
256
|
-
merge : true,
|
257
|
-
regex : "\\s+"
|
258
|
-
}, {
|
259
|
-
token : "comment.doc",
|
260
|
-
merge : true,
|
261
|
-
regex : "TODO"
|
262
|
-
}, {
|
263
|
-
token : "comment.doc",
|
264
|
-
merge : true,
|
265
|
-
regex : "[^@\\*]+"
|
266
|
-
}, {
|
267
|
-
token : "comment.doc",
|
268
|
-
merge : true,
|
269
|
-
regex : "."
|
270
|
-
}]
|
271
|
-
};
|
272
|
-
};
|
273
|
-
|
274
|
-
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
275
|
-
|
276
|
-
DocCommentHighlightRules.getStartRule = function(start) {
|
277
|
-
return {
|
278
|
-
token : "comment.doc", // doc comment
|
279
|
-
merge : true,
|
280
|
-
regex : "\\/\\*(?=\\*)",
|
281
|
-
next : start
|
282
|
-
};
|
283
|
-
};
|
284
|
-
|
285
|
-
DocCommentHighlightRules.getEndRule = function (start) {
|
286
|
-
return {
|
287
|
-
token : "comment.doc", // closing comment
|
288
|
-
merge : true,
|
289
|
-
regex : "\\*\\/",
|
290
|
-
next : start
|
291
|
-
};
|
292
|
-
};
|
293
|
-
|
294
|
-
|
295
|
-
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
296
|
-
|
297
|
-
});
|
298
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
299
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
300
|
-
*
|
301
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
302
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
303
|
-
* the License. You may obtain a copy of the License at
|
304
|
-
* http://www.mozilla.org/MPL/
|
305
|
-
*
|
306
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
307
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
308
|
-
* for the specific language governing rights and limitations under the
|
309
|
-
* License.
|
310
|
-
*
|
311
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
312
|
-
*
|
313
|
-
* The Initial Developer of the Original Code is
|
314
|
-
* Ajax.org B.V.
|
315
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
316
|
-
* the Initial Developer. All Rights Reserved.
|
317
|
-
*
|
318
|
-
* Contributor(s):
|
319
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
320
|
-
*
|
321
|
-
* Alternatively, the contents of this file may be used under the terms of
|
322
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
323
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
324
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
325
|
-
* of those above. If you wish to allow use of your version of this file only
|
326
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
327
|
-
* use your version of this file under the terms of the MPL, indicate your
|
328
|
-
* decision by deleting the provisions above and replace them with the notice
|
329
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
330
|
-
* the provisions above, a recipient may use your version of this file under
|
331
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
332
|
-
*
|
333
|
-
* ***** END LICENSE BLOCK ***** */
|
334
|
-
|
335
|
-
ace.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
336
|
-
"use strict";
|
337
|
-
|
338
|
-
var Range = require("../range").Range;
|
339
|
-
|
340
|
-
var MatchingBraceOutdent = function() {};
|
341
|
-
|
342
|
-
(function() {
|
343
|
-
|
344
|
-
this.checkOutdent = function(line, input) {
|
345
|
-
if (! /^\s+$/.test(line))
|
346
|
-
return false;
|
347
|
-
|
348
|
-
return /^\s*\}/.test(input);
|
349
|
-
};
|
350
|
-
|
351
|
-
this.autoOutdent = function(doc, row) {
|
352
|
-
var line = doc.getLine(row);
|
353
|
-
var match = line.match(/^(\s*\})/);
|
354
|
-
|
355
|
-
if (!match) return 0;
|
356
|
-
|
357
|
-
var column = match[1].length;
|
358
|
-
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
359
|
-
|
360
|
-
if (!openBracePos || openBracePos.row == row) return 0;
|
361
|
-
|
362
|
-
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
363
|
-
doc.replace(new Range(row, 0, row, column-1), indent);
|
364
|
-
};
|
365
|
-
|
366
|
-
this.$getIndent = function(line) {
|
367
|
-
var match = line.match(/^(\s+)/);
|
368
|
-
if (match) {
|
369
|
-
return match[1];
|
370
|
-
}
|
371
|
-
|
372
|
-
return "";
|
373
|
-
};
|
374
|
-
|
375
|
-
}).call(MatchingBraceOutdent.prototype);
|
376
|
-
|
377
|
-
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
378
|
-
});
|
@@ -1,378 +0,0 @@
|
|
1
|
-
define('ace/mode/golang', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/golang_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
|
2
|
-
|
3
|
-
var oop = require("../lib/oop");
|
4
|
-
var TextMode = require("./text").Mode;
|
5
|
-
var Tokenizer = require("../tokenizer").Tokenizer;
|
6
|
-
var GolangHighlightRules = require("./golang_highlight_rules").GolangHighlightRules;
|
7
|
-
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
8
|
-
|
9
|
-
var Mode = function() {
|
10
|
-
this.$tokenizer = new Tokenizer(new GolangHighlightRules().getRules());
|
11
|
-
this.$outdent = new MatchingBraceOutdent();
|
12
|
-
};
|
13
|
-
oop.inherits(Mode, TextMode);
|
14
|
-
|
15
|
-
(function() {
|
16
|
-
|
17
|
-
this.toggleCommentLines = function(state, doc, startRow, endRow) {
|
18
|
-
var outdent = true;
|
19
|
-
var outentedRows = [];
|
20
|
-
var re = /^(\s*)\/\//;
|
21
|
-
|
22
|
-
for (var i=startRow; i<= endRow; i++) {
|
23
|
-
if (!re.test(doc.getLine(i))) {
|
24
|
-
outdent = false;
|
25
|
-
break;
|
26
|
-
}
|
27
|
-
}
|
28
|
-
|
29
|
-
if (outdent) {
|
30
|
-
var deleteRange = new Range(0, 0, 0, 0);
|
31
|
-
for (var i=startRow; i<= endRow; i++)
|
32
|
-
{
|
33
|
-
var line = doc.getLine(i);
|
34
|
-
var m = line.match(re);
|
35
|
-
deleteRange.start.row = i;
|
36
|
-
deleteRange.end.row = i;
|
37
|
-
deleteRange.end.column = m[0].length;
|
38
|
-
doc.replace(deleteRange, m[1]);
|
39
|
-
}
|
40
|
-
}
|
41
|
-
else {
|
42
|
-
doc.indentRows(startRow, endRow, "//");
|
43
|
-
}
|
44
|
-
};
|
45
|
-
|
46
|
-
this.getNextLineIndent = function(state, line, tab) {
|
47
|
-
var indent = this.$getIndent(line);
|
48
|
-
|
49
|
-
var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
|
50
|
-
var tokens = tokenizedLine.tokens;
|
51
|
-
var endState = tokenizedLine.state;
|
52
|
-
|
53
|
-
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
54
|
-
return indent;
|
55
|
-
}
|
56
|
-
|
57
|
-
if (state == "start") {
|
58
|
-
var match = line.match(/^.*[\{\(\[]\s*$/);
|
59
|
-
if (match) {
|
60
|
-
indent += tab;
|
61
|
-
}
|
62
|
-
}
|
63
|
-
|
64
|
-
return indent;
|
65
|
-
};//end getNextLineIndent
|
66
|
-
|
67
|
-
this.checkOutdent = function(state, line, input) {
|
68
|
-
return this.$outdent.checkOutdent(line, input);
|
69
|
-
};
|
70
|
-
|
71
|
-
this.autoOutdent = function(state, doc, row) {
|
72
|
-
this.$outdent.autoOutdent(doc, row);
|
73
|
-
};
|
74
|
-
|
75
|
-
}).call(Mode.prototype);
|
76
|
-
|
77
|
-
exports.Mode = Mode;
|
78
|
-
});
|
79
|
-
define('ace/mode/golang_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
80
|
-
var oop = require("../lib/oop");
|
81
|
-
var lang = require("../lib/lang");
|
82
|
-
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
83
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
84
|
-
|
85
|
-
var GolangHighlightRules = function() {
|
86
|
-
var keywords = lang.arrayToMap(
|
87
|
-
("true|else|false|break|case|return|goto|if|const|" +
|
88
|
-
"continue|struct|default|switch|for|" +
|
89
|
-
"func|import|package|chan|defer|fallthrough|go|interface|map|range" +
|
90
|
-
"select|type|var").split("|")
|
91
|
-
);
|
92
|
-
|
93
|
-
var buildinConstants = lang.arrayToMap(
|
94
|
-
("nit|true|false|iota").split("|")
|
95
|
-
);
|
96
|
-
|
97
|
-
this.$rules = {
|
98
|
-
"start" : [
|
99
|
-
{
|
100
|
-
token : "comment",
|
101
|
-
regex : "\\/\\/.*$"
|
102
|
-
},
|
103
|
-
DocCommentHighlightRules.getStartRule("doc-start"),
|
104
|
-
{
|
105
|
-
token : "comment", // multi line comment
|
106
|
-
merge : true,
|
107
|
-
regex : "\\/\\*",
|
108
|
-
next : "comment"
|
109
|
-
}, {
|
110
|
-
token : "string", // single line
|
111
|
-
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
112
|
-
}, {
|
113
|
-
token : "string", // multi line string start
|
114
|
-
merge : true,
|
115
|
-
regex : '["].*\\\\$',
|
116
|
-
next : "qqstring"
|
117
|
-
}, {
|
118
|
-
token : "string", // single line
|
119
|
-
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
120
|
-
}, {
|
121
|
-
token : "string", // multi line string start
|
122
|
-
merge : true,
|
123
|
-
regex : "['].*\\\\$",
|
124
|
-
next : "qstring"
|
125
|
-
}, {
|
126
|
-
token : "constant.numeric", // hex
|
127
|
-
regex : "0[xX][0-9a-fA-F]+\\b"
|
128
|
-
}, {
|
129
|
-
token : "constant.numeric", // float
|
130
|
-
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
131
|
-
}, {
|
132
|
-
token : "constant", // <CONSTANT>
|
133
|
-
regex : "<[a-zA-Z0-9.]+>"
|
134
|
-
}, {
|
135
|
-
token : "keyword", // pre-compiler directivs
|
136
|
-
regex : "(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"
|
137
|
-
}, {
|
138
|
-
token : function(value) {
|
139
|
-
if (value == "this")
|
140
|
-
return "variable.language";
|
141
|
-
else if (keywords.hasOwnProperty(value))
|
142
|
-
return "keyword";
|
143
|
-
else if (buildinConstants.hasOwnProperty(value))
|
144
|
-
return "constant.language";
|
145
|
-
else
|
146
|
-
return "identifier";
|
147
|
-
},
|
148
|
-
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
149
|
-
}, {
|
150
|
-
token : "keyword.operator",
|
151
|
-
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
|
152
|
-
}, {
|
153
|
-
token : "punctuation.operator",
|
154
|
-
regex : "\\?|\\:|\\,|\\;|\\."
|
155
|
-
}, {
|
156
|
-
token : "paren.lparen",
|
157
|
-
regex : "[[({]"
|
158
|
-
}, {
|
159
|
-
token : "paren.rparen",
|
160
|
-
regex : "[\\])}]"
|
161
|
-
}, {
|
162
|
-
token : "text",
|
163
|
-
regex : "\\s+"
|
164
|
-
}
|
165
|
-
],
|
166
|
-
"comment" : [
|
167
|
-
{
|
168
|
-
token : "comment", // closing comment
|
169
|
-
regex : ".*?\\*\\/",
|
170
|
-
next : "start"
|
171
|
-
}, {
|
172
|
-
token : "comment", // comment spanning whole line
|
173
|
-
merge : true,
|
174
|
-
regex : ".+"
|
175
|
-
}
|
176
|
-
],
|
177
|
-
"qqstring" : [
|
178
|
-
{
|
179
|
-
token : "string",
|
180
|
-
regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
|
181
|
-
next : "start"
|
182
|
-
}, {
|
183
|
-
token : "string",
|
184
|
-
merge : true,
|
185
|
-
regex : '.+'
|
186
|
-
}
|
187
|
-
],
|
188
|
-
"qstring" : [
|
189
|
-
{
|
190
|
-
token : "string",
|
191
|
-
regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
|
192
|
-
next : "start"
|
193
|
-
}, {
|
194
|
-
token : "string",
|
195
|
-
merge : true,
|
196
|
-
regex : '.+'
|
197
|
-
}
|
198
|
-
]
|
199
|
-
};
|
200
|
-
}
|
201
|
-
oop.inherits(GolangHighlightRules, TextHighlightRules);
|
202
|
-
|
203
|
-
exports.GolangHighlightRules = GolangHighlightRules;
|
204
|
-
});
|
205
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
206
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
207
|
-
*
|
208
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
209
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
210
|
-
* the License. You may obtain a copy of the License at
|
211
|
-
* http://www.mozilla.org/MPL/
|
212
|
-
*
|
213
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
214
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
215
|
-
* for the specific language governing rights and limitations under the
|
216
|
-
* License.
|
217
|
-
*
|
218
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
219
|
-
*
|
220
|
-
* The Initial Developer of the Original Code is
|
221
|
-
* Ajax.org B.V.
|
222
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
223
|
-
* the Initial Developer. All Rights Reserved.
|
224
|
-
*
|
225
|
-
* Contributor(s):
|
226
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
227
|
-
*
|
228
|
-
* Alternatively, the contents of this file may be used under the terms of
|
229
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
230
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
231
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
232
|
-
* of those above. If you wish to allow use of your version of this file only
|
233
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
234
|
-
* use your version of this file under the terms of the MPL, indicate your
|
235
|
-
* decision by deleting the provisions above and replace them with the notice
|
236
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
237
|
-
* the provisions above, a recipient may use your version of this file under
|
238
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
239
|
-
*
|
240
|
-
* ***** END LICENSE BLOCK ***** */
|
241
|
-
|
242
|
-
define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
243
|
-
"use strict";
|
244
|
-
|
245
|
-
var oop = require("../lib/oop");
|
246
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
247
|
-
|
248
|
-
var DocCommentHighlightRules = function() {
|
249
|
-
|
250
|
-
this.$rules = {
|
251
|
-
"start" : [ {
|
252
|
-
token : "comment.doc.tag",
|
253
|
-
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
254
|
-
}, {
|
255
|
-
token : "comment.doc",
|
256
|
-
merge : true,
|
257
|
-
regex : "\\s+"
|
258
|
-
}, {
|
259
|
-
token : "comment.doc",
|
260
|
-
merge : true,
|
261
|
-
regex : "TODO"
|
262
|
-
}, {
|
263
|
-
token : "comment.doc",
|
264
|
-
merge : true,
|
265
|
-
regex : "[^@\\*]+"
|
266
|
-
}, {
|
267
|
-
token : "comment.doc",
|
268
|
-
merge : true,
|
269
|
-
regex : "."
|
270
|
-
}]
|
271
|
-
};
|
272
|
-
};
|
273
|
-
|
274
|
-
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
275
|
-
|
276
|
-
DocCommentHighlightRules.getStartRule = function(start) {
|
277
|
-
return {
|
278
|
-
token : "comment.doc", // doc comment
|
279
|
-
merge : true,
|
280
|
-
regex : "\\/\\*(?=\\*)",
|
281
|
-
next : start
|
282
|
-
};
|
283
|
-
};
|
284
|
-
|
285
|
-
DocCommentHighlightRules.getEndRule = function (start) {
|
286
|
-
return {
|
287
|
-
token : "comment.doc", // closing comment
|
288
|
-
merge : true,
|
289
|
-
regex : "\\*\\/",
|
290
|
-
next : start
|
291
|
-
};
|
292
|
-
};
|
293
|
-
|
294
|
-
|
295
|
-
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
296
|
-
|
297
|
-
});
|
298
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
299
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
300
|
-
*
|
301
|
-
* The contents of this file are subject to the Mozilla Public License Version
|
302
|
-
* 1.1 (the "License"); you may not use this file except in compliance with
|
303
|
-
* the License. You may obtain a copy of the License at
|
304
|
-
* http://www.mozilla.org/MPL/
|
305
|
-
*
|
306
|
-
* Software distributed under the License is distributed on an "AS IS" basis,
|
307
|
-
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
308
|
-
* for the specific language governing rights and limitations under the
|
309
|
-
* License.
|
310
|
-
*
|
311
|
-
* The Original Code is Ajax.org Code Editor (ACE).
|
312
|
-
*
|
313
|
-
* The Initial Developer of the Original Code is
|
314
|
-
* Ajax.org B.V.
|
315
|
-
* Portions created by the Initial Developer are Copyright (C) 2010
|
316
|
-
* the Initial Developer. All Rights Reserved.
|
317
|
-
*
|
318
|
-
* Contributor(s):
|
319
|
-
* Fabian Jakobs <fabian AT ajax DOT org>
|
320
|
-
*
|
321
|
-
* Alternatively, the contents of this file may be used under the terms of
|
322
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
323
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
324
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
325
|
-
* of those above. If you wish to allow use of your version of this file only
|
326
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
327
|
-
* use your version of this file under the terms of the MPL, indicate your
|
328
|
-
* decision by deleting the provisions above and replace them with the notice
|
329
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
330
|
-
* the provisions above, a recipient may use your version of this file under
|
331
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
332
|
-
*
|
333
|
-
* ***** END LICENSE BLOCK ***** */
|
334
|
-
|
335
|
-
define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
336
|
-
"use strict";
|
337
|
-
|
338
|
-
var Range = require("../range").Range;
|
339
|
-
|
340
|
-
var MatchingBraceOutdent = function() {};
|
341
|
-
|
342
|
-
(function() {
|
343
|
-
|
344
|
-
this.checkOutdent = function(line, input) {
|
345
|
-
if (! /^\s+$/.test(line))
|
346
|
-
return false;
|
347
|
-
|
348
|
-
return /^\s*\}/.test(input);
|
349
|
-
};
|
350
|
-
|
351
|
-
this.autoOutdent = function(doc, row) {
|
352
|
-
var line = doc.getLine(row);
|
353
|
-
var match = line.match(/^(\s*\})/);
|
354
|
-
|
355
|
-
if (!match) return 0;
|
356
|
-
|
357
|
-
var column = match[1].length;
|
358
|
-
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
359
|
-
|
360
|
-
if (!openBracePos || openBracePos.row == row) return 0;
|
361
|
-
|
362
|
-
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
363
|
-
doc.replace(new Range(row, 0, row, column-1), indent);
|
364
|
-
};
|
365
|
-
|
366
|
-
this.$getIndent = function(line) {
|
367
|
-
var match = line.match(/^(\s+)/);
|
368
|
-
if (match) {
|
369
|
-
return match[1];
|
370
|
-
}
|
371
|
-
|
372
|
-
return "";
|
373
|
-
};
|
374
|
-
|
375
|
-
}).call(MatchingBraceOutdent.prototype);
|
376
|
-
|
377
|
-
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
378
|
-
});
|