ace-rails-ap 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitmodules +3 -0
- data/lib/ace/rails/version.rb +1 -1
- data/update.sh +3 -0
- data/vendor/assets/javascripts/ace-compat-noconflict.js +1 -0
- data/vendor/assets/javascripts/ace-compat-uncompressed-noconflict.js +480 -0
- data/vendor/assets/javascripts/ace-compat-uncompressed.js +480 -0
- data/vendor/assets/javascripts/ace-compat.js +1 -0
- data/vendor/assets/javascripts/ace-noconflict.js +10 -0
- data/vendor/assets/javascripts/ace-uncompressed-noconflict.js +19976 -0
- data/vendor/assets/javascripts/ace-uncompressed.js +6568 -998
- data/vendor/assets/javascripts/ace.js +1 -1
- data/vendor/assets/javascripts/keybinding-emacs-noconflict.js +1 -0
- data/vendor/assets/javascripts/keybinding-emacs-uncompressed-noconflict.js +150 -0
- data/vendor/assets/javascripts/keybinding-emacs-uncompressed.js +150 -0
- data/vendor/assets/javascripts/keybinding-emacs.js +1 -1
- data/vendor/assets/javascripts/keybinding-vim-noconflict.js +1 -0
- data/vendor/assets/javascripts/keybinding-vim-uncompressed-noconflict.js +138 -0
- data/vendor/assets/javascripts/keybinding-vim-uncompressed.js +138 -0
- data/vendor/assets/javascripts/keybinding-vim.js +1 -1
- data/vendor/assets/javascripts/mode-c_cpp-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-c_cpp-uncompressed-noconflict.js +919 -0
- data/vendor/assets/javascripts/mode-c_cpp-uncompressed.js +919 -0
- data/vendor/assets/javascripts/mode-c_cpp.js +1 -1
- data/vendor/assets/javascripts/mode-clojure-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-clojure-uncompressed-noconflict.js +422 -0
- data/vendor/assets/javascripts/mode-clojure-uncompressed.js +422 -0
- data/vendor/assets/javascripts/mode-clojure.js +1 -1
- data/vendor/assets/javascripts/mode-coffee-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-coffee-uncompressed-noconflict.js +607 -0
- data/vendor/assets/javascripts/mode-coffee-uncompressed.js +607 -0
- data/vendor/assets/javascripts/mode-coffee.js +1 -1
- data/vendor/assets/javascripts/mode-coldfusion-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-coldfusion-uncompressed-noconflict.js +2458 -0
- data/vendor/assets/javascripts/mode-coldfusion-uncompressed.js +2458 -0
- data/vendor/assets/javascripts/mode-coldfusion.js +1 -0
- data/vendor/assets/javascripts/mode-csharp-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-csharp-uncompressed-noconflict.js +769 -0
- data/vendor/assets/javascripts/mode-csharp-uncompressed.js +769 -0
- data/vendor/assets/javascripts/mode-csharp.js +1 -1
- data/vendor/assets/javascripts/mode-css-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-css-uncompressed-noconflict.js +641 -0
- data/vendor/assets/javascripts/mode-css-uncompressed.js +641 -0
- data/vendor/assets/javascripts/mode-css.js +1 -1
- data/vendor/assets/javascripts/mode-golang-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-golang-uncompressed-noconflict.js +378 -0
- data/vendor/assets/javascripts/mode-golang-uncompressed.js +378 -0
- data/vendor/assets/javascripts/mode-golang.js +1 -0
- data/vendor/assets/javascripts/mode-groovy-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-groovy-uncompressed-noconflict.js +1393 -0
- data/vendor/assets/javascripts/mode-groovy-uncompressed.js +1393 -0
- data/vendor/assets/javascripts/mode-groovy.js +1 -1
- data/vendor/assets/javascripts/mode-haxe-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-haxe-uncompressed-noconflict.js +769 -0
- data/vendor/assets/javascripts/mode-haxe-uncompressed.js +769 -0
- data/vendor/assets/javascripts/mode-haxe.js +1 -0
- data/vendor/assets/javascripts/mode-html-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-html-uncompressed-noconflict.js +2475 -0
- data/vendor/assets/javascripts/mode-html-uncompressed.js +2475 -0
- data/vendor/assets/javascripts/mode-html.js +1 -1
- data/vendor/assets/javascripts/mode-java-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-java-uncompressed-noconflict.js +1395 -0
- data/vendor/assets/javascripts/mode-java-uncompressed.js +1395 -0
- data/vendor/assets/javascripts/mode-java.js +1 -1
- data/vendor/assets/javascripts/mode-javascript-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-javascript-uncompressed-noconflict.js +1226 -0
- data/vendor/assets/javascripts/mode-javascript-uncompressed.js +1226 -0
- data/vendor/assets/javascripts/mode-javascript.js +1 -1
- data/vendor/assets/javascripts/mode-json-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-json-uncompressed-noconflict.js +701 -0
- data/vendor/assets/javascripts/mode-json-uncompressed.js +701 -0
- data/vendor/assets/javascripts/mode-json.js +1 -1
- data/vendor/assets/javascripts/mode-latex-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-latex-uncompressed-noconflict.js +95 -0
- data/vendor/assets/javascripts/mode-latex-uncompressed.js +95 -0
- data/vendor/assets/javascripts/mode-less-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-less-uncompressed-noconflict.js +655 -0
- data/vendor/assets/javascripts/mode-less-uncompressed.js +655 -0
- data/vendor/assets/javascripts/mode-less.js +1 -0
- data/vendor/assets/javascripts/mode-liquid-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-liquid-uncompressed-noconflict.js +1353 -0
- data/vendor/assets/javascripts/mode-liquid-uncompressed.js +1353 -0
- data/vendor/assets/javascripts/mode-liquid.js +1 -0
- data/vendor/assets/javascripts/mode-lua-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-lua-uncompressed-noconflict.js +523 -0
- data/vendor/assets/javascripts/mode-lua-uncompressed.js +523 -0
- data/vendor/assets/javascripts/mode-markdown-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-markdown-uncompressed-noconflict.js +2925 -0
- data/vendor/assets/javascripts/mode-markdown-uncompressed.js +2925 -0
- data/vendor/assets/javascripts/mode-markdown.js +1 -1
- data/vendor/assets/javascripts/mode-ocaml-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-ocaml-uncompressed-noconflict.js +539 -0
- data/vendor/assets/javascripts/mode-ocaml-uncompressed.js +539 -0
- data/vendor/assets/javascripts/mode-ocaml.js +1 -1
- data/vendor/assets/javascripts/mode-perl-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-perl-uncompressed-noconflict.js +574 -0
- data/vendor/assets/javascripts/mode-perl-uncompressed.js +574 -0
- data/vendor/assets/javascripts/mode-perl.js +1 -1
- data/vendor/assets/javascripts/mode-pgsql-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-pgsql-uncompressed-noconflict.js +1104 -0
- data/vendor/assets/javascripts/mode-pgsql-uncompressed.js +1104 -0
- data/vendor/assets/javascripts/mode-pgsql.js +1 -0
- data/vendor/assets/javascripts/mode-php-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-php-uncompressed-noconflict.js +1885 -0
- data/vendor/assets/javascripts/mode-php-uncompressed.js +1885 -0
- data/vendor/assets/javascripts/mode-php.js +1 -1
- data/vendor/assets/javascripts/mode-powershell-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-powershell-uncompressed-noconflict.js +710 -0
- data/vendor/assets/javascripts/mode-powershell-uncompressed.js +710 -0
- data/vendor/assets/javascripts/mode-powershell.js +1 -0
- data/vendor/assets/javascripts/mode-python-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-python-uncompressed-noconflict.js +507 -0
- data/vendor/assets/javascripts/mode-python-uncompressed.js +507 -0
- data/vendor/assets/javascripts/mode-python.js +1 -1
- data/vendor/assets/javascripts/mode-ruby-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-ruby-uncompressed-noconflict.js +391 -0
- data/vendor/assets/javascripts/mode-ruby-uncompressed.js +391 -0
- data/vendor/assets/javascripts/mode-ruby.js +1 -1
- data/vendor/assets/javascripts/mode-scad-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-scad-uncompressed-noconflict.js +907 -0
- data/vendor/assets/javascripts/mode-scad-uncompressed.js +907 -0
- data/vendor/assets/javascripts/mode-scad.js +1 -1
- data/vendor/assets/javascripts/mode-scala-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-scala-uncompressed-noconflict.js +1395 -0
- data/vendor/assets/javascripts/mode-scala-uncompressed.js +1395 -0
- data/vendor/assets/javascripts/mode-scala.js +1 -1
- data/vendor/assets/javascripts/mode-scss-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-scss-uncompressed-noconflict.js +679 -0
- data/vendor/assets/javascripts/mode-scss-uncompressed.js +679 -0
- data/vendor/assets/javascripts/mode-scss.js +1 -1
- data/vendor/assets/javascripts/mode-sh-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-sh-uncompressed-noconflict.js +289 -0
- data/vendor/assets/javascripts/mode-sh-uncompressed.js +289 -0
- data/vendor/assets/javascripts/mode-sh.js +1 -0
- data/vendor/assets/javascripts/mode-sql-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-sql-uncompressed-noconflict.js +159 -0
- data/vendor/assets/javascripts/mode-sql-uncompressed.js +159 -0
- data/vendor/assets/javascripts/mode-sql.js +1 -0
- data/vendor/assets/javascripts/mode-svg-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-svg-uncompressed-noconflict.js +2137 -0
- data/vendor/assets/javascripts/mode-svg-uncompressed.js +2137 -0
- data/vendor/assets/javascripts/mode-svg.js +1 -1
- 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-text.js +0 -0
- data/vendor/assets/javascripts/mode-textile-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-textile-uncompressed-noconflict.js +254 -0
- data/vendor/assets/javascripts/mode-textile-uncompressed.js +254 -0
- data/vendor/assets/javascripts/mode-textile.js +1 -1
- data/vendor/assets/javascripts/mode-xml-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-xml-uncompressed-noconflict.js +1012 -0
- data/vendor/assets/javascripts/mode-xml-uncompressed.js +1012 -0
- data/vendor/assets/javascripts/mode-xml.js +1 -1
- data/vendor/assets/javascripts/mode-xquery-noconflict.js +1 -0
- data/vendor/assets/javascripts/mode-xquery-uncompressed-noconflict.js +540 -0
- data/vendor/assets/javascripts/mode-xquery-uncompressed.js +540 -0
- data/vendor/assets/javascripts/mode-xquery.js +1 -0
- data/vendor/assets/javascripts/theme-chrome-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-chrome-uncompressed-noconflict.js +207 -0
- data/vendor/assets/javascripts/theme-chrome-uncompressed.js +207 -0
- data/vendor/assets/javascripts/theme-chrome.js +1 -0
- data/vendor/assets/javascripts/theme-clouds-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-clouds-uncompressed-noconflict.js +160 -0
- data/vendor/assets/javascripts/theme-clouds-uncompressed.js +160 -0
- data/vendor/assets/javascripts/theme-clouds.js +1 -1
- data/vendor/assets/javascripts/theme-clouds_midnight-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed-noconflict.js +161 -0
- data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed.js +161 -0
- data/vendor/assets/javascripts/theme-clouds_midnight.js +1 -1
- data/vendor/assets/javascripts/theme-cobalt-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-cobalt-uncompressed-noconflict.js +187 -0
- data/vendor/assets/javascripts/theme-cobalt-uncompressed.js +187 -0
- data/vendor/assets/javascripts/theme-cobalt.js +1 -1
- data/vendor/assets/javascripts/theme-crimson_editor-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-crimson_editor-uncompressed-noconflict.js +198 -0
- data/vendor/assets/javascripts/theme-crimson_editor-uncompressed.js +198 -0
- data/vendor/assets/javascripts/theme-dawn-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-dawn-uncompressed-noconflict.js +191 -0
- data/vendor/assets/javascripts/theme-dawn-uncompressed.js +191 -0
- data/vendor/assets/javascripts/theme-dawn.js +1 -1
- data/vendor/assets/javascripts/theme-dreamweaver-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-dreamweaver-uncompressed-noconflict.js +227 -0
- data/vendor/assets/javascripts/theme-dreamweaver-uncompressed.js +227 -0
- data/vendor/assets/javascripts/theme-dreamweaver.js +1 -0
- data/vendor/assets/javascripts/theme-eclipse-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-eclipse-uncompressed-noconflict.js +147 -0
- data/vendor/assets/javascripts/theme-eclipse-uncompressed.js +147 -0
- data/vendor/assets/javascripts/theme-eclipse.js +1 -1
- data/vendor/assets/javascripts/theme-idle_fingers-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-idle_fingers-uncompressed-noconflict.js +179 -0
- data/vendor/assets/javascripts/theme-idle_fingers-uncompressed.js +179 -0
- data/vendor/assets/javascripts/theme-idle_fingers.js +1 -1
- data/vendor/assets/javascripts/theme-kr_theme-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-kr_theme-uncompressed-noconflict.js +182 -0
- data/vendor/assets/javascripts/theme-kr_theme-uncompressed.js +182 -0
- data/vendor/assets/javascripts/theme-kr_theme.js +1 -1
- data/vendor/assets/javascripts/theme-merbivore-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-merbivore-uncompressed-noconflict.js +182 -0
- data/vendor/assets/javascripts/theme-merbivore-uncompressed.js +182 -0
- data/vendor/assets/javascripts/theme-merbivore.js +1 -1
- data/vendor/assets/javascripts/theme-merbivore_soft-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed-noconflict.js +188 -0
- data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed.js +188 -0
- data/vendor/assets/javascripts/theme-merbivore_soft.js +1 -1
- data/vendor/assets/javascripts/theme-mono_industrial-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-mono_industrial-uncompressed-noconflict.js +190 -0
- data/vendor/assets/javascripts/theme-mono_industrial-uncompressed.js +190 -0
- data/vendor/assets/javascripts/theme-mono_industrial.js +1 -1
- data/vendor/assets/javascripts/theme-monokai-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-monokai-uncompressed-noconflict.js +191 -0
- data/vendor/assets/javascripts/theme-monokai-uncompressed.js +191 -0
- data/vendor/assets/javascripts/theme-monokai.js +1 -1
- data/vendor/assets/javascripts/theme-pastel_on_dark-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed-noconflict.js +192 -0
- data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed.js +192 -0
- data/vendor/assets/javascripts/theme-pastel_on_dark.js +1 -1
- data/vendor/assets/javascripts/theme-solarized_dark-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-solarized_dark-uncompressed-noconflict.js +176 -0
- data/vendor/assets/javascripts/theme-solarized_dark-uncompressed.js +176 -0
- data/vendor/assets/javascripts/theme-solarized_dark.js +1 -1
- data/vendor/assets/javascripts/theme-solarized_light-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-solarized_light-uncompressed-noconflict.js +172 -0
- data/vendor/assets/javascripts/theme-solarized_light-uncompressed.js +172 -0
- data/vendor/assets/javascripts/theme-solarized_light.js +1 -1
- 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 +1 -0
- data/vendor/assets/javascripts/theme-tomorrow-uncompressed-noconflict.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow-uncompressed.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow.js +1 -1
- data/vendor/assets/javascripts/theme-tomorrow_night-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed-noconflict.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow_night.js +1 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed-noconflict.js +209 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed.js +209 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_blue.js +1 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed-noconflict.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed.js +206 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_bright.js +1 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed-noconflict.js +202 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed.js +202 -0
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties.js +1 -1
- data/vendor/assets/javascripts/theme-twilight-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-twilight-uncompressed-noconflict.js +204 -0
- data/vendor/assets/javascripts/theme-twilight-uncompressed.js +204 -0
- data/vendor/assets/javascripts/theme-twilight.js +1 -1
- data/vendor/assets/javascripts/theme-vibrant_ink-noconflict.js +1 -0
- data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed-noconflict.js +183 -0
- data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed.js +183 -0
- data/vendor/assets/javascripts/theme-vibrant_ink.js +1 -1
- data/vendor/assets/javascripts/worker-coffee.js +2367 -1425
- data/vendor/assets/javascripts/worker-css.js +3271 -582
- data/vendor/assets/javascripts/worker-javascript.js +4313 -2934
- data/vendor/assets/javascripts/worker-json.js +3597 -0
- metadata +225 -7
@@ -1 +1 @@
|
|
1
|
-
define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","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("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),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 i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("-moz-appearance|-moz-box-sizing|-webkit-box-sizing|-moz-outline-radius|-moz-transform|-webkit-transform|appearance|azimuth|background-attachment|background-color|background-image|background-origin|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-offset|outline-radius|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|pointer-events|position|quotes|resize|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|transform|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:f+"(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],h=e.copyArray(g);h.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var i=e.copyArray(g);i.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var j=[{token:"comment",merge:!0,regex:".+"}],k=e.copyArray(j);k.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var l=e.copyArray(j);l.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var m=e.copyArray(j);m.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:k,ruleset:h,ruleset_comment:m,media_ruleset:i,media_comment:l}};d.inherits(g,f),b.CssHighlightRules=g}),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/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)})
|
1
|
+
define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","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("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),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 i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|font-size|font|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f=e.arrayToMap("arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace".split("|")),g="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",h="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",i="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",j=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+g+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:["constant.numeric"],regex:"([0-9]+)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:i},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":f.hasOwnProperty(e.toLowerCase())?"support.constant.fonts":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],k=e.copyArray(j);k.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var l=e.copyArray(j);l.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var m=[{token:"comment",merge:!0,regex:".+"}],n=e.copyArray(m);n.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var o=e.copyArray(m);o.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var p=e.copyArray(m);p.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:n,ruleset:k,ruleset_comment:p,media_ruleset:l,media_comment:o}};d.inherits(g,f),b.CssHighlightRules=g}),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/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)})
|
@@ -0,0 +1 @@
|
|
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})
|
@@ -0,0 +1,378 @@
|
|
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
|
+
});
|
@@ -0,0 +1,378 @@
|
|
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
|
+
});
|