ace-rails-ap 0.0.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ace/rails/version.rb +1 -1
- data/vendor/assets/javascripts/ace.js +15680 -1
- data/vendor/assets/javascripts/keybinding-emacs.js +367 -1
- data/vendor/assets/javascripts/keybinding-vim.js +1635 -1
- data/vendor/assets/javascripts/mode-c9search.js +275 -0
- data/vendor/assets/javascripts/mode-c_cpp.js +744 -1
- data/vendor/assets/javascripts/mode-clojure.js +364 -1
- data/vendor/assets/javascripts/mode-coffee.js +527 -1
- data/vendor/assets/javascripts/mode-coldfusion.js +1966 -1
- data/vendor/assets/javascripts/mode-csharp.js +633 -1
- data/vendor/assets/javascripts/mode-css.js +499 -1
- data/vendor/assets/javascripts/mode-diff.js +250 -0
- data/vendor/assets/javascripts/{mode-c_cpp-uncompressed.js → mode-glsl.js} +147 -244
- data/vendor/assets/javascripts/mode-golang.js +681 -1
- data/vendor/assets/javascripts/mode-groovy.js +1240 -1
- data/vendor/assets/javascripts/mode-haxe.js +633 -1
- data/vendor/assets/javascripts/mode-html.js +2064 -1
- data/vendor/assets/javascripts/mode-java.js +1202 -1
- data/vendor/assets/javascripts/mode-javascript.js +1069 -1
- data/vendor/assets/javascripts/mode-json.js +588 -1
- data/vendor/assets/javascripts/{mode-haxe-uncompressed.js → mode-jsx.js} +189 -312
- data/vendor/assets/javascripts/mode-latex.js +95 -1
- data/vendor/assets/javascripts/mode-less.js +512 -1
- data/vendor/assets/javascripts/mode-liquid.js +1125 -1
- data/vendor/assets/javascripts/mode-lua.js +551 -1
- data/vendor/assets/javascripts/{mode-html-uncompressed.js → mode-luahtml.js} +544 -604
- data/vendor/assets/javascripts/{mode-coldfusion-uncompressed.js → mode-luapage.js} +2326 -2180
- data/vendor/assets/javascripts/mode-markdown.js +2369 -1
- data/vendor/assets/javascripts/mode-ocaml.js +464 -1
- data/vendor/assets/javascripts/mode-perl.js +432 -1
- data/vendor/assets/javascripts/mode-pgsql.js +970 -1
- data/vendor/assets/javascripts/mode-php.js +1718 -1
- data/vendor/assets/javascripts/mode-powershell.js +610 -1
- data/vendor/assets/javascripts/mode-python.js +397 -1
- data/vendor/assets/javascripts/mode-ruby.js +318 -1
- data/vendor/assets/javascripts/mode-scad.js +732 -1
- data/vendor/assets/javascripts/mode-scala.js +1237 -1
- data/vendor/assets/javascripts/mode-scss.js +537 -1
- data/vendor/assets/javascripts/mode-sh.js +250 -1
- data/vendor/assets/javascripts/mode-sql.js +140 -1
- data/vendor/assets/javascripts/mode-svg.js +1681 -1
- data/vendor/assets/javascripts/mode-tcl.js +320 -0
- data/vendor/assets/javascripts/mode-textile.js +182 -1
- data/vendor/assets/javascripts/mode-xml.js +829 -1
- data/vendor/assets/javascripts/mode-xquery.js +605 -1
- data/vendor/assets/javascripts/mode-yaml.js +189 -0
- data/vendor/assets/javascripts/theme-chrome.js +213 -1
- data/vendor/assets/javascripts/theme-clouds.js +167 -1
- data/vendor/assets/javascripts/theme-clouds_midnight.js +168 -1
- data/vendor/assets/javascripts/theme-cobalt.js +194 -1
- data/vendor/assets/javascripts/theme-crimson_editor.js +200 -1
- data/vendor/assets/javascripts/theme-dawn.js +198 -1
- data/vendor/assets/javascripts/theme-dreamweaver.js +230 -1
- data/vendor/assets/javascripts/theme-eclipse.js +157 -1
- data/vendor/assets/javascripts/theme-github.js +182 -0
- data/vendor/assets/javascripts/theme-idle_fingers.js +186 -1
- data/vendor/assets/javascripts/theme-kr_theme.js +189 -1
- data/vendor/assets/javascripts/theme-merbivore.js +189 -1
- data/vendor/assets/javascripts/theme-merbivore_soft.js +195 -1
- data/vendor/assets/javascripts/theme-mono_industrial.js +197 -1
- data/vendor/assets/javascripts/theme-monokai.js +194 -1
- data/vendor/assets/javascripts/theme-pastel_on_dark.js +199 -1
- data/vendor/assets/javascripts/theme-solarized_dark.js +180 -1
- data/vendor/assets/javascripts/theme-solarized_light.js +179 -1
- data/vendor/assets/javascripts/theme-textmate.js +216 -0
- data/vendor/assets/javascripts/theme-tomorrow.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_blue.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_bright.js +213 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties.js +209 -1
- data/vendor/assets/javascripts/theme-twilight.js +211 -1
- data/vendor/assets/javascripts/theme-vibrant_ink.js +190 -1
- data/vendor/assets/javascripts/worker-coffee.js +83 -893
- data/vendor/assets/javascripts/worker-css.js +88 -1402
- data/vendor/assets/javascripts/worker-javascript.js +97 -812
- data/vendor/assets/javascripts/worker-json.js +84 -761
- data/vendor/assets/javascripts/worker-xquery.js +66464 -0
- metadata +12 -195
- data/vendor/assets/javascripts/ace-compat-noconflict.js +0 -1
- data/vendor/assets/javascripts/ace-compat-uncompressed-noconflict.js +0 -480
- data/vendor/assets/javascripts/ace-compat-uncompressed.js +0 -480
- data/vendor/assets/javascripts/ace-compat.js +0 -1
- data/vendor/assets/javascripts/ace-noconflict.js +0 -10
- data/vendor/assets/javascripts/ace-uncompressed-noconflict.js +0 -19976
- data/vendor/assets/javascripts/ace-uncompressed.js +0 -19976
- data/vendor/assets/javascripts/keybinding-emacs-noconflict.js +0 -1
- data/vendor/assets/javascripts/keybinding-emacs-uncompressed-noconflict.js +0 -150
- data/vendor/assets/javascripts/keybinding-emacs-uncompressed.js +0 -150
- data/vendor/assets/javascripts/keybinding-vim-noconflict.js +0 -1
- data/vendor/assets/javascripts/keybinding-vim-uncompressed-noconflict.js +0 -138
- data/vendor/assets/javascripts/keybinding-vim-uncompressed.js +0 -138
- data/vendor/assets/javascripts/mode-c_cpp-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-c_cpp-uncompressed-noconflict.js +0 -919
- data/vendor/assets/javascripts/mode-clojure-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-clojure-uncompressed-noconflict.js +0 -422
- data/vendor/assets/javascripts/mode-clojure-uncompressed.js +0 -422
- data/vendor/assets/javascripts/mode-coffee-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-coffee-uncompressed-noconflict.js +0 -607
- data/vendor/assets/javascripts/mode-coffee-uncompressed.js +0 -607
- data/vendor/assets/javascripts/mode-coldfusion-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-coldfusion-uncompressed-noconflict.js +0 -2458
- data/vendor/assets/javascripts/mode-csharp-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-csharp-uncompressed-noconflict.js +0 -769
- data/vendor/assets/javascripts/mode-csharp-uncompressed.js +0 -769
- data/vendor/assets/javascripts/mode-css-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-css-uncompressed-noconflict.js +0 -641
- data/vendor/assets/javascripts/mode-css-uncompressed.js +0 -641
- data/vendor/assets/javascripts/mode-golang-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-golang-uncompressed-noconflict.js +0 -378
- data/vendor/assets/javascripts/mode-golang-uncompressed.js +0 -378
- data/vendor/assets/javascripts/mode-groovy-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-groovy-uncompressed-noconflict.js +0 -1393
- data/vendor/assets/javascripts/mode-groovy-uncompressed.js +0 -1393
- data/vendor/assets/javascripts/mode-haxe-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-haxe-uncompressed-noconflict.js +0 -769
- data/vendor/assets/javascripts/mode-html-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-html-uncompressed-noconflict.js +0 -2475
- data/vendor/assets/javascripts/mode-java-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-java-uncompressed-noconflict.js +0 -1395
- data/vendor/assets/javascripts/mode-java-uncompressed.js +0 -1395
- data/vendor/assets/javascripts/mode-javascript-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-javascript-uncompressed-noconflict.js +0 -1226
- data/vendor/assets/javascripts/mode-javascript-uncompressed.js +0 -1226
- data/vendor/assets/javascripts/mode-json-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-json-uncompressed-noconflict.js +0 -701
- data/vendor/assets/javascripts/mode-json-uncompressed.js +0 -701
- data/vendor/assets/javascripts/mode-latex-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-latex-uncompressed-noconflict.js +0 -95
- data/vendor/assets/javascripts/mode-latex-uncompressed.js +0 -95
- data/vendor/assets/javascripts/mode-less-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-less-uncompressed-noconflict.js +0 -655
- data/vendor/assets/javascripts/mode-less-uncompressed.js +0 -655
- data/vendor/assets/javascripts/mode-liquid-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-liquid-uncompressed-noconflict.js +0 -1353
- data/vendor/assets/javascripts/mode-liquid-uncompressed.js +0 -1353
- data/vendor/assets/javascripts/mode-lua-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-lua-uncompressed-noconflict.js +0 -523
- data/vendor/assets/javascripts/mode-lua-uncompressed.js +0 -523
- data/vendor/assets/javascripts/mode-markdown-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-markdown-uncompressed-noconflict.js +0 -2925
- data/vendor/assets/javascripts/mode-markdown-uncompressed.js +0 -2925
- data/vendor/assets/javascripts/mode-ocaml-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-ocaml-uncompressed-noconflict.js +0 -539
- data/vendor/assets/javascripts/mode-ocaml-uncompressed.js +0 -539
- data/vendor/assets/javascripts/mode-perl-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-perl-uncompressed-noconflict.js +0 -574
- data/vendor/assets/javascripts/mode-perl-uncompressed.js +0 -574
- data/vendor/assets/javascripts/mode-pgsql-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-pgsql-uncompressed-noconflict.js +0 -1104
- data/vendor/assets/javascripts/mode-pgsql-uncompressed.js +0 -1104
- data/vendor/assets/javascripts/mode-php-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-php-uncompressed-noconflict.js +0 -1885
- data/vendor/assets/javascripts/mode-php-uncompressed.js +0 -1885
- data/vendor/assets/javascripts/mode-powershell-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-powershell-uncompressed-noconflict.js +0 -710
- data/vendor/assets/javascripts/mode-powershell-uncompressed.js +0 -710
- data/vendor/assets/javascripts/mode-python-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-python-uncompressed-noconflict.js +0 -507
- data/vendor/assets/javascripts/mode-python-uncompressed.js +0 -507
- data/vendor/assets/javascripts/mode-ruby-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-ruby-uncompressed-noconflict.js +0 -391
- data/vendor/assets/javascripts/mode-ruby-uncompressed.js +0 -391
- data/vendor/assets/javascripts/mode-scad-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-scad-uncompressed-noconflict.js +0 -907
- data/vendor/assets/javascripts/mode-scad-uncompressed.js +0 -907
- data/vendor/assets/javascripts/mode-scala-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-scala-uncompressed-noconflict.js +0 -1395
- data/vendor/assets/javascripts/mode-scala-uncompressed.js +0 -1395
- data/vendor/assets/javascripts/mode-scss-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-scss-uncompressed-noconflict.js +0 -679
- data/vendor/assets/javascripts/mode-scss-uncompressed.js +0 -679
- data/vendor/assets/javascripts/mode-sh-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-sh-uncompressed-noconflict.js +0 -289
- data/vendor/assets/javascripts/mode-sh-uncompressed.js +0 -289
- data/vendor/assets/javascripts/mode-sql-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-sql-uncompressed-noconflict.js +0 -159
- data/vendor/assets/javascripts/mode-sql-uncompressed.js +0 -159
- data/vendor/assets/javascripts/mode-svg-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-svg-uncompressed-noconflict.js +0 -2137
- data/vendor/assets/javascripts/mode-svg-uncompressed.js +0 -2137
- data/vendor/assets/javascripts/mode-text-noconflict.js +0 -0
- data/vendor/assets/javascripts/mode-text-uncompressed-noconflict.js +0 -0
- data/vendor/assets/javascripts/mode-text-uncompressed.js +0 -0
- data/vendor/assets/javascripts/mode-textile-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-textile-uncompressed-noconflict.js +0 -254
- data/vendor/assets/javascripts/mode-textile-uncompressed.js +0 -254
- data/vendor/assets/javascripts/mode-xml-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-xml-uncompressed-noconflict.js +0 -1012
- data/vendor/assets/javascripts/mode-xml-uncompressed.js +0 -1012
- data/vendor/assets/javascripts/mode-xquery-noconflict.js +0 -1
- data/vendor/assets/javascripts/mode-xquery-uncompressed-noconflict.js +0 -540
- data/vendor/assets/javascripts/mode-xquery-uncompressed.js +0 -540
- data/vendor/assets/javascripts/theme-chrome-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-chrome-uncompressed-noconflict.js +0 -207
- data/vendor/assets/javascripts/theme-chrome-uncompressed.js +0 -207
- data/vendor/assets/javascripts/theme-clouds-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-clouds-uncompressed-noconflict.js +0 -160
- data/vendor/assets/javascripts/theme-clouds-uncompressed.js +0 -160
- data/vendor/assets/javascripts/theme-clouds_midnight-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed-noconflict.js +0 -161
- data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed.js +0 -161
- data/vendor/assets/javascripts/theme-cobalt-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-cobalt-uncompressed-noconflict.js +0 -187
- data/vendor/assets/javascripts/theme-cobalt-uncompressed.js +0 -187
- data/vendor/assets/javascripts/theme-crimson_editor-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-crimson_editor-uncompressed-noconflict.js +0 -198
- data/vendor/assets/javascripts/theme-crimson_editor-uncompressed.js +0 -198
- data/vendor/assets/javascripts/theme-dawn-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-dawn-uncompressed-noconflict.js +0 -191
- data/vendor/assets/javascripts/theme-dawn-uncompressed.js +0 -191
- data/vendor/assets/javascripts/theme-dreamweaver-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-dreamweaver-uncompressed-noconflict.js +0 -227
- data/vendor/assets/javascripts/theme-dreamweaver-uncompressed.js +0 -227
- data/vendor/assets/javascripts/theme-eclipse-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-eclipse-uncompressed-noconflict.js +0 -147
- data/vendor/assets/javascripts/theme-eclipse-uncompressed.js +0 -147
- data/vendor/assets/javascripts/theme-idle_fingers-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-idle_fingers-uncompressed-noconflict.js +0 -179
- data/vendor/assets/javascripts/theme-idle_fingers-uncompressed.js +0 -179
- data/vendor/assets/javascripts/theme-kr_theme-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-kr_theme-uncompressed-noconflict.js +0 -182
- data/vendor/assets/javascripts/theme-kr_theme-uncompressed.js +0 -182
- data/vendor/assets/javascripts/theme-merbivore-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-merbivore-uncompressed-noconflict.js +0 -182
- data/vendor/assets/javascripts/theme-merbivore-uncompressed.js +0 -182
- data/vendor/assets/javascripts/theme-merbivore_soft-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed-noconflict.js +0 -188
- data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed.js +0 -188
- data/vendor/assets/javascripts/theme-mono_industrial-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-mono_industrial-uncompressed-noconflict.js +0 -190
- data/vendor/assets/javascripts/theme-mono_industrial-uncompressed.js +0 -190
- data/vendor/assets/javascripts/theme-monokai-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-monokai-uncompressed-noconflict.js +0 -191
- data/vendor/assets/javascripts/theme-monokai-uncompressed.js +0 -191
- data/vendor/assets/javascripts/theme-pastel_on_dark-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed-noconflict.js +0 -192
- data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed.js +0 -192
- data/vendor/assets/javascripts/theme-solarized_dark-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-solarized_dark-uncompressed-noconflict.js +0 -176
- data/vendor/assets/javascripts/theme-solarized_dark-uncompressed.js +0 -176
- data/vendor/assets/javascripts/theme-solarized_light-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-solarized_light-uncompressed-noconflict.js +0 -172
- data/vendor/assets/javascripts/theme-solarized_light-uncompressed.js +0 -172
- data/vendor/assets/javascripts/theme-textmate-noconflict.js +0 -0
- data/vendor/assets/javascripts/theme-textmate-uncompressed-noconflict.js +0 -0
- data/vendor/assets/javascripts/theme-textmate-uncompressed.js +0 -0
- data/vendor/assets/javascripts/theme-tomorrow-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow-uncompressed-noconflict.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow-uncompressed.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed-noconflict.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed-noconflict.js +0 -209
- data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed.js +0 -209
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed-noconflict.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed.js +0 -206
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed-noconflict.js +0 -202
- data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed.js +0 -202
- data/vendor/assets/javascripts/theme-twilight-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-twilight-uncompressed-noconflict.js +0 -204
- data/vendor/assets/javascripts/theme-twilight-uncompressed.js +0 -204
- data/vendor/assets/javascripts/theme-vibrant_ink-noconflict.js +0 -1
- data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed-noconflict.js +0 -183
- data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed.js +0 -183
@@ -1 +1,610 @@
|
|
1
|
-
define("ace/mode/powershell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/powershell_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./powershell_highlight_rules").PowershellHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./behaviour/cstyle").CstyleBehaviour,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new i,this.foldingRules=new j};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var g=b.match(/^.*[\{\(\[]\s*$/);g&&(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)},this.createWorker=function(a){return null}}.call(k.prototype),b.Mode=k}),define("ace/mode/powershell_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("function|if|else|elseif|switch|while|default|for|do|until|break|continue|foreach|return|filter|in|trap|throw|param|begin|process|end".split("|")),b=e.arrayToMap("Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption".split("|")),c="eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|is|isnot|as|and|or|band|bor|not";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"[$](?:[Tt]rue|[Ff]alse)\\b"},{token:"constant.language",regex:"[$][Nn]ull\\b"},{token:"variable.instance",regex:"[$][a-zA-Z][a-zA-Z0-9_]*\\b"},{token:function(c){return a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},{token:"keyword.operator",regex:"\\-(?:"+c+")"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\=|\\+=|\\-="},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PowershellHighlightRules=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/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'||e=="'"){var f=e,g=c.getSelectionRange(),h=d.doc.getTextRange(g);if(h!=="")return{text:f+h+f,selection:!1};var i=c.getCursorPosition(),j=d.doc.getLine(i.row),k=j.substring(i.column-1,i.column);if(k=="\\")return null;var l=d.getTokens(g.start.row,g.start.row)[0].tokens,m=0,n,o=-1;for(var p=0;p<l.length;p++){n=l[p],n.type=="string"?o=-1:o<0&&(o=n.value.indexOf(f));if(n.value.length+m>g.start.column)break;m+=l[p].value.length}if(!n||o<0&&n.type!=="comment"&&(n.type!=="string"||g.start.column!==n.value.length+m-1&&n.value.lastIndexOf(f)===n.value.length-1))return{text:f+f,selection:[1,1]};if(n&&n.type==="string"){var q=j.substring(i.column,i.column+1);if(q==f)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&(f=='"'||f=="'")){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}}).call(e.prototype)})
|
1
|
+
define('ace/mode/powershell', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/powershell_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
|
2
|
+
|
3
|
+
|
4
|
+
var oop = require("../lib/oop");
|
5
|
+
var TextMode = require("./text").Mode;
|
6
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
7
|
+
var PowershellHighlightRules = require("./powershell_highlight_rules").PowershellHighlightRules;
|
8
|
+
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
9
|
+
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
10
|
+
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
11
|
+
|
12
|
+
var Mode = function() {
|
13
|
+
this.$tokenizer = new Tokenizer(new PowershellHighlightRules().getRules());
|
14
|
+
this.$outdent = new MatchingBraceOutdent();
|
15
|
+
this.$behaviour = new CstyleBehaviour();
|
16
|
+
this.foldingRules = new CStyleFoldMode();
|
17
|
+
};
|
18
|
+
oop.inherits(Mode, TextMode);
|
19
|
+
|
20
|
+
(function() {
|
21
|
+
|
22
|
+
this.getNextLineIndent = function(state, line, tab) {
|
23
|
+
var indent = this.$getIndent(line);
|
24
|
+
|
25
|
+
var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
|
26
|
+
var tokens = tokenizedLine.tokens;
|
27
|
+
|
28
|
+
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
29
|
+
return indent;
|
30
|
+
}
|
31
|
+
|
32
|
+
if (state == "start") {
|
33
|
+
var match = line.match(/^.*[\{\(\[]\s*$/);
|
34
|
+
if (match) {
|
35
|
+
indent += tab;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
return indent;
|
40
|
+
};
|
41
|
+
|
42
|
+
this.checkOutdent = function(state, line, input) {
|
43
|
+
return this.$outdent.checkOutdent(line, input);
|
44
|
+
};
|
45
|
+
|
46
|
+
this.autoOutdent = function(state, doc, row) {
|
47
|
+
this.$outdent.autoOutdent(doc, row);
|
48
|
+
};
|
49
|
+
|
50
|
+
|
51
|
+
this.createWorker = function(session) {
|
52
|
+
return null;
|
53
|
+
};
|
54
|
+
|
55
|
+
}).call(Mode.prototype);
|
56
|
+
|
57
|
+
exports.Mode = Mode;
|
58
|
+
});
|
59
|
+
define('ace/mode/powershell_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
60
|
+
|
61
|
+
|
62
|
+
var oop = require("../lib/oop");
|
63
|
+
var lang = require("../lib/lang");
|
64
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
65
|
+
|
66
|
+
var PowershellHighlightRules = function() {
|
67
|
+
|
68
|
+
var keywords = lang.arrayToMap(
|
69
|
+
("function|if|else|elseif|switch|while|default|for|do|until|break|continue|" +
|
70
|
+
"foreach|return|filter|in|trap|throw|param|begin|process|end").split("|")
|
71
|
+
);
|
72
|
+
|
73
|
+
var builtinFunctions = lang.arrayToMap(
|
74
|
+
("Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|" +
|
75
|
+
"Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|" +
|
76
|
+
"Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|" +
|
77
|
+
"Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|" +
|
78
|
+
"Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|" +
|
79
|
+
"ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|" +
|
80
|
+
"Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|" +
|
81
|
+
"Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|" +
|
82
|
+
"Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|" +
|
83
|
+
"Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|" +
|
84
|
+
"Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|" +
|
85
|
+
"Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|" +
|
86
|
+
"Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|" +
|
87
|
+
"Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|" +
|
88
|
+
"Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|" +
|
89
|
+
"Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|" +
|
90
|
+
"Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|" +
|
91
|
+
"Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|" +
|
92
|
+
"Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|" +
|
93
|
+
"Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|" +
|
94
|
+
"Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|" +
|
95
|
+
"Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|" +
|
96
|
+
"Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|" +
|
97
|
+
"Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|" +
|
98
|
+
"Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|" +
|
99
|
+
"Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|" +
|
100
|
+
"Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|" +
|
101
|
+
"New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|" +
|
102
|
+
"Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|" +
|
103
|
+
"Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|" +
|
104
|
+
"Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|" +
|
105
|
+
"Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|" +
|
106
|
+
"ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|" +
|
107
|
+
"Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|" +
|
108
|
+
"Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|" +
|
109
|
+
"Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|" +
|
110
|
+
"Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|" +
|
111
|
+
"Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|" +
|
112
|
+
"Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|" +
|
113
|
+
"Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|" +
|
114
|
+
"Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption").split("|"));
|
115
|
+
|
116
|
+
var binaryOperatorsRe = "eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|" +
|
117
|
+
"ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|" +
|
118
|
+
"is|isnot|as|" +
|
119
|
+
"and|or|band|bor|not";
|
120
|
+
|
121
|
+
// regexp must not have capturing parentheses. Use (?:) instead.
|
122
|
+
// regexps are ordered -> the first match is used
|
123
|
+
|
124
|
+
this.$rules = {
|
125
|
+
"start" : [
|
126
|
+
{
|
127
|
+
token : "comment",
|
128
|
+
regex : "#.*$"
|
129
|
+
}, {
|
130
|
+
token : "string", // single line
|
131
|
+
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
132
|
+
}, {
|
133
|
+
token : "string", // single line
|
134
|
+
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
135
|
+
}, {
|
136
|
+
token : "constant.numeric", // hex
|
137
|
+
regex : "0[xX][0-9a-fA-F]+\\b"
|
138
|
+
}, {
|
139
|
+
token : "constant.numeric", // float
|
140
|
+
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
141
|
+
}, {
|
142
|
+
token : "constant.language.boolean",
|
143
|
+
regex : "[$](?:[Tt]rue|[Ff]alse)\\b"
|
144
|
+
}, {
|
145
|
+
token : "constant.language",
|
146
|
+
regex : "[$][Nn]ull\\b"
|
147
|
+
}, {
|
148
|
+
token : "variable.instance",
|
149
|
+
regex : "[$][a-zA-Z][a-zA-Z0-9_]*\\b"
|
150
|
+
}, {
|
151
|
+
token : function(value) {
|
152
|
+
if (keywords.hasOwnProperty(value))
|
153
|
+
return "keyword";
|
154
|
+
else if (builtinFunctions.hasOwnProperty(value))
|
155
|
+
return "support.function";
|
156
|
+
else
|
157
|
+
return "identifier";
|
158
|
+
},
|
159
|
+
// TODO: Unicode escape sequences
|
160
|
+
// TODO: Unicode identifiers
|
161
|
+
regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"
|
162
|
+
}, {
|
163
|
+
token : "keyword.operator",
|
164
|
+
regex : "\\-(?:" + binaryOperatorsRe + ")"
|
165
|
+
}, {
|
166
|
+
token : "keyword.operator",
|
167
|
+
regex : "&|\\*|\\+|\\-|\\=|\\+=|\\-="
|
168
|
+
}, {
|
169
|
+
token : "lparen",
|
170
|
+
regex : "[[({]"
|
171
|
+
}, {
|
172
|
+
token : "rparen",
|
173
|
+
regex : "[\\])}]"
|
174
|
+
}, {
|
175
|
+
token : "text",
|
176
|
+
regex : "\\s+"
|
177
|
+
}
|
178
|
+
],
|
179
|
+
"comment" : [
|
180
|
+
{
|
181
|
+
token : "comment", // closing comment
|
182
|
+
regex : ".*?\\*\\/",
|
183
|
+
next : "start"
|
184
|
+
}, {
|
185
|
+
token : "comment", // comment spanning whole line
|
186
|
+
merge : true,
|
187
|
+
regex : ".+"
|
188
|
+
}
|
189
|
+
]
|
190
|
+
};
|
191
|
+
};
|
192
|
+
|
193
|
+
oop.inherits(PowershellHighlightRules, TextHighlightRules);
|
194
|
+
|
195
|
+
exports.PowershellHighlightRules = PowershellHighlightRules;
|
196
|
+
});
|
197
|
+
|
198
|
+
define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
199
|
+
|
200
|
+
|
201
|
+
var Range = require("../range").Range;
|
202
|
+
|
203
|
+
var MatchingBraceOutdent = function() {};
|
204
|
+
|
205
|
+
(function() {
|
206
|
+
|
207
|
+
this.checkOutdent = function(line, input) {
|
208
|
+
if (! /^\s+$/.test(line))
|
209
|
+
return false;
|
210
|
+
|
211
|
+
return /^\s*\}/.test(input);
|
212
|
+
};
|
213
|
+
|
214
|
+
this.autoOutdent = function(doc, row) {
|
215
|
+
var line = doc.getLine(row);
|
216
|
+
var match = line.match(/^(\s*\})/);
|
217
|
+
|
218
|
+
if (!match) return 0;
|
219
|
+
|
220
|
+
var column = match[1].length;
|
221
|
+
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
222
|
+
|
223
|
+
if (!openBracePos || openBracePos.row == row) return 0;
|
224
|
+
|
225
|
+
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
226
|
+
doc.replace(new Range(row, 0, row, column-1), indent);
|
227
|
+
};
|
228
|
+
|
229
|
+
this.$getIndent = function(line) {
|
230
|
+
var match = line.match(/^(\s+)/);
|
231
|
+
if (match) {
|
232
|
+
return match[1];
|
233
|
+
}
|
234
|
+
|
235
|
+
return "";
|
236
|
+
};
|
237
|
+
|
238
|
+
}).call(MatchingBraceOutdent.prototype);
|
239
|
+
|
240
|
+
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
241
|
+
});
|
242
|
+
|
243
|
+
define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
|
244
|
+
|
245
|
+
|
246
|
+
var oop = require("../../lib/oop");
|
247
|
+
var Behaviour = require("../behaviour").Behaviour;
|
248
|
+
|
249
|
+
var CstyleBehaviour = function () {
|
250
|
+
|
251
|
+
this.add("braces", "insertion", function (state, action, editor, session, text) {
|
252
|
+
if (text == '{') {
|
253
|
+
var selection = editor.getSelectionRange();
|
254
|
+
var selected = session.doc.getTextRange(selection);
|
255
|
+
if (selected !== "") {
|
256
|
+
return {
|
257
|
+
text: '{' + selected + '}',
|
258
|
+
selection: false
|
259
|
+
};
|
260
|
+
} else {
|
261
|
+
return {
|
262
|
+
text: '{}',
|
263
|
+
selection: [1, 1]
|
264
|
+
};
|
265
|
+
}
|
266
|
+
} else if (text == '}') {
|
267
|
+
var cursor = editor.getCursorPosition();
|
268
|
+
var line = session.doc.getLine(cursor.row);
|
269
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
270
|
+
if (rightChar == '}') {
|
271
|
+
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
272
|
+
if (matching !== null) {
|
273
|
+
return {
|
274
|
+
text: '',
|
275
|
+
selection: [1, 1]
|
276
|
+
};
|
277
|
+
}
|
278
|
+
}
|
279
|
+
} else if (text == "\n") {
|
280
|
+
var cursor = editor.getCursorPosition();
|
281
|
+
var line = session.doc.getLine(cursor.row);
|
282
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
283
|
+
if (rightChar == '}') {
|
284
|
+
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
|
285
|
+
if (!openBracePos)
|
286
|
+
return null;
|
287
|
+
|
288
|
+
var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
|
289
|
+
var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
|
290
|
+
|
291
|
+
return {
|
292
|
+
text: '\n' + indent + '\n' + next_indent,
|
293
|
+
selection: [1, indent.length, 1, indent.length]
|
294
|
+
};
|
295
|
+
}
|
296
|
+
}
|
297
|
+
});
|
298
|
+
|
299
|
+
this.add("braces", "deletion", function (state, action, editor, session, range) {
|
300
|
+
var selected = session.doc.getTextRange(range);
|
301
|
+
if (!range.isMultiLine() && selected == '{') {
|
302
|
+
var line = session.doc.getLine(range.start.row);
|
303
|
+
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
304
|
+
if (rightChar == '}') {
|
305
|
+
range.end.column++;
|
306
|
+
return range;
|
307
|
+
}
|
308
|
+
}
|
309
|
+
});
|
310
|
+
|
311
|
+
this.add("parens", "insertion", function (state, action, editor, session, text) {
|
312
|
+
if (text == '(') {
|
313
|
+
var selection = editor.getSelectionRange();
|
314
|
+
var selected = session.doc.getTextRange(selection);
|
315
|
+
if (selected !== "") {
|
316
|
+
return {
|
317
|
+
text: '(' + selected + ')',
|
318
|
+
selection: false
|
319
|
+
};
|
320
|
+
} else {
|
321
|
+
return {
|
322
|
+
text: '()',
|
323
|
+
selection: [1, 1]
|
324
|
+
};
|
325
|
+
}
|
326
|
+
} else if (text == ')') {
|
327
|
+
var cursor = editor.getCursorPosition();
|
328
|
+
var line = session.doc.getLine(cursor.row);
|
329
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
330
|
+
if (rightChar == ')') {
|
331
|
+
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
332
|
+
if (matching !== null) {
|
333
|
+
return {
|
334
|
+
text: '',
|
335
|
+
selection: [1, 1]
|
336
|
+
};
|
337
|
+
}
|
338
|
+
}
|
339
|
+
}
|
340
|
+
});
|
341
|
+
|
342
|
+
this.add("parens", "deletion", function (state, action, editor, session, range) {
|
343
|
+
var selected = session.doc.getTextRange(range);
|
344
|
+
if (!range.isMultiLine() && selected == '(') {
|
345
|
+
var line = session.doc.getLine(range.start.row);
|
346
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
347
|
+
if (rightChar == ')') {
|
348
|
+
range.end.column++;
|
349
|
+
return range;
|
350
|
+
}
|
351
|
+
}
|
352
|
+
});
|
353
|
+
|
354
|
+
this.add("brackets", "insertion", function (state, action, editor, session, text) {
|
355
|
+
if (text == '[') {
|
356
|
+
var selection = editor.getSelectionRange();
|
357
|
+
var selected = session.doc.getTextRange(selection);
|
358
|
+
if (selected !== "") {
|
359
|
+
return {
|
360
|
+
text: '[' + selected + ']',
|
361
|
+
selection: false
|
362
|
+
};
|
363
|
+
} else {
|
364
|
+
return {
|
365
|
+
text: '[]',
|
366
|
+
selection: [1, 1]
|
367
|
+
};
|
368
|
+
}
|
369
|
+
} else if (text == ']') {
|
370
|
+
var cursor = editor.getCursorPosition();
|
371
|
+
var line = session.doc.getLine(cursor.row);
|
372
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
373
|
+
if (rightChar == ']') {
|
374
|
+
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
375
|
+
if (matching !== null) {
|
376
|
+
return {
|
377
|
+
text: '',
|
378
|
+
selection: [1, 1]
|
379
|
+
};
|
380
|
+
}
|
381
|
+
}
|
382
|
+
}
|
383
|
+
});
|
384
|
+
|
385
|
+
this.add("brackets", "deletion", function (state, action, editor, session, range) {
|
386
|
+
var selected = session.doc.getTextRange(range);
|
387
|
+
if (!range.isMultiLine() && selected == '[') {
|
388
|
+
var line = session.doc.getLine(range.start.row);
|
389
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
390
|
+
if (rightChar == ']') {
|
391
|
+
range.end.column++;
|
392
|
+
return range;
|
393
|
+
}
|
394
|
+
}
|
395
|
+
});
|
396
|
+
|
397
|
+
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
398
|
+
if (text == '"' || text == "'") {
|
399
|
+
var quote = text;
|
400
|
+
var selection = editor.getSelectionRange();
|
401
|
+
var selected = session.doc.getTextRange(selection);
|
402
|
+
if (selected !== "") {
|
403
|
+
return {
|
404
|
+
text: quote + selected + quote,
|
405
|
+
selection: false
|
406
|
+
};
|
407
|
+
} else {
|
408
|
+
var cursor = editor.getCursorPosition();
|
409
|
+
var line = session.doc.getLine(cursor.row);
|
410
|
+
var leftChar = line.substring(cursor.column-1, cursor.column);
|
411
|
+
|
412
|
+
// We're escaped.
|
413
|
+
if (leftChar == '\\') {
|
414
|
+
return null;
|
415
|
+
}
|
416
|
+
|
417
|
+
// Find what token we're inside.
|
418
|
+
var tokens = session.getTokens(selection.start.row);
|
419
|
+
var col = 0, token;
|
420
|
+
var quotepos = -1; // Track whether we're inside an open quote.
|
421
|
+
|
422
|
+
for (var x = 0; x < tokens.length; x++) {
|
423
|
+
token = tokens[x];
|
424
|
+
if (token.type == "string") {
|
425
|
+
quotepos = -1;
|
426
|
+
} else if (quotepos < 0) {
|
427
|
+
quotepos = token.value.indexOf(quote);
|
428
|
+
}
|
429
|
+
if ((token.value.length + col) > selection.start.column) {
|
430
|
+
break;
|
431
|
+
}
|
432
|
+
col += tokens[x].value.length;
|
433
|
+
}
|
434
|
+
|
435
|
+
// Try and be smart about when we auto insert.
|
436
|
+
if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
|
437
|
+
return {
|
438
|
+
text: quote + quote,
|
439
|
+
selection: [1,1]
|
440
|
+
};
|
441
|
+
} else if (token && token.type === "string") {
|
442
|
+
// Ignore input and move right one if we're typing over the closing quote.
|
443
|
+
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
444
|
+
if (rightChar == quote) {
|
445
|
+
return {
|
446
|
+
text: '',
|
447
|
+
selection: [1, 1]
|
448
|
+
};
|
449
|
+
}
|
450
|
+
}
|
451
|
+
}
|
452
|
+
}
|
453
|
+
});
|
454
|
+
|
455
|
+
this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
|
456
|
+
var selected = session.doc.getTextRange(range);
|
457
|
+
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
458
|
+
var line = session.doc.getLine(range.start.row);
|
459
|
+
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
460
|
+
if (rightChar == '"') {
|
461
|
+
range.end.column++;
|
462
|
+
return range;
|
463
|
+
}
|
464
|
+
}
|
465
|
+
});
|
466
|
+
|
467
|
+
};
|
468
|
+
|
469
|
+
oop.inherits(CstyleBehaviour, Behaviour);
|
470
|
+
|
471
|
+
exports.CstyleBehaviour = CstyleBehaviour;
|
472
|
+
});
|
473
|
+
|
474
|
+
define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
475
|
+
|
476
|
+
|
477
|
+
var oop = require("../../lib/oop");
|
478
|
+
var Range = require("../../range").Range;
|
479
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
480
|
+
|
481
|
+
var FoldMode = exports.FoldMode = function() {};
|
482
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
483
|
+
|
484
|
+
(function() {
|
485
|
+
|
486
|
+
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
487
|
+
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
488
|
+
|
489
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
490
|
+
var line = session.getLine(row);
|
491
|
+
var match = line.match(this.foldingStartMarker);
|
492
|
+
if (match) {
|
493
|
+
var i = match.index;
|
494
|
+
|
495
|
+
if (match[1])
|
496
|
+
return this.openingBracketBlock(session, match[1], row, i);
|
497
|
+
|
498
|
+
var range = session.getCommentFoldRange(row, i + match[0].length);
|
499
|
+
range.end.column -= 2;
|
500
|
+
return range;
|
501
|
+
}
|
502
|
+
|
503
|
+
if (foldStyle !== "markbeginend")
|
504
|
+
return;
|
505
|
+
|
506
|
+
var match = line.match(this.foldingStopMarker);
|
507
|
+
if (match) {
|
508
|
+
var i = match.index + match[0].length;
|
509
|
+
|
510
|
+
if (match[2]) {
|
511
|
+
var range = session.getCommentFoldRange(row, i);
|
512
|
+
range.end.column -= 2;
|
513
|
+
return range;
|
514
|
+
}
|
515
|
+
|
516
|
+
var end = {row: row, column: i};
|
517
|
+
var start = session.$findOpeningBracket(match[1], end);
|
518
|
+
|
519
|
+
if (!start)
|
520
|
+
return;
|
521
|
+
|
522
|
+
start.column++;
|
523
|
+
end.column--;
|
524
|
+
|
525
|
+
return Range.fromPoints(start, end);
|
526
|
+
}
|
527
|
+
};
|
528
|
+
|
529
|
+
}).call(FoldMode.prototype);
|
530
|
+
|
531
|
+
});
|
532
|
+
|
533
|
+
define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
534
|
+
|
535
|
+
|
536
|
+
var Range = require("../../range").Range;
|
537
|
+
|
538
|
+
var FoldMode = exports.FoldMode = function() {};
|
539
|
+
|
540
|
+
(function() {
|
541
|
+
|
542
|
+
this.foldingStartMarker = null;
|
543
|
+
this.foldingStopMarker = null;
|
544
|
+
|
545
|
+
// must return "" if there's no fold, to enable caching
|
546
|
+
this.getFoldWidget = function(session, foldStyle, row) {
|
547
|
+
var line = session.getLine(row);
|
548
|
+
if (this.foldingStartMarker.test(line))
|
549
|
+
return "start";
|
550
|
+
if (foldStyle == "markbeginend"
|
551
|
+
&& this.foldingStopMarker
|
552
|
+
&& this.foldingStopMarker.test(line))
|
553
|
+
return "end";
|
554
|
+
return "";
|
555
|
+
};
|
556
|
+
|
557
|
+
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
558
|
+
return null;
|
559
|
+
};
|
560
|
+
|
561
|
+
this.indentationBlock = function(session, row, column) {
|
562
|
+
var re = /\S/;
|
563
|
+
var line = session.getLine(row);
|
564
|
+
var startLevel = line.search(re);
|
565
|
+
if (startLevel == -1)
|
566
|
+
return;
|
567
|
+
|
568
|
+
var startColumn = column || line.length;
|
569
|
+
var maxRow = session.getLength();
|
570
|
+
var startRow = row;
|
571
|
+
var endRow = row;
|
572
|
+
|
573
|
+
while (++row < maxRow) {
|
574
|
+
var level = session.getLine(row).search(re);
|
575
|
+
|
576
|
+
if (level == -1)
|
577
|
+
continue;
|
578
|
+
|
579
|
+
if (level <= startLevel)
|
580
|
+
break;
|
581
|
+
|
582
|
+
endRow = row;
|
583
|
+
}
|
584
|
+
|
585
|
+
if (endRow > startRow) {
|
586
|
+
var endColumn = session.getLine(endRow).length;
|
587
|
+
return new Range(startRow, startColumn, endRow, endColumn);
|
588
|
+
}
|
589
|
+
};
|
590
|
+
|
591
|
+
this.openingBracketBlock = function(session, bracket, row, column, typeRe) {
|
592
|
+
var start = {row: row, column: column + 1};
|
593
|
+
var end = session.$findClosingBracket(bracket, start, typeRe);
|
594
|
+
if (!end)
|
595
|
+
return;
|
596
|
+
|
597
|
+
var fw = session.foldWidgets[end.row];
|
598
|
+
if (fw == null)
|
599
|
+
fw = this.getFoldWidget(session, end.row);
|
600
|
+
|
601
|
+
if (fw == "start" && end.row > start.row) {
|
602
|
+
end.row --;
|
603
|
+
end.column = session.getLine(end.row).length;
|
604
|
+
}
|
605
|
+
return Range.fromPoints(start, end);
|
606
|
+
};
|
607
|
+
|
608
|
+
}).call(FoldMode.prototype);
|
609
|
+
|
610
|
+
});
|