jquery-ace-rails 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jquery-ace-rails/version.rb +1 -1
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/ace.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/ext-static_highlight.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/ext-textarea.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/keybinding-emacs.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/keybinding-vim.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-abap.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-asciidoc.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-c9search.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-c_cpp.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-clojure.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-coffee.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-coldfusion.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-csharp.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-css.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-dart.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-diff.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-dot.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-glsl.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-golang.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-groovy.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-haml.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-haxe.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-html.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-jade.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-java.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-javascript.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-json.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-jsp.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-jsx.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-latex.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-less.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-liquid.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-lisp.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-lua.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-luapage.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-lucene.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-makefile.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-markdown.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-objectivec.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-ocaml.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-perl.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-pgsql.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-php.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-powershell.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-python.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-r.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-rdoc.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-rhtml.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-ruby.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-scad.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-scala.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-scss.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-sh.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-sql.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-stylus.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-svg.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-tcl.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-tex.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-text.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-textile.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-typescript.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-xml.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-xquery.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/mode-yaml.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-ambiance.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-chaos.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-chrome.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-clouds.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-clouds_midnight.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-cobalt.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-crimson_editor.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-dawn.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-dreamweaver.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-eclipse.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-github.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-idle_fingers.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-kr.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-merbivore.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-merbivore_soft.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-mono_industrial.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-monokai.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-pastel_on_dark.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-solarized_dark.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-solarized_light.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-textmate.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-tomorrow.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-tomorrow_night.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-tomorrow_night_blue.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-tomorrow_night_bright.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-tomorrow_night_eighties.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-twilight.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-vibrant_ink.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/theme-xcode.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/worker-coffee.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/worker-css.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/worker-javascript.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/worker-json.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/vendor/ace-build/src-min-noconflict → ace}/worker-xquery.js +0 -0
- data/vendor/assets/javascripts/{jquery-ace/jquery-ace.coffee → jquery-ace.coffee} +1 -1
- data/vendor/assets/javascripts/{jquery-ace/jquery-ace.js → jquery-ace.js} +1 -1
- data/vendor/assets/javascripts/{jquery-ace/jquery-ace.min.js → jquery-ace.min.js} +1 -1
- data/vendor/assets/javascripts/{jquery-ace/vendor → jquery}/jquery-1.8.3.min.js +0 -0
- metadata +104 -202
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ace.js +0 -14262
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-static_highlight.js +0 -96
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-textarea.js +0 -591
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-emacs.js +0 -364
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-vim.js +0 -1646
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-abap.js +0 -259
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-asciidoc.js +0 -372
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c9search.js +0 -187
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c_cpp.js +0 -765
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-clojure.js +0 -325
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coffee.js +0 -520
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coldfusion.js +0 -1725
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-csharp.js +0 -605
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-css.js +0 -680
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dart.js +0 -279
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-diff.js +0 -163
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dot.js +0 -348
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-glsl.js +0 -838
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-golang.js +0 -660
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-groovy.js +0 -1082
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haml.js +0 -440
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haxe.js +0 -610
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-html.js +0 -1850
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jade.js +0 -2035
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-java.js +0 -1041
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-javascript.js +0 -921
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-json.js +0 -574
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsp.js +0 -1371
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsx.js +0 -635
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-latex.js +0 -217
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-less.js +0 -394
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-liquid.js +0 -921
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lisp.js +0 -142
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lua.js +0 -609
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-luapage.js +0 -2463
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lucene.js +0 -64
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-makefile.js +0 -314
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-markdown.js +0 -2228
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-objectivec.js +0 -655
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ocaml.js +0 -448
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-perl.js +0 -319
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-pgsql.js +0 -928
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-php.js +0 -2299
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-powershell.js +0 -611
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-python.js +0 -290
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-r.js +0 -410
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rdoc.js +0 -189
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rhtml.js +0 -2138
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ruby.js +0 -410
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scad.js +0 -698
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scala.js +0 -1070
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scss.js +0 -416
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sh.js +0 -232
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sql.js +0 -145
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-stylus.js +0 -474
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-svg.js +0 -1490
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tcl.js +0 -342
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tex.js +0 -171
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-text.js +0 -0
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-textile.js +0 -175
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-typescript.js +0 -1011
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xml.js +0 -792
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xquery.js +0 -676
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-yaml.js +0 -298
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-ambiance.js +0 -202
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chaos.js +0 -167
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chrome.js +0 -161
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds.js +0 -135
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds_midnight.js +0 -136
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-cobalt.js +0 -150
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-crimson_editor.js +0 -154
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dawn.js +0 -146
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dreamweaver.js +0 -173
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-eclipse.js +0 -122
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-github.js +0 -136
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-idle_fingers.js +0 -136
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-kr.js +0 -143
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore.js +0 -135
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore_soft.js +0 -136
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-mono_industrial.js +0 -148
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-monokai.js +0 -140
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-pastel_on_dark.js +0 -148
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_dark.js +0 -128
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_light.js +0 -131
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-textmate.js +0 -163
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow.js +0 -147
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night.js +0 -147
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_blue.js +0 -145
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_bright.js +0 -147
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_eighties.js +0 -144
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-twilight.js +0 -147
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-vibrant_ink.js +0 -131
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-xcode.js +0 -125
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-coffee.js +0 -6985
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-css.js +0 -7741
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-javascript.js +0 -6387
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-json.js +0 -2228
- data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-xquery.js +0 -21719
@@ -1,1490 +0,0 @@
|
|
1
|
-
/* ***** BEGIN LICENSE BLOCK *****
|
2
|
-
* Distributed under the BSD license:
|
3
|
-
*
|
4
|
-
* Copyright (c) 2010, Ajax.org B.V.
|
5
|
-
* All rights reserved.
|
6
|
-
*
|
7
|
-
* Redistribution and use in source and binary forms, with or without
|
8
|
-
* modification, are permitted provided that the following conditions are met:
|
9
|
-
* * Redistributions of source code must retain the above copyright
|
10
|
-
* notice, this list of conditions and the following disclaimer.
|
11
|
-
* * Redistributions in binary form must reproduce the above copyright
|
12
|
-
* notice, this list of conditions and the following disclaimer in the
|
13
|
-
* documentation and/or other materials provided with the distribution.
|
14
|
-
* * Neither the name of Ajax.org B.V. nor the
|
15
|
-
* names of its contributors may be used to endorse or promote products
|
16
|
-
* derived from this software without specific prior written permission.
|
17
|
-
*
|
18
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
-
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
22
|
-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
24
|
-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
25
|
-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27
|
-
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
|
-
*
|
29
|
-
* ***** END LICENSE BLOCK ***** */
|
30
|
-
|
31
|
-
define('ace/mode/svg', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/svg_highlight_rules', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(require, exports, module) {
|
32
|
-
|
33
|
-
|
34
|
-
var oop = require("../lib/oop");
|
35
|
-
var XmlMode = require("./xml").Mode;
|
36
|
-
var JavaScriptMode = require("./javascript").Mode;
|
37
|
-
var Tokenizer = require("../tokenizer").Tokenizer;
|
38
|
-
var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules;
|
39
|
-
var MixedFoldMode = require("./folding/mixed").FoldMode;
|
40
|
-
var XmlFoldMode = require("./folding/xml").FoldMode;
|
41
|
-
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
42
|
-
|
43
|
-
var Mode = function() {
|
44
|
-
XmlMode.call(this);
|
45
|
-
|
46
|
-
this.highlighter = new SvgHighlightRules();
|
47
|
-
this.$tokenizer = new Tokenizer(this.highlighter.getRules());
|
48
|
-
|
49
|
-
this.$embeds = this.highlighter.getEmbeds();
|
50
|
-
this.createModeDelegates({
|
51
|
-
"js-": JavaScriptMode
|
52
|
-
});
|
53
|
-
|
54
|
-
this.foldingRules = new MixedFoldMode(new XmlFoldMode({}), {
|
55
|
-
"js-": new CStyleFoldMode()
|
56
|
-
});
|
57
|
-
};
|
58
|
-
|
59
|
-
oop.inherits(Mode, XmlMode);
|
60
|
-
|
61
|
-
(function() {
|
62
|
-
|
63
|
-
this.getNextLineIndent = function(state, line, tab) {
|
64
|
-
return this.$getIndent(line);
|
65
|
-
};
|
66
|
-
|
67
|
-
|
68
|
-
}).call(Mode.prototype);
|
69
|
-
|
70
|
-
exports.Mode = Mode;
|
71
|
-
});
|
72
|
-
|
73
|
-
define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
|
74
|
-
|
75
|
-
|
76
|
-
var oop = require("../lib/oop");
|
77
|
-
var TextMode = require("./text").Mode;
|
78
|
-
var Tokenizer = require("../tokenizer").Tokenizer;
|
79
|
-
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
80
|
-
var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
|
81
|
-
var XmlFoldMode = require("./folding/xml").FoldMode;
|
82
|
-
|
83
|
-
var Mode = function() {
|
84
|
-
this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
|
85
|
-
this.$behaviour = new XmlBehaviour();
|
86
|
-
this.foldingRules = new XmlFoldMode();
|
87
|
-
};
|
88
|
-
|
89
|
-
oop.inherits(Mode, TextMode);
|
90
|
-
|
91
|
-
(function() {
|
92
|
-
|
93
|
-
this.getNextLineIndent = function(state, line, tab) {
|
94
|
-
return this.$getIndent(line);
|
95
|
-
};
|
96
|
-
|
97
|
-
}).call(Mode.prototype);
|
98
|
-
|
99
|
-
exports.Mode = Mode;
|
100
|
-
});
|
101
|
-
|
102
|
-
define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
103
|
-
|
104
|
-
|
105
|
-
var oop = require("../lib/oop");
|
106
|
-
var xmlUtil = require("./xml_util");
|
107
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
108
|
-
|
109
|
-
var XmlHighlightRules = function() {
|
110
|
-
this.$rules = {
|
111
|
-
start : [
|
112
|
-
{token : "text", regex : "<\\!\\[CDATA\\[", next : "cdata"},
|
113
|
-
{token : "xml-pe", regex : "<\\?.*?\\?>"},
|
114
|
-
{token : "comment", regex : "<\\!--", next : "comment"},
|
115
|
-
{token : "xml-pe", regex : "<\\!.*?>"},
|
116
|
-
{token : "meta.tag", regex : "<\\/?", next : "tag"},
|
117
|
-
{token : "text", regex : "\\s+"},
|
118
|
-
{
|
119
|
-
token : "constant.character.entity",
|
120
|
-
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
121
|
-
},
|
122
|
-
{token : "text", regex : "[^<]+"}
|
123
|
-
],
|
124
|
-
|
125
|
-
cdata : [
|
126
|
-
{token : "text", regex : "\\]\\]>", next : "start"},
|
127
|
-
{token : "text", regex : "\\s+"},
|
128
|
-
{token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
|
129
|
-
],
|
130
|
-
|
131
|
-
comment : [
|
132
|
-
{token : "comment", regex : ".*?-->", next : "start"},
|
133
|
-
{token : "comment", regex : ".+"}
|
134
|
-
]
|
135
|
-
};
|
136
|
-
|
137
|
-
xmlUtil.tag(this.$rules, "tag", "start");
|
138
|
-
};
|
139
|
-
|
140
|
-
oop.inherits(XmlHighlightRules, TextHighlightRules);
|
141
|
-
|
142
|
-
exports.XmlHighlightRules = XmlHighlightRules;
|
143
|
-
});
|
144
|
-
|
145
|
-
define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
|
146
|
-
|
147
|
-
|
148
|
-
function string(state) {
|
149
|
-
return [{
|
150
|
-
token : "string",
|
151
|
-
regex : '"',
|
152
|
-
next : state + "_qqstring"
|
153
|
-
}, {
|
154
|
-
token : "string",
|
155
|
-
regex : "'",
|
156
|
-
next : state + "_qstring"
|
157
|
-
}];
|
158
|
-
}
|
159
|
-
|
160
|
-
function multiLineString(quote, state) {
|
161
|
-
return [
|
162
|
-
{token : "string", regex : quote, next : state},
|
163
|
-
{
|
164
|
-
token : "constant.language.escape",
|
165
|
-
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
166
|
-
},
|
167
|
-
{token : "string", regex : '\\w+|.|\\s+'}
|
168
|
-
];
|
169
|
-
}
|
170
|
-
|
171
|
-
exports.tag = function(states, name, nextState, tagMap) {
|
172
|
-
states[name] = [{
|
173
|
-
token : "text",
|
174
|
-
regex : "\\s+"
|
175
|
-
}, {
|
176
|
-
|
177
|
-
token : !tagMap ? "meta.tag.tag-name" : function(value) {
|
178
|
-
if (tagMap[value])
|
179
|
-
return "meta.tag.tag-name." + tagMap[value];
|
180
|
-
else
|
181
|
-
return "meta.tag.tag-name";
|
182
|
-
},
|
183
|
-
regex : "[-_a-zA-Z0-9:]+",
|
184
|
-
next : name + "_embed_attribute_list"
|
185
|
-
}, {
|
186
|
-
token: "empty",
|
187
|
-
regex: "",
|
188
|
-
next : name + "_embed_attribute_list"
|
189
|
-
}];
|
190
|
-
|
191
|
-
states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
|
192
|
-
states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
|
193
|
-
|
194
|
-
states[name + "_embed_attribute_list"] = [{
|
195
|
-
token : "meta.tag.r",
|
196
|
-
regex : "/?>",
|
197
|
-
next : nextState
|
198
|
-
}, {
|
199
|
-
token : "keyword.operator",
|
200
|
-
regex : "="
|
201
|
-
}, {
|
202
|
-
token : "entity.other.attribute-name",
|
203
|
-
regex : "[-_a-zA-Z0-9:]+"
|
204
|
-
}, {
|
205
|
-
token : "constant.numeric", // float
|
206
|
-
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
207
|
-
}, {
|
208
|
-
token : "text",
|
209
|
-
regex : "\\s+"
|
210
|
-
}].concat(string(name));
|
211
|
-
};
|
212
|
-
|
213
|
-
});
|
214
|
-
|
215
|
-
define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
|
216
|
-
|
217
|
-
|
218
|
-
var oop = require("../../lib/oop");
|
219
|
-
var Behaviour = require("../behaviour").Behaviour;
|
220
|
-
var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
|
221
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
222
|
-
|
223
|
-
function hasType(token, type) {
|
224
|
-
var hasType = true;
|
225
|
-
var typeList = token.type.split('.');
|
226
|
-
var needleList = type.split('.');
|
227
|
-
needleList.forEach(function(needle){
|
228
|
-
if (typeList.indexOf(needle) == -1) {
|
229
|
-
hasType = false;
|
230
|
-
return false;
|
231
|
-
}
|
232
|
-
});
|
233
|
-
return hasType;
|
234
|
-
}
|
235
|
-
|
236
|
-
var XmlBehaviour = function () {
|
237
|
-
|
238
|
-
this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
|
239
|
-
|
240
|
-
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
|
241
|
-
if (text == '>') {
|
242
|
-
var position = editor.getCursorPosition();
|
243
|
-
var iterator = new TokenIterator(session, position.row, position.column);
|
244
|
-
var token = iterator.getCurrentToken();
|
245
|
-
var atCursor = false;
|
246
|
-
if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
|
247
|
-
do {
|
248
|
-
token = iterator.stepBackward();
|
249
|
-
} while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
|
250
|
-
} else {
|
251
|
-
atCursor = true;
|
252
|
-
}
|
253
|
-
if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
|
254
|
-
return
|
255
|
-
}
|
256
|
-
var tag = token.value;
|
257
|
-
if (atCursor){
|
258
|
-
var tag = tag.substring(0, position.column - token.start);
|
259
|
-
}
|
260
|
-
|
261
|
-
return {
|
262
|
-
text: '>' + '</' + tag + '>',
|
263
|
-
selection: [1, 1]
|
264
|
-
}
|
265
|
-
}
|
266
|
-
});
|
267
|
-
|
268
|
-
this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
|
269
|
-
if (text == "\n") {
|
270
|
-
var cursor = editor.getCursorPosition();
|
271
|
-
var line = session.doc.getLine(cursor.row);
|
272
|
-
var rightChars = line.substring(cursor.column, cursor.column + 2);
|
273
|
-
if (rightChars == '</') {
|
274
|
-
var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
|
275
|
-
var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
|
276
|
-
|
277
|
-
return {
|
278
|
-
text: '\n' + indent + '\n' + next_indent,
|
279
|
-
selection: [1, indent.length, 1, indent.length]
|
280
|
-
}
|
281
|
-
}
|
282
|
-
}
|
283
|
-
});
|
284
|
-
|
285
|
-
}
|
286
|
-
oop.inherits(XmlBehaviour, Behaviour);
|
287
|
-
|
288
|
-
exports.XmlBehaviour = XmlBehaviour;
|
289
|
-
});
|
290
|
-
|
291
|
-
define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
|
292
|
-
|
293
|
-
|
294
|
-
var oop = require("../../lib/oop");
|
295
|
-
var Behaviour = require("../behaviour").Behaviour;
|
296
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
297
|
-
var lang = require("../../lib/lang");
|
298
|
-
|
299
|
-
var SAFE_INSERT_IN_TOKENS =
|
300
|
-
["text", "paren.rparen", "punctuation.operator"];
|
301
|
-
var SAFE_INSERT_BEFORE_TOKENS =
|
302
|
-
["text", "paren.rparen", "punctuation.operator", "comment"];
|
303
|
-
|
304
|
-
|
305
|
-
var autoInsertedBrackets = 0;
|
306
|
-
var autoInsertedRow = -1;
|
307
|
-
var autoInsertedLineEnd = "";
|
308
|
-
var maybeInsertedBrackets = 0;
|
309
|
-
var maybeInsertedRow = -1;
|
310
|
-
var maybeInsertedLineStart = "";
|
311
|
-
var maybeInsertedLineEnd = "";
|
312
|
-
|
313
|
-
var CstyleBehaviour = function () {
|
314
|
-
|
315
|
-
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
316
|
-
var cursor = editor.getCursorPosition();
|
317
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
318
|
-
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
319
|
-
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
320
|
-
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
321
|
-
return false;
|
322
|
-
}
|
323
|
-
iterator.stepForward();
|
324
|
-
return iterator.getCurrentTokenRow() !== cursor.row ||
|
325
|
-
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
326
|
-
};
|
327
|
-
|
328
|
-
CstyleBehaviour.$matchTokenType = function(token, types) {
|
329
|
-
return types.indexOf(token.type || token) > -1;
|
330
|
-
};
|
331
|
-
|
332
|
-
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
333
|
-
var cursor = editor.getCursorPosition();
|
334
|
-
var line = session.doc.getLine(cursor.row);
|
335
|
-
if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
|
336
|
-
autoInsertedBrackets = 0;
|
337
|
-
autoInsertedRow = cursor.row;
|
338
|
-
autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
339
|
-
autoInsertedBrackets++;
|
340
|
-
};
|
341
|
-
|
342
|
-
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
343
|
-
var cursor = editor.getCursorPosition();
|
344
|
-
var line = session.doc.getLine(cursor.row);
|
345
|
-
if (!this.isMaybeInsertedClosing(cursor, line))
|
346
|
-
maybeInsertedBrackets = 0;
|
347
|
-
maybeInsertedRow = cursor.row;
|
348
|
-
maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
349
|
-
maybeInsertedLineEnd = line.substr(cursor.column);
|
350
|
-
maybeInsertedBrackets++;
|
351
|
-
};
|
352
|
-
|
353
|
-
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
354
|
-
return autoInsertedBrackets > 0 &&
|
355
|
-
cursor.row === autoInsertedRow &&
|
356
|
-
bracket === autoInsertedLineEnd[0] &&
|
357
|
-
line.substr(cursor.column) === autoInsertedLineEnd;
|
358
|
-
};
|
359
|
-
|
360
|
-
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
361
|
-
return maybeInsertedBrackets > 0 &&
|
362
|
-
cursor.row === maybeInsertedRow &&
|
363
|
-
line.substr(cursor.column) === maybeInsertedLineEnd &&
|
364
|
-
line.substr(0, cursor.column) == maybeInsertedLineStart;
|
365
|
-
};
|
366
|
-
|
367
|
-
CstyleBehaviour.popAutoInsertedClosing = function() {
|
368
|
-
autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
|
369
|
-
autoInsertedBrackets--;
|
370
|
-
};
|
371
|
-
|
372
|
-
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
373
|
-
maybeInsertedBrackets = 0;
|
374
|
-
maybeInsertedRow = -1;
|
375
|
-
};
|
376
|
-
|
377
|
-
this.add("braces", "insertion", function (state, action, editor, session, text) {
|
378
|
-
var cursor = editor.getCursorPosition();
|
379
|
-
var line = session.doc.getLine(cursor.row);
|
380
|
-
if (text == '{') {
|
381
|
-
var selection = editor.getSelectionRange();
|
382
|
-
var selected = session.doc.getTextRange(selection);
|
383
|
-
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
384
|
-
return {
|
385
|
-
text: '{' + selected + '}',
|
386
|
-
selection: false
|
387
|
-
};
|
388
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
389
|
-
if (/[\]\}\)]/.test(line[cursor.column])) {
|
390
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "}");
|
391
|
-
return {
|
392
|
-
text: '{}',
|
393
|
-
selection: [1, 1]
|
394
|
-
};
|
395
|
-
} else {
|
396
|
-
CstyleBehaviour.recordMaybeInsert(editor, session, "{");
|
397
|
-
return {
|
398
|
-
text: '{',
|
399
|
-
selection: [1, 1]
|
400
|
-
};
|
401
|
-
}
|
402
|
-
}
|
403
|
-
} else if (text == '}') {
|
404
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
405
|
-
if (rightChar == '}') {
|
406
|
-
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
407
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
408
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
409
|
-
return {
|
410
|
-
text: '',
|
411
|
-
selection: [1, 1]
|
412
|
-
};
|
413
|
-
}
|
414
|
-
}
|
415
|
-
} else if (text == "\n" || text == "\r\n") {
|
416
|
-
var closing = "";
|
417
|
-
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
418
|
-
closing = lang.stringRepeat("}", maybeInsertedBrackets);
|
419
|
-
CstyleBehaviour.clearMaybeInsertedClosing();
|
420
|
-
}
|
421
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
422
|
-
if (rightChar == '}' || closing !== "") {
|
423
|
-
var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
|
424
|
-
if (!openBracePos)
|
425
|
-
return null;
|
426
|
-
|
427
|
-
var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
|
428
|
-
var next_indent = this.$getIndent(line);
|
429
|
-
|
430
|
-
return {
|
431
|
-
text: '\n' + indent + '\n' + next_indent + closing,
|
432
|
-
selection: [1, indent.length, 1, indent.length]
|
433
|
-
};
|
434
|
-
}
|
435
|
-
}
|
436
|
-
});
|
437
|
-
|
438
|
-
this.add("braces", "deletion", function (state, action, editor, session, range) {
|
439
|
-
var selected = session.doc.getTextRange(range);
|
440
|
-
if (!range.isMultiLine() && selected == '{') {
|
441
|
-
var line = session.doc.getLine(range.start.row);
|
442
|
-
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
443
|
-
if (rightChar == '}') {
|
444
|
-
range.end.column++;
|
445
|
-
return range;
|
446
|
-
} else {
|
447
|
-
maybeInsertedBrackets--;
|
448
|
-
}
|
449
|
-
}
|
450
|
-
});
|
451
|
-
|
452
|
-
this.add("parens", "insertion", function (state, action, editor, session, text) {
|
453
|
-
if (text == '(') {
|
454
|
-
var selection = editor.getSelectionRange();
|
455
|
-
var selected = session.doc.getTextRange(selection);
|
456
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
457
|
-
return {
|
458
|
-
text: '(' + selected + ')',
|
459
|
-
selection: false
|
460
|
-
};
|
461
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
462
|
-
CstyleBehaviour.recordAutoInsert(editor, session, ")");
|
463
|
-
return {
|
464
|
-
text: '()',
|
465
|
-
selection: [1, 1]
|
466
|
-
};
|
467
|
-
}
|
468
|
-
} else if (text == ')') {
|
469
|
-
var cursor = editor.getCursorPosition();
|
470
|
-
var line = session.doc.getLine(cursor.row);
|
471
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
472
|
-
if (rightChar == ')') {
|
473
|
-
var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
|
474
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
475
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
476
|
-
return {
|
477
|
-
text: '',
|
478
|
-
selection: [1, 1]
|
479
|
-
};
|
480
|
-
}
|
481
|
-
}
|
482
|
-
}
|
483
|
-
});
|
484
|
-
|
485
|
-
this.add("parens", "deletion", function (state, action, editor, session, range) {
|
486
|
-
var selected = session.doc.getTextRange(range);
|
487
|
-
if (!range.isMultiLine() && selected == '(') {
|
488
|
-
var line = session.doc.getLine(range.start.row);
|
489
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
490
|
-
if (rightChar == ')') {
|
491
|
-
range.end.column++;
|
492
|
-
return range;
|
493
|
-
}
|
494
|
-
}
|
495
|
-
});
|
496
|
-
|
497
|
-
this.add("brackets", "insertion", function (state, action, editor, session, text) {
|
498
|
-
if (text == '[') {
|
499
|
-
var selection = editor.getSelectionRange();
|
500
|
-
var selected = session.doc.getTextRange(selection);
|
501
|
-
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
502
|
-
return {
|
503
|
-
text: '[' + selected + ']',
|
504
|
-
selection: false
|
505
|
-
};
|
506
|
-
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
|
507
|
-
CstyleBehaviour.recordAutoInsert(editor, session, "]");
|
508
|
-
return {
|
509
|
-
text: '[]',
|
510
|
-
selection: [1, 1]
|
511
|
-
};
|
512
|
-
}
|
513
|
-
} else if (text == ']') {
|
514
|
-
var cursor = editor.getCursorPosition();
|
515
|
-
var line = session.doc.getLine(cursor.row);
|
516
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
517
|
-
if (rightChar == ']') {
|
518
|
-
var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
|
519
|
-
if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
|
520
|
-
CstyleBehaviour.popAutoInsertedClosing();
|
521
|
-
return {
|
522
|
-
text: '',
|
523
|
-
selection: [1, 1]
|
524
|
-
};
|
525
|
-
}
|
526
|
-
}
|
527
|
-
}
|
528
|
-
});
|
529
|
-
|
530
|
-
this.add("brackets", "deletion", function (state, action, editor, session, range) {
|
531
|
-
var selected = session.doc.getTextRange(range);
|
532
|
-
if (!range.isMultiLine() && selected == '[') {
|
533
|
-
var line = session.doc.getLine(range.start.row);
|
534
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
535
|
-
if (rightChar == ']') {
|
536
|
-
range.end.column++;
|
537
|
-
return range;
|
538
|
-
}
|
539
|
-
}
|
540
|
-
});
|
541
|
-
|
542
|
-
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
543
|
-
if (text == '"' || text == "'") {
|
544
|
-
var quote = text;
|
545
|
-
var selection = editor.getSelectionRange();
|
546
|
-
var selected = session.doc.getTextRange(selection);
|
547
|
-
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
548
|
-
return {
|
549
|
-
text: quote + selected + quote,
|
550
|
-
selection: false
|
551
|
-
};
|
552
|
-
} else {
|
553
|
-
var cursor = editor.getCursorPosition();
|
554
|
-
var line = session.doc.getLine(cursor.row);
|
555
|
-
var leftChar = line.substring(cursor.column-1, cursor.column);
|
556
|
-
if (leftChar == '\\') {
|
557
|
-
return null;
|
558
|
-
}
|
559
|
-
var tokens = session.getTokens(selection.start.row);
|
560
|
-
var col = 0, token;
|
561
|
-
var quotepos = -1; // Track whether we're inside an open quote.
|
562
|
-
|
563
|
-
for (var x = 0; x < tokens.length; x++) {
|
564
|
-
token = tokens[x];
|
565
|
-
if (token.type == "string") {
|
566
|
-
quotepos = -1;
|
567
|
-
} else if (quotepos < 0) {
|
568
|
-
quotepos = token.value.indexOf(quote);
|
569
|
-
}
|
570
|
-
if ((token.value.length + col) > selection.start.column) {
|
571
|
-
break;
|
572
|
-
}
|
573
|
-
col += tokens[x].value.length;
|
574
|
-
}
|
575
|
-
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)))) {
|
576
|
-
if (!CstyleBehaviour.isSaneInsertion(editor, session))
|
577
|
-
return;
|
578
|
-
return {
|
579
|
-
text: quote + quote,
|
580
|
-
selection: [1,1]
|
581
|
-
};
|
582
|
-
} else if (token && token.type === "string") {
|
583
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
584
|
-
if (rightChar == quote) {
|
585
|
-
return {
|
586
|
-
text: '',
|
587
|
-
selection: [1, 1]
|
588
|
-
};
|
589
|
-
}
|
590
|
-
}
|
591
|
-
}
|
592
|
-
}
|
593
|
-
});
|
594
|
-
|
595
|
-
this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
|
596
|
-
var selected = session.doc.getTextRange(range);
|
597
|
-
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
598
|
-
var line = session.doc.getLine(range.start.row);
|
599
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
600
|
-
if (rightChar == '"') {
|
601
|
-
range.end.column++;
|
602
|
-
return range;
|
603
|
-
}
|
604
|
-
}
|
605
|
-
});
|
606
|
-
|
607
|
-
};
|
608
|
-
|
609
|
-
oop.inherits(CstyleBehaviour, Behaviour);
|
610
|
-
|
611
|
-
exports.CstyleBehaviour = CstyleBehaviour;
|
612
|
-
});
|
613
|
-
|
614
|
-
define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
|
615
|
-
|
616
|
-
|
617
|
-
var oop = require("../../lib/oop");
|
618
|
-
var lang = require("../../lib/lang");
|
619
|
-
var Range = require("../../range").Range;
|
620
|
-
var BaseFoldMode = require("./fold_mode").FoldMode;
|
621
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
622
|
-
|
623
|
-
var FoldMode = exports.FoldMode = function(voidElements) {
|
624
|
-
BaseFoldMode.call(this);
|
625
|
-
this.voidElements = voidElements || {};
|
626
|
-
};
|
627
|
-
oop.inherits(FoldMode, BaseFoldMode);
|
628
|
-
|
629
|
-
(function() {
|
630
|
-
|
631
|
-
this.getFoldWidget = function(session, foldStyle, row) {
|
632
|
-
var tag = this._getFirstTagInLine(session, row);
|
633
|
-
|
634
|
-
if (tag.closing)
|
635
|
-
return foldStyle == "markbeginend" ? "end" : "";
|
636
|
-
|
637
|
-
if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
|
638
|
-
return "";
|
639
|
-
|
640
|
-
if (tag.selfClosing)
|
641
|
-
return "";
|
642
|
-
|
643
|
-
if (tag.value.indexOf("/" + tag.tagName) !== -1)
|
644
|
-
return "";
|
645
|
-
|
646
|
-
return "start";
|
647
|
-
};
|
648
|
-
|
649
|
-
this._getFirstTagInLine = function(session, row) {
|
650
|
-
var tokens = session.getTokens(row);
|
651
|
-
var value = "";
|
652
|
-
for (var i = 0; i < tokens.length; i++) {
|
653
|
-
var token = tokens[i];
|
654
|
-
if (token.type.indexOf("meta.tag") === 0)
|
655
|
-
value += token.value;
|
656
|
-
else
|
657
|
-
value += lang.stringRepeat(" ", token.value.length);
|
658
|
-
}
|
659
|
-
|
660
|
-
return this._parseTag(value);
|
661
|
-
};
|
662
|
-
|
663
|
-
this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
|
664
|
-
this._parseTag = function(tag) {
|
665
|
-
|
666
|
-
var match = this.tagRe.exec(tag);
|
667
|
-
var column = this.tagRe.lastIndex || 0;
|
668
|
-
this.tagRe.lastIndex = 0;
|
669
|
-
|
670
|
-
return {
|
671
|
-
value: tag,
|
672
|
-
match: match ? match[2] : "",
|
673
|
-
closing: match ? !!match[3] : false,
|
674
|
-
selfClosing: match ? !!match[5] || match[2] == "/>" : false,
|
675
|
-
tagName: match ? match[4] : "",
|
676
|
-
column: match[1] ? column + match[1].length : column
|
677
|
-
};
|
678
|
-
};
|
679
|
-
this._readTagForward = function(iterator) {
|
680
|
-
var token = iterator.getCurrentToken();
|
681
|
-
if (!token)
|
682
|
-
return null;
|
683
|
-
|
684
|
-
var value = "";
|
685
|
-
var start;
|
686
|
-
|
687
|
-
do {
|
688
|
-
if (token.type.indexOf("meta.tag") === 0) {
|
689
|
-
if (!start) {
|
690
|
-
var start = {
|
691
|
-
row: iterator.getCurrentTokenRow(),
|
692
|
-
column: iterator.getCurrentTokenColumn()
|
693
|
-
};
|
694
|
-
}
|
695
|
-
value += token.value;
|
696
|
-
if (value.indexOf(">") !== -1) {
|
697
|
-
var tag = this._parseTag(value);
|
698
|
-
tag.start = start;
|
699
|
-
tag.end = {
|
700
|
-
row: iterator.getCurrentTokenRow(),
|
701
|
-
column: iterator.getCurrentTokenColumn() + token.value.length
|
702
|
-
};
|
703
|
-
iterator.stepForward();
|
704
|
-
return tag;
|
705
|
-
}
|
706
|
-
}
|
707
|
-
} while(token = iterator.stepForward());
|
708
|
-
|
709
|
-
return null;
|
710
|
-
};
|
711
|
-
|
712
|
-
this._readTagBackward = function(iterator) {
|
713
|
-
var token = iterator.getCurrentToken();
|
714
|
-
if (!token)
|
715
|
-
return null;
|
716
|
-
|
717
|
-
var value = "";
|
718
|
-
var end;
|
719
|
-
|
720
|
-
do {
|
721
|
-
if (token.type.indexOf("meta.tag") === 0) {
|
722
|
-
if (!end) {
|
723
|
-
end = {
|
724
|
-
row: iterator.getCurrentTokenRow(),
|
725
|
-
column: iterator.getCurrentTokenColumn() + token.value.length
|
726
|
-
};
|
727
|
-
}
|
728
|
-
value = token.value + value;
|
729
|
-
if (value.indexOf("<") !== -1) {
|
730
|
-
var tag = this._parseTag(value);
|
731
|
-
tag.end = end;
|
732
|
-
tag.start = {
|
733
|
-
row: iterator.getCurrentTokenRow(),
|
734
|
-
column: iterator.getCurrentTokenColumn()
|
735
|
-
};
|
736
|
-
iterator.stepBackward();
|
737
|
-
return tag;
|
738
|
-
}
|
739
|
-
}
|
740
|
-
} while(token = iterator.stepBackward());
|
741
|
-
|
742
|
-
return null;
|
743
|
-
};
|
744
|
-
|
745
|
-
this._pop = function(stack, tag) {
|
746
|
-
while (stack.length) {
|
747
|
-
|
748
|
-
var top = stack[stack.length-1];
|
749
|
-
if (!tag || top.tagName == tag.tagName) {
|
750
|
-
return stack.pop();
|
751
|
-
}
|
752
|
-
else if (this.voidElements[tag.tagName]) {
|
753
|
-
return;
|
754
|
-
}
|
755
|
-
else if (this.voidElements[top.tagName]) {
|
756
|
-
stack.pop();
|
757
|
-
continue;
|
758
|
-
} else {
|
759
|
-
return null;
|
760
|
-
}
|
761
|
-
}
|
762
|
-
};
|
763
|
-
|
764
|
-
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
765
|
-
var firstTag = this._getFirstTagInLine(session, row);
|
766
|
-
|
767
|
-
if (!firstTag.match)
|
768
|
-
return null;
|
769
|
-
|
770
|
-
var isBackward = firstTag.closing || firstTag.selfClosing;
|
771
|
-
var stack = [];
|
772
|
-
var tag;
|
773
|
-
|
774
|
-
if (!isBackward) {
|
775
|
-
var iterator = new TokenIterator(session, row, firstTag.column);
|
776
|
-
var start = {
|
777
|
-
row: row,
|
778
|
-
column: firstTag.column + firstTag.tagName.length + 2
|
779
|
-
};
|
780
|
-
while (tag = this._readTagForward(iterator)) {
|
781
|
-
if (tag.selfClosing) {
|
782
|
-
if (!stack.length) {
|
783
|
-
tag.start.column += tag.tagName.length + 2;
|
784
|
-
tag.end.column -= 2;
|
785
|
-
return Range.fromPoints(tag.start, tag.end);
|
786
|
-
} else
|
787
|
-
continue;
|
788
|
-
}
|
789
|
-
|
790
|
-
if (tag.closing) {
|
791
|
-
this._pop(stack, tag);
|
792
|
-
if (stack.length == 0)
|
793
|
-
return Range.fromPoints(start, tag.start);
|
794
|
-
}
|
795
|
-
else {
|
796
|
-
stack.push(tag)
|
797
|
-
}
|
798
|
-
}
|
799
|
-
}
|
800
|
-
else {
|
801
|
-
var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
|
802
|
-
var end = {
|
803
|
-
row: row,
|
804
|
-
column: firstTag.column
|
805
|
-
};
|
806
|
-
|
807
|
-
while (tag = this._readTagBackward(iterator)) {
|
808
|
-
if (tag.selfClosing) {
|
809
|
-
if (!stack.length) {
|
810
|
-
tag.start.column += tag.tagName.length + 2;
|
811
|
-
tag.end.column -= 2;
|
812
|
-
return Range.fromPoints(tag.start, tag.end);
|
813
|
-
} else
|
814
|
-
continue;
|
815
|
-
}
|
816
|
-
|
817
|
-
if (!tag.closing) {
|
818
|
-
this._pop(stack, tag);
|
819
|
-
if (stack.length == 0) {
|
820
|
-
tag.start.column += tag.tagName.length + 2;
|
821
|
-
return Range.fromPoints(tag.start, end);
|
822
|
-
}
|
823
|
-
}
|
824
|
-
else {
|
825
|
-
stack.push(tag)
|
826
|
-
}
|
827
|
-
}
|
828
|
-
}
|
829
|
-
|
830
|
-
};
|
831
|
-
|
832
|
-
}).call(FoldMode.prototype);
|
833
|
-
|
834
|
-
});
|
835
|
-
|
836
|
-
define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
|
837
|
-
|
838
|
-
|
839
|
-
var oop = require("../lib/oop");
|
840
|
-
var TextMode = require("./text").Mode;
|
841
|
-
var Tokenizer = require("../tokenizer").Tokenizer;
|
842
|
-
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
843
|
-
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
844
|
-
var Range = require("../range").Range;
|
845
|
-
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
846
|
-
var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
|
847
|
-
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
848
|
-
|
849
|
-
var Mode = function() {
|
850
|
-
this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
|
851
|
-
this.$outdent = new MatchingBraceOutdent();
|
852
|
-
this.$behaviour = new CstyleBehaviour();
|
853
|
-
this.foldingRules = new CStyleFoldMode();
|
854
|
-
};
|
855
|
-
oop.inherits(Mode, TextMode);
|
856
|
-
|
857
|
-
(function() {
|
858
|
-
|
859
|
-
|
860
|
-
this.toggleCommentLines = function(state, doc, startRow, endRow) {
|
861
|
-
var outdent = true;
|
862
|
-
var re = /^(\s*)\/\//;
|
863
|
-
|
864
|
-
for (var i=startRow; i<= endRow; i++) {
|
865
|
-
if (!re.test(doc.getLine(i))) {
|
866
|
-
outdent = false;
|
867
|
-
break;
|
868
|
-
}
|
869
|
-
}
|
870
|
-
|
871
|
-
if (outdent) {
|
872
|
-
var deleteRange = new Range(0, 0, 0, 0);
|
873
|
-
for (var i=startRow; i<= endRow; i++)
|
874
|
-
{
|
875
|
-
var line = doc.getLine(i);
|
876
|
-
var m = line.match(re);
|
877
|
-
deleteRange.start.row = i;
|
878
|
-
deleteRange.end.row = i;
|
879
|
-
deleteRange.end.column = m[0].length;
|
880
|
-
doc.replace(deleteRange, m[1]);
|
881
|
-
}
|
882
|
-
}
|
883
|
-
else {
|
884
|
-
doc.indentRows(startRow, endRow, "//");
|
885
|
-
}
|
886
|
-
};
|
887
|
-
|
888
|
-
this.getNextLineIndent = function(state, line, tab) {
|
889
|
-
var indent = this.$getIndent(line);
|
890
|
-
|
891
|
-
var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
|
892
|
-
var tokens = tokenizedLine.tokens;
|
893
|
-
var endState = tokenizedLine.state;
|
894
|
-
|
895
|
-
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
896
|
-
return indent;
|
897
|
-
}
|
898
|
-
|
899
|
-
if (state == "start" || state == "regex_allowed") {
|
900
|
-
var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
|
901
|
-
if (match) {
|
902
|
-
indent += tab;
|
903
|
-
}
|
904
|
-
} else if (state == "doc-start") {
|
905
|
-
if (endState == "start" || state == "regex_allowed") {
|
906
|
-
return "";
|
907
|
-
}
|
908
|
-
var match = line.match(/^\s*(\/?)\*/);
|
909
|
-
if (match) {
|
910
|
-
if (match[1]) {
|
911
|
-
indent += " ";
|
912
|
-
}
|
913
|
-
indent += "* ";
|
914
|
-
}
|
915
|
-
}
|
916
|
-
|
917
|
-
return indent;
|
918
|
-
};
|
919
|
-
|
920
|
-
this.checkOutdent = function(state, line, input) {
|
921
|
-
return this.$outdent.checkOutdent(line, input);
|
922
|
-
};
|
923
|
-
|
924
|
-
this.autoOutdent = function(state, doc, row) {
|
925
|
-
this.$outdent.autoOutdent(doc, row);
|
926
|
-
};
|
927
|
-
|
928
|
-
this.createWorker = function(session) {
|
929
|
-
var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
|
930
|
-
worker.attachToDocument(session.getDocument());
|
931
|
-
|
932
|
-
worker.on("jslint", function(results) {
|
933
|
-
session.setAnnotations(results.data);
|
934
|
-
});
|
935
|
-
|
936
|
-
worker.on("terminate", function() {
|
937
|
-
session.clearAnnotations();
|
938
|
-
});
|
939
|
-
|
940
|
-
return worker;
|
941
|
-
};
|
942
|
-
|
943
|
-
}).call(Mode.prototype);
|
944
|
-
|
945
|
-
exports.Mode = Mode;
|
946
|
-
});
|
947
|
-
|
948
|
-
define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
949
|
-
|
950
|
-
|
951
|
-
var oop = require("../lib/oop");
|
952
|
-
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
953
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
954
|
-
|
955
|
-
var JavaScriptHighlightRules = function() {
|
956
|
-
var keywordMapper = this.createKeywordMapper({
|
957
|
-
"variable.language":
|
958
|
-
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
|
959
|
-
"Namespace|QName|XML|XMLList|" + // E4X
|
960
|
-
"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
|
961
|
-
"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
|
962
|
-
"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
|
963
|
-
"SyntaxError|TypeError|URIError|" +
|
964
|
-
"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
|
965
|
-
"isNaN|parseFloat|parseInt|" +
|
966
|
-
"JSON|Math|" + // Other
|
967
|
-
"this|arguments|prototype|window|document" , // Pseudo
|
968
|
-
"keyword":
|
969
|
-
"const|yield|import|get|set|" +
|
970
|
-
"break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
971
|
-
"if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
972
|
-
"__parent__|__count__|escape|unescape|with|__proto__|" +
|
973
|
-
"class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
|
974
|
-
"storage.type":
|
975
|
-
"const|let|var|function",
|
976
|
-
"constant.language":
|
977
|
-
"null|Infinity|NaN|undefined",
|
978
|
-
"support.function":
|
979
|
-
"alert"
|
980
|
-
}, "identifier");
|
981
|
-
var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
|
982
|
-
var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
|
983
|
-
|
984
|
-
var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
|
985
|
-
"u[0-9a-fA-F]{4}|" + // unicode
|
986
|
-
"[0-2][0-7]{0,2}|" + // oct
|
987
|
-
"3[0-6][0-7]?|" + // oct
|
988
|
-
"37[0-7]?|" + // oct
|
989
|
-
"[4-7][0-7]?|" + //oct
|
990
|
-
".)";
|
991
|
-
|
992
|
-
this.$rules = {
|
993
|
-
"start" : [
|
994
|
-
{
|
995
|
-
token : "comment",
|
996
|
-
regex : /\/\/.*$/
|
997
|
-
},
|
998
|
-
DocCommentHighlightRules.getStartRule("doc-start"),
|
999
|
-
{
|
1000
|
-
token : "comment", // multi line comment
|
1001
|
-
regex : /\/\*/,
|
1002
|
-
next : "comment"
|
1003
|
-
}, {
|
1004
|
-
token : "string",
|
1005
|
-
regex : "'(?=.)",
|
1006
|
-
next : "qstring"
|
1007
|
-
}, {
|
1008
|
-
token : "string",
|
1009
|
-
regex : '"(?=.)',
|
1010
|
-
next : "qqstring"
|
1011
|
-
}, {
|
1012
|
-
token : "constant.numeric", // hex
|
1013
|
-
regex : /0[xX][0-9a-fA-F]+\b/
|
1014
|
-
}, {
|
1015
|
-
token : "constant.numeric", // float
|
1016
|
-
regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
|
1017
|
-
}, {
|
1018
|
-
token : [
|
1019
|
-
"storage.type", "punctuation.operator", "support.function",
|
1020
|
-
"punctuation.operator", "entity.name.function", "text","keyword.operator"
|
1021
|
-
],
|
1022
|
-
regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
|
1023
|
-
next: "function_arguments"
|
1024
|
-
}, {
|
1025
|
-
token : [
|
1026
|
-
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
1027
|
-
"keyword.operator", "text", "storage.type", "text", "paren.lparen"
|
1028
|
-
],
|
1029
|
-
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
1030
|
-
next: "function_arguments"
|
1031
|
-
}, {
|
1032
|
-
token : [
|
1033
|
-
"entity.name.function", "text", "keyword.operator", "text", "storage.type",
|
1034
|
-
"text", "paren.lparen"
|
1035
|
-
],
|
1036
|
-
regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
|
1037
|
-
next: "function_arguments"
|
1038
|
-
}, {
|
1039
|
-
token : [
|
1040
|
-
"storage.type", "punctuation.operator", "entity.name.function", "text",
|
1041
|
-
"keyword.operator", "text",
|
1042
|
-
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
1043
|
-
],
|
1044
|
-
regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
|
1045
|
-
next: "function_arguments"
|
1046
|
-
}, {
|
1047
|
-
token : [
|
1048
|
-
"storage.type", "text", "entity.name.function", "text", "paren.lparen"
|
1049
|
-
],
|
1050
|
-
regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
|
1051
|
-
next: "function_arguments"
|
1052
|
-
}, {
|
1053
|
-
token : [
|
1054
|
-
"entity.name.function", "text", "punctuation.operator",
|
1055
|
-
"text", "storage.type", "text", "paren.lparen"
|
1056
|
-
],
|
1057
|
-
regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
|
1058
|
-
next: "function_arguments"
|
1059
|
-
}, {
|
1060
|
-
token : [
|
1061
|
-
"text", "text", "storage.type", "text", "paren.lparen"
|
1062
|
-
],
|
1063
|
-
regex : "(:)(\\s*)(function)(\\s*)(\\()",
|
1064
|
-
next: "function_arguments"
|
1065
|
-
}, {
|
1066
|
-
token : "constant.language.boolean",
|
1067
|
-
regex : /(?:true|false)\b/
|
1068
|
-
}, {
|
1069
|
-
token : "keyword",
|
1070
|
-
regex : "(?:" + kwBeforeRe + ")\\b",
|
1071
|
-
next : "regex_allowed"
|
1072
|
-
}, {
|
1073
|
-
token : ["punctuation.operator", "support.function"],
|
1074
|
-
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
|
1075
|
-
}, {
|
1076
|
-
token : ["punctuation.operator", "support.function.dom"],
|
1077
|
-
regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
|
1078
|
-
}, {
|
1079
|
-
token : ["punctuation.operator", "support.constant"],
|
1080
|
-
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
|
1081
|
-
}, {
|
1082
|
-
token : ["storage.type", "punctuation.operator", "support.function.firebug"],
|
1083
|
-
regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
|
1084
|
-
}, {
|
1085
|
-
token : keywordMapper,
|
1086
|
-
regex : identifierRe
|
1087
|
-
}, {
|
1088
|
-
token : "keyword.operator",
|
1089
|
-
regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
|
1090
|
-
next : "regex_allowed"
|
1091
|
-
}, {
|
1092
|
-
token : "punctuation.operator",
|
1093
|
-
regex : /\?|\:|\,|\;|\./,
|
1094
|
-
next : "regex_allowed"
|
1095
|
-
}, {
|
1096
|
-
token : "paren.lparen",
|
1097
|
-
regex : /[\[({]/,
|
1098
|
-
next : "regex_allowed"
|
1099
|
-
}, {
|
1100
|
-
token : "paren.rparen",
|
1101
|
-
regex : /[\])}]/
|
1102
|
-
}, {
|
1103
|
-
token : "keyword.operator",
|
1104
|
-
regex : /\/=?/,
|
1105
|
-
next : "regex_allowed"
|
1106
|
-
}, {
|
1107
|
-
token: "comment",
|
1108
|
-
regex: /^#!.*$/
|
1109
|
-
}, {
|
1110
|
-
token : "text",
|
1111
|
-
regex : /\s+/
|
1112
|
-
}
|
1113
|
-
],
|
1114
|
-
"regex_allowed": [
|
1115
|
-
DocCommentHighlightRules.getStartRule("doc-start"),
|
1116
|
-
{
|
1117
|
-
token : "comment", // multi line comment
|
1118
|
-
regex : "\\/\\*",
|
1119
|
-
next : "comment_regex_allowed"
|
1120
|
-
}, {
|
1121
|
-
token : "comment",
|
1122
|
-
regex : "\\/\\/.*$"
|
1123
|
-
}, {
|
1124
|
-
token: "string.regexp",
|
1125
|
-
regex: "\\/",
|
1126
|
-
next: "regex",
|
1127
|
-
}, {
|
1128
|
-
token : "text",
|
1129
|
-
regex : "\\s+"
|
1130
|
-
}, {
|
1131
|
-
token: "empty",
|
1132
|
-
regex: "",
|
1133
|
-
next: "start"
|
1134
|
-
}
|
1135
|
-
],
|
1136
|
-
"regex": [
|
1137
|
-
{
|
1138
|
-
token: "regexp.keyword.operator",
|
1139
|
-
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
1140
|
-
}, {
|
1141
|
-
token: "string.regexp",
|
1142
|
-
regex: "/\\w*",
|
1143
|
-
next: "start",
|
1144
|
-
}, {
|
1145
|
-
token : "invalid",
|
1146
|
-
regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
|
1147
|
-
}, {
|
1148
|
-
token : "constant.language.escape",
|
1149
|
-
regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
|
1150
|
-
}, {
|
1151
|
-
token: "string.regexp",
|
1152
|
-
regex: /{|[^{\[\/\\(|)$^+*?]+/,
|
1153
|
-
}, {
|
1154
|
-
token: "constant.language.escape",
|
1155
|
-
regex: /\[\^?/,
|
1156
|
-
next: "regex_character_class",
|
1157
|
-
}, {
|
1158
|
-
token: "empty",
|
1159
|
-
regex: "",
|
1160
|
-
next: "start"
|
1161
|
-
}
|
1162
|
-
],
|
1163
|
-
"regex_character_class": [
|
1164
|
-
{
|
1165
|
-
token: "regexp.keyword.operator",
|
1166
|
-
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
1167
|
-
}, {
|
1168
|
-
token: "constant.language.escape",
|
1169
|
-
regex: "]",
|
1170
|
-
next: "regex",
|
1171
|
-
}, {
|
1172
|
-
token: "constant.language.escape",
|
1173
|
-
regex: "-"
|
1174
|
-
}, {
|
1175
|
-
token: "string.regexp.charachterclass",
|
1176
|
-
regex: /[^\]\-\\]+/,
|
1177
|
-
}, {
|
1178
|
-
token: "empty",
|
1179
|
-
regex: "",
|
1180
|
-
next: "start"
|
1181
|
-
}
|
1182
|
-
],
|
1183
|
-
"function_arguments": [
|
1184
|
-
{
|
1185
|
-
token: "variable.parameter",
|
1186
|
-
regex: identifierRe
|
1187
|
-
}, {
|
1188
|
-
token: "punctuation.operator",
|
1189
|
-
regex: "[, ]+",
|
1190
|
-
}, {
|
1191
|
-
token: "punctuation.operator",
|
1192
|
-
regex: "$",
|
1193
|
-
}, {
|
1194
|
-
token: "empty",
|
1195
|
-
regex: "",
|
1196
|
-
next: "start"
|
1197
|
-
}
|
1198
|
-
],
|
1199
|
-
"comment_regex_allowed" : [
|
1200
|
-
{
|
1201
|
-
token : "comment", // closing comment
|
1202
|
-
regex : ".*?\\*\\/",
|
1203
|
-
next : "regex_allowed"
|
1204
|
-
}, {
|
1205
|
-
token : "comment", // comment spanning whole line
|
1206
|
-
regex : ".+"
|
1207
|
-
}
|
1208
|
-
],
|
1209
|
-
"comment" : [
|
1210
|
-
{
|
1211
|
-
token : "comment", // closing comment
|
1212
|
-
regex : ".*?\\*\\/",
|
1213
|
-
next : "start"
|
1214
|
-
}, {
|
1215
|
-
token : "comment", // comment spanning whole line
|
1216
|
-
regex : ".+"
|
1217
|
-
}
|
1218
|
-
],
|
1219
|
-
"qqstring" : [
|
1220
|
-
{
|
1221
|
-
token : "constant.language.escape",
|
1222
|
-
regex : escapedRe
|
1223
|
-
}, {
|
1224
|
-
token : "string",
|
1225
|
-
regex : "\\\\$",
|
1226
|
-
next : "qqstring",
|
1227
|
-
}, {
|
1228
|
-
token : "string",
|
1229
|
-
regex : '"|$',
|
1230
|
-
next : "start",
|
1231
|
-
}, {
|
1232
|
-
token : "string",
|
1233
|
-
regex : '.|\\w+|\\s+',
|
1234
|
-
}
|
1235
|
-
],
|
1236
|
-
"qstring" : [
|
1237
|
-
{
|
1238
|
-
token : "constant.language.escape",
|
1239
|
-
regex : escapedRe
|
1240
|
-
}, {
|
1241
|
-
token : "string",
|
1242
|
-
regex : "\\\\$",
|
1243
|
-
next : "qstring",
|
1244
|
-
}, {
|
1245
|
-
token : "string",
|
1246
|
-
regex : "'|$",
|
1247
|
-
next : "start",
|
1248
|
-
}, {
|
1249
|
-
token : "string",
|
1250
|
-
regex : '.|\\w+|\\s+',
|
1251
|
-
}
|
1252
|
-
]
|
1253
|
-
};
|
1254
|
-
|
1255
|
-
this.embedRules(DocCommentHighlightRules, "doc-",
|
1256
|
-
[ DocCommentHighlightRules.getEndRule("start") ]);
|
1257
|
-
};
|
1258
|
-
|
1259
|
-
oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
|
1260
|
-
|
1261
|
-
exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
|
1262
|
-
});
|
1263
|
-
|
1264
|
-
define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
1265
|
-
|
1266
|
-
|
1267
|
-
var oop = require("../lib/oop");
|
1268
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
1269
|
-
|
1270
|
-
var DocCommentHighlightRules = function() {
|
1271
|
-
|
1272
|
-
this.$rules = {
|
1273
|
-
"start" : [ {
|
1274
|
-
token : "comment.doc.tag",
|
1275
|
-
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
1276
|
-
}, {
|
1277
|
-
token : "comment.doc",
|
1278
|
-
regex : "\\s+"
|
1279
|
-
}, {
|
1280
|
-
token : "comment.doc",
|
1281
|
-
regex : "TODO"
|
1282
|
-
}, {
|
1283
|
-
token : "comment.doc",
|
1284
|
-
regex : "[^@\\*]+"
|
1285
|
-
}, {
|
1286
|
-
token : "comment.doc",
|
1287
|
-
regex : "."
|
1288
|
-
}]
|
1289
|
-
};
|
1290
|
-
};
|
1291
|
-
|
1292
|
-
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
1293
|
-
|
1294
|
-
DocCommentHighlightRules.getStartRule = function(start) {
|
1295
|
-
return {
|
1296
|
-
token : "comment.doc", // doc comment
|
1297
|
-
regex : "\\/\\*(?=\\*)",
|
1298
|
-
next : start
|
1299
|
-
};
|
1300
|
-
};
|
1301
|
-
|
1302
|
-
DocCommentHighlightRules.getEndRule = function (start) {
|
1303
|
-
return {
|
1304
|
-
token : "comment.doc", // closing comment
|
1305
|
-
regex : "\\*\\/",
|
1306
|
-
next : start
|
1307
|
-
};
|
1308
|
-
};
|
1309
|
-
|
1310
|
-
|
1311
|
-
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
1312
|
-
|
1313
|
-
});
|
1314
|
-
|
1315
|
-
define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
1316
|
-
|
1317
|
-
|
1318
|
-
var Range = require("../range").Range;
|
1319
|
-
|
1320
|
-
var MatchingBraceOutdent = function() {};
|
1321
|
-
|
1322
|
-
(function() {
|
1323
|
-
|
1324
|
-
this.checkOutdent = function(line, input) {
|
1325
|
-
if (! /^\s+$/.test(line))
|
1326
|
-
return false;
|
1327
|
-
|
1328
|
-
return /^\s*\}/.test(input);
|
1329
|
-
};
|
1330
|
-
|
1331
|
-
this.autoOutdent = function(doc, row) {
|
1332
|
-
var line = doc.getLine(row);
|
1333
|
-
var match = line.match(/^(\s*\})/);
|
1334
|
-
|
1335
|
-
if (!match) return 0;
|
1336
|
-
|
1337
|
-
var column = match[1].length;
|
1338
|
-
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
1339
|
-
|
1340
|
-
if (!openBracePos || openBracePos.row == row) return 0;
|
1341
|
-
|
1342
|
-
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
1343
|
-
doc.replace(new Range(row, 0, row, column-1), indent);
|
1344
|
-
};
|
1345
|
-
|
1346
|
-
this.$getIndent = function(line) {
|
1347
|
-
var match = line.match(/^(\s+)/);
|
1348
|
-
if (match) {
|
1349
|
-
return match[1];
|
1350
|
-
}
|
1351
|
-
|
1352
|
-
return "";
|
1353
|
-
};
|
1354
|
-
|
1355
|
-
}).call(MatchingBraceOutdent.prototype);
|
1356
|
-
|
1357
|
-
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
1358
|
-
});
|
1359
|
-
|
1360
|
-
define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
1361
|
-
|
1362
|
-
|
1363
|
-
var oop = require("../../lib/oop");
|
1364
|
-
var Range = require("../../range").Range;
|
1365
|
-
var BaseFoldMode = require("./fold_mode").FoldMode;
|
1366
|
-
|
1367
|
-
var FoldMode = exports.FoldMode = function() {};
|
1368
|
-
oop.inherits(FoldMode, BaseFoldMode);
|
1369
|
-
|
1370
|
-
(function() {
|
1371
|
-
|
1372
|
-
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
|
1373
|
-
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
|
1374
|
-
|
1375
|
-
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
1376
|
-
var line = session.getLine(row);
|
1377
|
-
var match = line.match(this.foldingStartMarker);
|
1378
|
-
if (match) {
|
1379
|
-
var i = match.index;
|
1380
|
-
|
1381
|
-
if (match[1])
|
1382
|
-
return this.openingBracketBlock(session, match[1], row, i);
|
1383
|
-
|
1384
|
-
return session.getCommentFoldRange(row, i + match[0].length, 1);
|
1385
|
-
}
|
1386
|
-
|
1387
|
-
if (foldStyle !== "markbeginend")
|
1388
|
-
return;
|
1389
|
-
|
1390
|
-
var match = line.match(this.foldingStopMarker);
|
1391
|
-
if (match) {
|
1392
|
-
var i = match.index + match[0].length;
|
1393
|
-
|
1394
|
-
if (match[1])
|
1395
|
-
return this.closingBracketBlock(session, match[1], row, i);
|
1396
|
-
|
1397
|
-
return session.getCommentFoldRange(row, i, -1);
|
1398
|
-
}
|
1399
|
-
};
|
1400
|
-
|
1401
|
-
}).call(FoldMode.prototype);
|
1402
|
-
|
1403
|
-
});
|
1404
|
-
|
1405
|
-
define('ace/mode/svg_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/xml_util'], function(require, exports, module) {
|
1406
|
-
|
1407
|
-
|
1408
|
-
var oop = require("../lib/oop");
|
1409
|
-
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
|
1410
|
-
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
1411
|
-
var xmlUtil = require("./xml_util");
|
1412
|
-
|
1413
|
-
var SvgHighlightRules = function() {
|
1414
|
-
XmlHighlightRules.call(this);
|
1415
|
-
|
1416
|
-
this.$rules.start.splice(3, 0, {
|
1417
|
-
token : "meta.tag",
|
1418
|
-
regex : "<(?=script)",
|
1419
|
-
next : "script"
|
1420
|
-
});
|
1421
|
-
|
1422
|
-
xmlUtil.tag(this.$rules, "script", "js-start");
|
1423
|
-
|
1424
|
-
this.embedRules(JavaScriptHighlightRules, "js-", [{
|
1425
|
-
token: "comment",
|
1426
|
-
regex: "\\/\\/.*(?=<\\/script>)",
|
1427
|
-
next: "tag"
|
1428
|
-
}, {
|
1429
|
-
token: "meta.tag",
|
1430
|
-
regex: "<\\/(?=script)",
|
1431
|
-
next: "tag"
|
1432
|
-
}]);
|
1433
|
-
};
|
1434
|
-
|
1435
|
-
oop.inherits(SvgHighlightRules, XmlHighlightRules);
|
1436
|
-
|
1437
|
-
exports.SvgHighlightRules = SvgHighlightRules;
|
1438
|
-
});
|
1439
|
-
|
1440
|
-
define('ace/mode/folding/mixed', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
|
1441
|
-
|
1442
|
-
|
1443
|
-
var oop = require("../../lib/oop");
|
1444
|
-
var BaseFoldMode = require("./fold_mode").FoldMode;
|
1445
|
-
|
1446
|
-
var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
|
1447
|
-
this.defaultMode = defaultMode;
|
1448
|
-
this.subModes = subModes;
|
1449
|
-
};
|
1450
|
-
oop.inherits(FoldMode, BaseFoldMode);
|
1451
|
-
|
1452
|
-
(function() {
|
1453
|
-
|
1454
|
-
|
1455
|
-
this.$getMode = function(state) {
|
1456
|
-
for (var key in this.subModes) {
|
1457
|
-
if (state.indexOf(key) === 0)
|
1458
|
-
return this.subModes[key];
|
1459
|
-
}
|
1460
|
-
return null;
|
1461
|
-
};
|
1462
|
-
|
1463
|
-
this.$tryMode = function(state, session, foldStyle, row) {
|
1464
|
-
var mode = this.$getMode(state);
|
1465
|
-
return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
|
1466
|
-
};
|
1467
|
-
|
1468
|
-
this.getFoldWidget = function(session, foldStyle, row) {
|
1469
|
-
return (
|
1470
|
-
this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
|
1471
|
-
this.$tryMode(session.getState(row), session, foldStyle, row) ||
|
1472
|
-
this.defaultMode.getFoldWidget(session, foldStyle, row)
|
1473
|
-
);
|
1474
|
-
};
|
1475
|
-
|
1476
|
-
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
1477
|
-
var mode = this.$getMode(session.getState(row-1));
|
1478
|
-
|
1479
|
-
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
|
1480
|
-
mode = this.$getMode(session.getState(row));
|
1481
|
-
|
1482
|
-
if (!mode || !mode.getFoldWidget(session, foldStyle, row))
|
1483
|
-
mode = this.defaultMode;
|
1484
|
-
|
1485
|
-
return mode.getFoldWidgetRange(session, foldStyle, row);
|
1486
|
-
};
|
1487
|
-
|
1488
|
-
}).call(FoldMode.prototype);
|
1489
|
-
|
1490
|
-
});
|