ace-rails-ap 4.2 → 4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ace/rails/version.rb +1 -1
- data/update.sh +1 -1
- data/vendor/assets/javascripts/ace/ace.js +661 -160
- data/vendor/assets/javascripts/ace/ext-beautify.js +1 -0
- data/vendor/assets/javascripts/ace/ext-emmet.js +314 -218
- data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +37 -32
- data/vendor/assets/javascripts/ace/ext-language_tools.js +362 -225
- data/vendor/assets/javascripts/ace/ext-linking.js +1 -1
- data/vendor/assets/javascripts/ace/ext-modelist.js +6 -2
- data/vendor/assets/javascripts/ace/ext-options.js +45 -34
- data/vendor/assets/javascripts/ace/ext-prompt.js +2764 -0
- data/vendor/assets/javascripts/ace/ext-rtl.js +1 -3
- data/vendor/assets/javascripts/ace/ext-settings_menu.js +49 -38
- data/vendor/assets/javascripts/ace/ext-statusbar.js +2 -2
- data/vendor/assets/javascripts/ace/ext-whitespace.js +4 -0
- data/vendor/assets/javascripts/ace/keybinding-emacs.js +1 -0
- data/vendor/assets/javascripts/ace/keybinding-vim.js +296 -66
- data/vendor/assets/javascripts/ace/mode-aql.js +102 -0
- data/vendor/assets/javascripts/ace/mode-autohotkey.js +3 -1
- data/vendor/assets/javascripts/ace/mode-cirru.js +2 -2
- data/vendor/assets/javascripts/ace/mode-crystal.js +642 -0
- data/vendor/assets/javascripts/ace/mode-csound_document.js +42 -29
- data/vendor/assets/javascripts/ace/mode-csound_orchestra.js +35 -25
- data/vendor/assets/javascripts/ace/mode-csound_score.js +29 -21
- data/vendor/assets/javascripts/ace/mode-fsharp.js +2 -2
- data/vendor/assets/javascripts/ace/mode-gherkin.js +0 -2
- data/vendor/assets/javascripts/ace/mode-gobstones.js +252 -94
- data/vendor/assets/javascripts/ace/mode-io.js +1 -7
- data/vendor/assets/javascripts/ace/mode-jade.js +1 -1
- data/vendor/assets/javascripts/ace/mode-lua.js +30 -10
- data/vendor/assets/javascripts/ace/mode-luapage.js +30 -10
- data/vendor/assets/javascripts/ace/mode-lucene.js +77 -9
- data/vendor/assets/javascripts/ace/mode-markdown.js +2 -1
- data/vendor/assets/javascripts/ace/mode-mask.js +1 -1
- data/vendor/assets/javascripts/ace/mode-nginx.js +298 -0
- data/vendor/assets/javascripts/ace/mode-nim.js +363 -0
- data/vendor/assets/javascripts/ace/mode-pascal.js +84 -66
- data/vendor/assets/javascripts/ace/mode-php.js +1 -1
- data/vendor/assets/javascripts/ace/mode-php_laravel_blade.js +1 -1
- data/vendor/assets/javascripts/ace/mode-puppet.js +3 -3
- data/vendor/assets/javascripts/ace/mode-slim.js +2 -1
- data/vendor/assets/javascripts/ace/mode-tcl.js +3 -0
- data/vendor/assets/javascripts/ace/mode-terraform.js +4 -4
- data/vendor/assets/javascripts/ace/mode-yaml.js +44 -13
- data/vendor/assets/javascripts/ace/mode-zeek.js +539 -0
- data/vendor/assets/javascripts/ace/snippets/abap.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/abc.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/actionscript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/ada.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/apache_conf.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/apex.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/applescript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/aql.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/asciidoc.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/asl.js +13 -0
- data/vendor/assets/javascripts/ace/snippets/assembly_x86.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/autohotkey.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/batchfile.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/bro.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/c9search.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/c_cpp.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/cirru.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/clojure.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/cobol.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/coffee.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/coldfusion.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/crystal.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/csharp.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/csound_document.js +24 -0
- data/vendor/assets/javascripts/ace/snippets/csound_orchestra.js +61 -0
- data/vendor/assets/javascripts/ace/snippets/csound_score.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/csp.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/css.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/curly.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/d.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/dart.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/diff.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/django.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/dockerfile.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/dot.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/drools.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/edifact.js +254 -0
- data/vendor/assets/javascripts/ace/snippets/eiffel.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/ejs.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/elixir.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/elm.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/erlang.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/forth.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/fortran.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/fsharp.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/fsl.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/ftl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/gcode.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/gherkin.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/gitignore.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/glsl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/gobstones.js +1701 -24
- data/vendor/assets/javascripts/ace/snippets/golang.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/graphqlschema.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/groovy.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/haml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/handlebars.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/haskell.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/haskell_cabal.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/haxe.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/hjson.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/html.js +36 -2
- data/vendor/assets/javascripts/ace/snippets/html_elixir.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/html_ruby.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/ini.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/io.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/jack.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/jade.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/java.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/javascript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/json.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/jsoniq.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/jsp.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/jssm.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/jsx.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/julia.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/kotlin.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/latex.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/less.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/liquid.js +890 -2
- data/vendor/assets/javascripts/ace/snippets/lisp.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/livescript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/logiql.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/logtalk.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/lsl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/lua.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/luapage.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/lucene.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/makefile.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/markdown.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/mask.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/matlab.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/maze.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/mel.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/mixal.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/mushcode.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/mysql.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/nginx.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/nim.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/nix.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/nsis.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/objectivec.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/ocaml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/pascal.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/perl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/perl6.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/pgsql.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/php.js +49 -36
- data/vendor/assets/javascripts/ace/snippets/php_laravel_blade.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/pig.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/plain_text.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/powershell.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/praat.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/prolog.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/properties.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/protobuf.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/puppet.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/python.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/r.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/razor.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/rdoc.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/red.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/redshift.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/rhtml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/rst.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/ruby.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/rust.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sass.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/scad.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/scala.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/scheme.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/scss.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sh.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sjs.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/slim.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/smarty.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/snippets.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/soy_template.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/space.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sparql.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sql.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/sqlserver.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/stylus.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/svg.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/swift.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/tcl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/terraform.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/tex.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/text.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/textile.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/toml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/tsx.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/turtle.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/twig.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/typescript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/vala.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/vbscript.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/velocity.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/verilog.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/vhdl.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/visualforce.js +14 -0
- data/vendor/assets/javascripts/ace/snippets/wollok.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/xml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/xquery.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/yaml.js +8 -1
- data/vendor/assets/javascripts/ace/snippets/zeek.js +14 -0
- data/vendor/assets/javascripts/ace/worker-coffee.js +2 -2
- data/vendor/assets/javascripts/ace/worker-css.js +9 -3
- data/vendor/assets/javascripts/ace/worker-html.js +2 -2
- data/vendor/assets/javascripts/ace/worker-javascript.js +2 -2
- data/vendor/assets/javascripts/ace/worker-json.js +2 -2
- data/vendor/assets/javascripts/ace/worker-lua.js +2 -2
- data/vendor/assets/javascripts/ace/worker-php.js +4 -4
- data/vendor/assets/javascripts/ace/worker-xml.js +2 -2
- data/vendor/assets/javascripts/ace/worker-xquery.js +2 -2
- metadata +34 -16
- data/vendor/assets/javascripts/ace/ext-chromevox.js +0 -540
- data/vendor/assets/javascripts/ace/ext-old_ie.js +0 -502
- data/vendor/assets/javascripts/ace/mode-bash.js +0 -247
- data/vendor/assets/javascripts/ace/mode-lean.js +0 -281
- data/vendor/assets/javascripts/ace/mode-live_script.js +0 -481
- data/vendor/assets/javascripts/ace/mode-mips_assembler.js +0 -235
- data/vendor/assets/javascripts/ace/mode-mipsassembler.js +0 -196
- data/vendor/assets/javascripts/ace/mode-swig.js +0 -1099
- data/vendor/assets/javascripts/ace/snippets/lean.js +0 -7
- data/vendor/assets/javascripts/ace/snippets/live_script.js +0 -7
- data/vendor/assets/javascripts/ace/snippets/mips_assembler.js +0 -7
- data/vendor/assets/javascripts/ace/snippets/mipsassembler.js +0 -7
- data/vendor/assets/javascripts/ace/snippets/swig.js +0 -7
@@ -11046,7 +11046,7 @@ var functionMap = {
|
|
11046
11046
|
],
|
11047
11047
|
"xmlwriter_write_element_ns": [
|
11048
11048
|
"bool xmlwriter_write_element_ns(resource xmlwriter, string prefix, string name, string uri[, string content])",
|
11049
|
-
"Write full
|
11049
|
+
"Write full namespaced element tag - returns FALSE on error"
|
11050
11050
|
],
|
11051
11051
|
"xmlwriter_write_pi": [
|
11052
11052
|
"bool xmlwriter_write_pi(resource xmlwriter, string target, string content)",
|
@@ -11217,7 +11217,7 @@ var functionMap = {
|
|
11217
11217
|
],
|
11218
11218
|
"xmlwriter_write_element_ns": [
|
11219
11219
|
"bool xmlwriter_write_element_ns(resource xmlwriter, string prefix, string name, string uri[, string content])",
|
11220
|
-
"Write full
|
11220
|
+
"Write full namespaced element tag - returns FALSE on error"
|
11221
11221
|
],
|
11222
11222
|
"xmlwriter_write_pi": [
|
11223
11223
|
"bool xmlwriter_write_pi(resource xmlwriter, string target, string content)",
|
@@ -30,7 +30,7 @@ var PuppetHighlightRules = function () {
|
|
30
30
|
regex: "\\b([a-zA-Z_]+)(\\s+=>)"
|
31
31
|
},
|
32
32
|
{
|
33
|
-
token: ["exported.resource.puppet", "keyword.name.resource.puppet", "paren.
|
33
|
+
token: ["exported.resource.puppet", "keyword.name.resource.puppet", "paren.lparen"],
|
34
34
|
regex: "(\\@\\@)?(\\s*[a-zA-Z_]*)(\\s*\\{)"
|
35
35
|
},
|
36
36
|
{
|
@@ -65,11 +65,11 @@ var PuppetHighlightRules = function () {
|
|
65
65
|
},
|
66
66
|
|
67
67
|
{
|
68
|
-
token: "paren.
|
68
|
+
token: "paren.lparen",
|
69
69
|
regex: "[[({]"
|
70
70
|
},
|
71
71
|
{
|
72
|
-
token: "paren.
|
72
|
+
token: "paren.rparen",
|
73
73
|
regex: "[\\])}]"
|
74
74
|
},
|
75
75
|
{include: "variable"},
|
@@ -2831,7 +2831,7 @@ var MarkdownHighlightRules = function() {
|
|
2831
2831
|
next : "blockquote"
|
2832
2832
|
}, { // HR * - _
|
2833
2833
|
token : "constant",
|
2834
|
-
regex : "^ {0,
|
2834
|
+
regex : "^ {0,3}(?:(?:\\* ?){3,}|(?:\\- ?){3,}|(?:\\_ ?){3,})\\s*$",
|
2835
2835
|
next: "allowBlock"
|
2836
2836
|
}, { // list
|
2837
2837
|
token : "markup.list",
|
@@ -3366,6 +3366,7 @@ oop.inherits(Mode, TextMode);
|
|
3366
3366
|
(function() {
|
3367
3367
|
this.type = "text";
|
3368
3368
|
this.blockComment = {start: "<!--", end: "-->"};
|
3369
|
+
this.$quotes = {'"': '"', "`": "`"};
|
3369
3370
|
|
3370
3371
|
this.getNextLineIndent = function(state, line, tab) {
|
3371
3372
|
if (state == "listblock") {
|
@@ -229,6 +229,9 @@ var TclHighlightRules = function() {
|
|
229
229
|
}, {
|
230
230
|
token : "paren.rparen",
|
231
231
|
regex : "[\\])}]"
|
232
|
+
}, {
|
233
|
+
token : "paren.lparen",
|
234
|
+
regex : "[[({]"
|
232
235
|
}, {
|
233
236
|
token : "support.function",
|
234
237
|
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::"
|
@@ -52,12 +52,12 @@ var TerraformHighlightRules = function () {
|
|
52
52
|
regex: "^\\s*(locals|terraform)\\s*{"
|
53
53
|
},
|
54
54
|
{
|
55
|
-
token: "paren.
|
55
|
+
token: "paren.lparen",
|
56
56
|
regex: "[[({]"
|
57
57
|
},
|
58
58
|
|
59
59
|
{
|
60
|
-
token: "paren.
|
60
|
+
token: "paren.rparen",
|
61
61
|
regex: "[\\])}]"
|
62
62
|
},
|
63
63
|
{include: "constants"},
|
@@ -164,11 +164,11 @@ var TerraformHighlightRules = function () {
|
|
164
164
|
],
|
165
165
|
"parenthesis": [
|
166
166
|
{
|
167
|
-
token: "paren.
|
167
|
+
token: "paren.lparen",
|
168
168
|
regex: "\\["
|
169
169
|
},
|
170
170
|
{
|
171
|
-
token: "paren.
|
171
|
+
token: "paren.rparen",
|
172
172
|
regex: "\\]"
|
173
173
|
}
|
174
174
|
]
|
@@ -39,20 +39,25 @@ var YamlHighlightRules = function() {
|
|
39
39
|
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
40
40
|
}, {
|
41
41
|
token : "string", // multi line string start
|
42
|
-
regex : /[|>][-+\d
|
42
|
+
regex : /[|>][-+\d]*(?:$|\s+(?:$|#))/,
|
43
43
|
onMatch: function(val, state, stack, line) {
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
line = line.replace(/ #.*/, "");
|
45
|
+
var indent = /^ *((:\s*)?-(\s*[^|>])?)?/.exec(line)[0]
|
46
|
+
.replace(/\S\s*$/, "").length;
|
47
|
+
var indentationIndicator = parseInt(/\d+[\s+-]*$/.exec(line));
|
48
|
+
|
49
|
+
if (indentationIndicator) {
|
50
|
+
indent += indentationIndicator - 1;
|
51
|
+
this.next = "mlString";
|
47
52
|
} else {
|
48
|
-
|
49
|
-
}
|
50
|
-
|
51
|
-
if (stack.length < 2) {
|
52
|
-
stack.push(indent.length);
|
53
|
+
this.next = "mlStringPre";
|
53
54
|
}
|
54
|
-
|
55
|
-
stack
|
55
|
+
if (!stack.length) {
|
56
|
+
stack.push(this.next);
|
57
|
+
stack.push(indent);
|
58
|
+
} else {
|
59
|
+
stack[0] = this.next;
|
60
|
+
stack[1] = indent;
|
56
61
|
}
|
57
62
|
return this.token;
|
58
63
|
},
|
@@ -80,13 +85,39 @@ var YamlHighlightRules = function() {
|
|
80
85
|
regex : /[^\s,:\[\]\{\}]+/
|
81
86
|
}
|
82
87
|
],
|
88
|
+
"mlStringPre" : [
|
89
|
+
{
|
90
|
+
token : "indent",
|
91
|
+
regex : /^ *$/
|
92
|
+
}, {
|
93
|
+
token : "indent",
|
94
|
+
regex : /^ */,
|
95
|
+
onMatch: function(val, state, stack) {
|
96
|
+
var curIndent = stack[1];
|
97
|
+
|
98
|
+
if (curIndent >= val.length) {
|
99
|
+
this.next = "start";
|
100
|
+
stack.shift();
|
101
|
+
stack.shift();
|
102
|
+
}
|
103
|
+
else {
|
104
|
+
stack[1] = val.length - 1;
|
105
|
+
this.next = stack[0] = "mlString";
|
106
|
+
}
|
107
|
+
return this.token;
|
108
|
+
},
|
109
|
+
next : "mlString"
|
110
|
+
}, {
|
111
|
+
defaultToken : "string"
|
112
|
+
}
|
113
|
+
],
|
83
114
|
"mlString" : [
|
84
115
|
{
|
85
116
|
token : "indent",
|
86
|
-
regex :
|
117
|
+
regex : /^ *$/
|
87
118
|
}, {
|
88
119
|
token : "indent",
|
89
|
-
regex :
|
120
|
+
regex : /^ */,
|
90
121
|
onMatch: function(val, state, stack) {
|
91
122
|
var curIndent = stack[1];
|
92
123
|
|
@@ -0,0 +1,539 @@
|
|
1
|
+
define("ace/mode/zeek_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
2
|
+
"use strict";
|
3
|
+
|
4
|
+
var oop = require("../lib/oop");
|
5
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
6
|
+
|
7
|
+
var ZeekHighlightRules = function() {
|
8
|
+
|
9
|
+
this.$rules = {
|
10
|
+
"start": [
|
11
|
+
{
|
12
|
+
token: "comment.line",
|
13
|
+
regex: "#.*$"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
token: "string.double",
|
17
|
+
regex: /"/,
|
18
|
+
next: "string-state"
|
19
|
+
},
|
20
|
+
{
|
21
|
+
token: "string.regexp",
|
22
|
+
regex: "(/)(?=.*/)",
|
23
|
+
next: "pattern-state"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
token: ["keyword.other", "meta.preprocessor"],
|
27
|
+
regex: /(@(?:load-plugin|load-sigs|load|unload))(.*$)/
|
28
|
+
},
|
29
|
+
{
|
30
|
+
token: "keyword.other",
|
31
|
+
regex: /@(?:DEBUG|DIR|FILENAME|deprecated|if|ifdef|ifndef|else|endif)/
|
32
|
+
},
|
33
|
+
{
|
34
|
+
token: [
|
35
|
+
"keyword.other",
|
36
|
+
"meta.preprocessor",
|
37
|
+
"keyword.operator",
|
38
|
+
"meta.preprocessor"
|
39
|
+
],
|
40
|
+
regex: /(@prefixes)(\s*)(\+?=)(.*$)/
|
41
|
+
},
|
42
|
+
{
|
43
|
+
token: "storage.modifier.attribute",
|
44
|
+
regex: /\&\b(?:redef|priority|log|optional|default|add_func|delete_func|expire_func|read_expire|write_expire|create_expire|synchronized|persistent|rotate_interval|rotate_size|encrypt|raw_output|mergeable|error_handler|type_column|deprecated)\b/
|
45
|
+
},
|
46
|
+
{
|
47
|
+
token: "constant.language",
|
48
|
+
regex: /\b(?:T|F)\b/
|
49
|
+
},
|
50
|
+
{
|
51
|
+
token: "constant.numeric.port",
|
52
|
+
regex: /\b\d{1,5}\/(?:udp|tcp|icmp|unknown)\b/
|
53
|
+
},
|
54
|
+
{
|
55
|
+
token: "constant.numeric.addr",
|
56
|
+
regex: /\b(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\b/,
|
57
|
+
comment: "IPv4 address"
|
58
|
+
},
|
59
|
+
{
|
60
|
+
token: "constant.numeric.addr",
|
61
|
+
regex: /\[(?:[0-9a-fA-F]{0,4}:){2,7}(?:[0-9a-fA-F]{0,4})?(?:(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2}))?\]/,
|
62
|
+
comment: "IPv6 address"
|
63
|
+
},
|
64
|
+
{
|
65
|
+
token: "constant.numeric.float.decimal.interval",
|
66
|
+
regex: /(?:(?:\d*\.\d*(?:[eE][+-]?\d+)?|\d*[eE][+-]?\d+|\d*\.\d*)|\d+)\s*(?:day|hr|min|msec|usec|sec)s?/
|
67
|
+
},
|
68
|
+
{
|
69
|
+
token: "constant.numeric.float.decimal",
|
70
|
+
regex: /\d*\.\d*(?:[eE][+-]?\d+)?|\d*[eE][+-]?\d+|\d*\.\d*/
|
71
|
+
},
|
72
|
+
{
|
73
|
+
token: "constant.numeric.hostname",
|
74
|
+
regex: /\b[A-Za-z0-9][A-Za-z0-9\-]*(?:\.[A-Za-z0-9][A-Za-z0-9\-]*)+\b/
|
75
|
+
},
|
76
|
+
{
|
77
|
+
token: "constant.numeric.integer.hexadecimal",
|
78
|
+
regex: /\b0x[0-9a-fA-F]+\b/
|
79
|
+
},
|
80
|
+
{
|
81
|
+
token: "constant.numeric.integer.decimal",
|
82
|
+
regex: /\b\d+\b/
|
83
|
+
},
|
84
|
+
{
|
85
|
+
token: "keyword.operator",
|
86
|
+
regex: /==|!=|<=|<|>=|>/
|
87
|
+
},
|
88
|
+
{
|
89
|
+
token: "keyword.operator",
|
90
|
+
regex: /(&&)|(\|\|)|(!)/
|
91
|
+
},
|
92
|
+
{
|
93
|
+
token: "keyword.operator",
|
94
|
+
regex: /=|\+=|-=/
|
95
|
+
},
|
96
|
+
{
|
97
|
+
token: "keyword.operator",
|
98
|
+
regex: /\+\+|\+|--|-|\*|\/|%/
|
99
|
+
},
|
100
|
+
{
|
101
|
+
token: "keyword.operator",
|
102
|
+
regex: /&|\||\^|~/
|
103
|
+
},
|
104
|
+
{
|
105
|
+
token: "keyword.operator",
|
106
|
+
regex: /\b(?:in|as|is)\b/
|
107
|
+
},
|
108
|
+
{
|
109
|
+
token: "punctuation.terminator",
|
110
|
+
regex: /;/
|
111
|
+
},
|
112
|
+
{
|
113
|
+
token: "punctuation.accessor",
|
114
|
+
regex: /\??\$/
|
115
|
+
},
|
116
|
+
{
|
117
|
+
token: "punctuation.accessor",
|
118
|
+
regex: /::/
|
119
|
+
},
|
120
|
+
{
|
121
|
+
token: "keyword.operator",
|
122
|
+
regex: /\?/
|
123
|
+
},
|
124
|
+
{
|
125
|
+
token: "punctuation.separator",
|
126
|
+
regex: /:/
|
127
|
+
},
|
128
|
+
{
|
129
|
+
token: "punctuation.separator",
|
130
|
+
regex: /,/
|
131
|
+
},
|
132
|
+
{
|
133
|
+
token: [
|
134
|
+
"keyword.other",
|
135
|
+
"meta.namespace",
|
136
|
+
"entity.name.namespace"
|
137
|
+
],
|
138
|
+
regex: /(module)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)/
|
139
|
+
},
|
140
|
+
{
|
141
|
+
token: "keyword.other",
|
142
|
+
regex: /\bexport\b/
|
143
|
+
},
|
144
|
+
{
|
145
|
+
token: "keyword.control.conditional",
|
146
|
+
regex: /\b(?:if|else)\b/
|
147
|
+
},
|
148
|
+
{
|
149
|
+
token: "keyword.control",
|
150
|
+
regex: /\b(?:for|while)\b/
|
151
|
+
},
|
152
|
+
{
|
153
|
+
token: "keyword.control",
|
154
|
+
regex: /\b(?:return|break|next|continue|fallthrough)\b/
|
155
|
+
},
|
156
|
+
{
|
157
|
+
token: "keyword.control",
|
158
|
+
regex: /\b(?:switch|default|case)\b/
|
159
|
+
},
|
160
|
+
{
|
161
|
+
token: "keyword.other",
|
162
|
+
regex: /\b(?:add|delete)\b/
|
163
|
+
},
|
164
|
+
{
|
165
|
+
token: "keyword.other",
|
166
|
+
regex: /\bprint\b/
|
167
|
+
},
|
168
|
+
{
|
169
|
+
token: "keyword.control",
|
170
|
+
regex: /\b(?:when|timeout|schedule)\b/
|
171
|
+
},
|
172
|
+
{
|
173
|
+
token: [
|
174
|
+
"keyword.other",
|
175
|
+
"meta.struct.record",
|
176
|
+
"entity.name.struct.record",
|
177
|
+
"meta.struct.record",
|
178
|
+
"punctuation.separator",
|
179
|
+
"meta.struct.record",
|
180
|
+
"storage.type.struct.record"
|
181
|
+
],
|
182
|
+
regex: /\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)(\s*\b)(record)\b/
|
183
|
+
},
|
184
|
+
{
|
185
|
+
token: [
|
186
|
+
"keyword.other",
|
187
|
+
"meta.enum",
|
188
|
+
"entity.name.enum",
|
189
|
+
"meta.enum",
|
190
|
+
"punctuation.separator",
|
191
|
+
"meta.enum",
|
192
|
+
"storage.type.enum"
|
193
|
+
],
|
194
|
+
regex: /\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)(\s*\b)(enum)\b/
|
195
|
+
},
|
196
|
+
{
|
197
|
+
token: [
|
198
|
+
"keyword.other",
|
199
|
+
"meta.type",
|
200
|
+
"entity.name.type",
|
201
|
+
"meta.type",
|
202
|
+
"punctuation.separator"
|
203
|
+
],
|
204
|
+
regex: /\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)/
|
205
|
+
},
|
206
|
+
{
|
207
|
+
token: [
|
208
|
+
"keyword.other",
|
209
|
+
"meta.struct.record",
|
210
|
+
"storage.type.struct.record",
|
211
|
+
"meta.struct.record",
|
212
|
+
"entity.name.struct.record"
|
213
|
+
],
|
214
|
+
regex: /\b(redef)(\s+)(record)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/
|
215
|
+
},
|
216
|
+
{
|
217
|
+
token: [
|
218
|
+
"keyword.other",
|
219
|
+
"meta.enum",
|
220
|
+
"storage.type.enum",
|
221
|
+
"meta.enum",
|
222
|
+
"entity.name.enum"
|
223
|
+
],
|
224
|
+
regex: /\b(redef)(\s+)(enum)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/
|
225
|
+
},
|
226
|
+
{
|
227
|
+
token: [
|
228
|
+
"storage.type",
|
229
|
+
"text",
|
230
|
+
"entity.name.function.event"
|
231
|
+
],
|
232
|
+
regex: /\b(event)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/
|
233
|
+
},
|
234
|
+
{
|
235
|
+
token: [
|
236
|
+
"storage.type",
|
237
|
+
"text",
|
238
|
+
"entity.name.function.hook"
|
239
|
+
],
|
240
|
+
regex: /\b(hook)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/
|
241
|
+
},
|
242
|
+
{
|
243
|
+
token: [
|
244
|
+
"storage.type",
|
245
|
+
"text",
|
246
|
+
"entity.name.function"
|
247
|
+
],
|
248
|
+
regex: /\b(function)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/
|
249
|
+
},
|
250
|
+
{
|
251
|
+
token: "keyword.other",
|
252
|
+
regex: /\bredef\b/
|
253
|
+
},
|
254
|
+
{
|
255
|
+
token: "storage.type",
|
256
|
+
regex: /\bany\b/
|
257
|
+
},
|
258
|
+
{
|
259
|
+
token: "storage.type",
|
260
|
+
regex: /\b(?:enum|record|set|table|vector)\b/
|
261
|
+
},
|
262
|
+
{
|
263
|
+
token: [
|
264
|
+
"storage.type",
|
265
|
+
"text",
|
266
|
+
"keyword.operator",
|
267
|
+
"text",
|
268
|
+
"storage.type"
|
269
|
+
],
|
270
|
+
regex: /\b(opaque)(\s+)(of)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/
|
271
|
+
},
|
272
|
+
{
|
273
|
+
token: "keyword.operator",
|
274
|
+
regex: /\bof\b/
|
275
|
+
},
|
276
|
+
{
|
277
|
+
token: "storage.type",
|
278
|
+
regex: /\b(?:addr|bool|count|double|file|int|interval|pattern|port|string|subnet|time)\b/
|
279
|
+
},
|
280
|
+
{
|
281
|
+
token: "storage.type",
|
282
|
+
regex: /\b(?:function|hook|event)\b/
|
283
|
+
},
|
284
|
+
{
|
285
|
+
token: "storage.modifier",
|
286
|
+
regex: /\b(?:global|local|const|option)\b/
|
287
|
+
},
|
288
|
+
{
|
289
|
+
token: "entity.name.function.call",
|
290
|
+
regex: /\b[A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*(?=s*\()/
|
291
|
+
},
|
292
|
+
{
|
293
|
+
token: "punctuation.section.block.begin",
|
294
|
+
regex: /\{/
|
295
|
+
},
|
296
|
+
{
|
297
|
+
token: "punctuation.section.block.end",
|
298
|
+
regex: /\}/
|
299
|
+
},
|
300
|
+
{
|
301
|
+
token: "punctuation.section.brackets.begin",
|
302
|
+
regex: /\[/
|
303
|
+
},
|
304
|
+
{
|
305
|
+
token: "punctuation.section.brackets.end",
|
306
|
+
regex: /\]/
|
307
|
+
},
|
308
|
+
{
|
309
|
+
token: "punctuation.section.parens.begin",
|
310
|
+
regex: /\(/
|
311
|
+
},
|
312
|
+
{
|
313
|
+
token: "punctuation.section.parens.end",
|
314
|
+
regex: /\)/
|
315
|
+
}
|
316
|
+
|
317
|
+
], // state: start
|
318
|
+
|
319
|
+
"string-state": [
|
320
|
+
{
|
321
|
+
token: "constant.character.escape",
|
322
|
+
regex: /\\./
|
323
|
+
},
|
324
|
+
{
|
325
|
+
token: "string.double",
|
326
|
+
regex: /"/,
|
327
|
+
next: "start"
|
328
|
+
},
|
329
|
+
{
|
330
|
+
token: "constant.other.placeholder",
|
331
|
+
regex: /%-?[0-9]*(\.[0-9]+)?[DTdxsefg]/
|
332
|
+
},
|
333
|
+
{
|
334
|
+
token: "string.double",
|
335
|
+
regex: "."
|
336
|
+
}
|
337
|
+
], // state: string-state
|
338
|
+
|
339
|
+
"pattern-state": [
|
340
|
+
{
|
341
|
+
token: "constant.character.escape",
|
342
|
+
regex: /\\./
|
343
|
+
},
|
344
|
+
{
|
345
|
+
token: "string.regexp",
|
346
|
+
regex: "/",
|
347
|
+
next: "start"
|
348
|
+
},
|
349
|
+
{
|
350
|
+
token: "string.regexp",
|
351
|
+
regex: "."
|
352
|
+
}
|
353
|
+
] // state: pattern-state
|
354
|
+
|
355
|
+
};
|
356
|
+
|
357
|
+
this.normalizeRules();
|
358
|
+
};
|
359
|
+
|
360
|
+
ZeekHighlightRules.metaData = {
|
361
|
+
fileTypes: ["bro", "zeek"],
|
362
|
+
name: "Zeek",
|
363
|
+
scopeName: "source.zeek"
|
364
|
+
};
|
365
|
+
|
366
|
+
|
367
|
+
oop.inherits(ZeekHighlightRules, TextHighlightRules);
|
368
|
+
|
369
|
+
exports.ZeekHighlightRules = ZeekHighlightRules;
|
370
|
+
});
|
371
|
+
|
372
|
+
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
373
|
+
"use strict";
|
374
|
+
|
375
|
+
var oop = require("../../lib/oop");
|
376
|
+
var Range = require("../../range").Range;
|
377
|
+
var BaseFoldMode = require("./fold_mode").FoldMode;
|
378
|
+
|
379
|
+
var FoldMode = exports.FoldMode = function(commentRegex) {
|
380
|
+
if (commentRegex) {
|
381
|
+
this.foldingStartMarker = new RegExp(
|
382
|
+
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
383
|
+
);
|
384
|
+
this.foldingStopMarker = new RegExp(
|
385
|
+
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
386
|
+
);
|
387
|
+
}
|
388
|
+
};
|
389
|
+
oop.inherits(FoldMode, BaseFoldMode);
|
390
|
+
|
391
|
+
(function() {
|
392
|
+
|
393
|
+
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
394
|
+
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
395
|
+
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
396
|
+
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
397
|
+
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
398
|
+
this._getFoldWidgetBase = this.getFoldWidget;
|
399
|
+
this.getFoldWidget = function(session, foldStyle, row) {
|
400
|
+
var line = session.getLine(row);
|
401
|
+
|
402
|
+
if (this.singleLineBlockCommentRe.test(line)) {
|
403
|
+
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
404
|
+
return "";
|
405
|
+
}
|
406
|
+
|
407
|
+
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
408
|
+
|
409
|
+
if (!fw && this.startRegionRe.test(line))
|
410
|
+
return "start"; // lineCommentRegionStart
|
411
|
+
|
412
|
+
return fw;
|
413
|
+
};
|
414
|
+
|
415
|
+
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
416
|
+
var line = session.getLine(row);
|
417
|
+
|
418
|
+
if (this.startRegionRe.test(line))
|
419
|
+
return this.getCommentRegionBlock(session, line, row);
|
420
|
+
|
421
|
+
var match = line.match(this.foldingStartMarker);
|
422
|
+
if (match) {
|
423
|
+
var i = match.index;
|
424
|
+
|
425
|
+
if (match[1])
|
426
|
+
return this.openingBracketBlock(session, match[1], row, i);
|
427
|
+
|
428
|
+
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
429
|
+
|
430
|
+
if (range && !range.isMultiLine()) {
|
431
|
+
if (forceMultiline) {
|
432
|
+
range = this.getSectionRange(session, row);
|
433
|
+
} else if (foldStyle != "all")
|
434
|
+
range = null;
|
435
|
+
}
|
436
|
+
|
437
|
+
return range;
|
438
|
+
}
|
439
|
+
|
440
|
+
if (foldStyle === "markbegin")
|
441
|
+
return;
|
442
|
+
|
443
|
+
var match = line.match(this.foldingStopMarker);
|
444
|
+
if (match) {
|
445
|
+
var i = match.index + match[0].length;
|
446
|
+
|
447
|
+
if (match[1])
|
448
|
+
return this.closingBracketBlock(session, match[1], row, i);
|
449
|
+
|
450
|
+
return session.getCommentFoldRange(row, i, -1);
|
451
|
+
}
|
452
|
+
};
|
453
|
+
|
454
|
+
this.getSectionRange = function(session, row) {
|
455
|
+
var line = session.getLine(row);
|
456
|
+
var startIndent = line.search(/\S/);
|
457
|
+
var startRow = row;
|
458
|
+
var startColumn = line.length;
|
459
|
+
row = row + 1;
|
460
|
+
var endRow = row;
|
461
|
+
var maxRow = session.getLength();
|
462
|
+
while (++row < maxRow) {
|
463
|
+
line = session.getLine(row);
|
464
|
+
var indent = line.search(/\S/);
|
465
|
+
if (indent === -1)
|
466
|
+
continue;
|
467
|
+
if (startIndent > indent)
|
468
|
+
break;
|
469
|
+
var subRange = this.getFoldWidgetRange(session, "all", row);
|
470
|
+
|
471
|
+
if (subRange) {
|
472
|
+
if (subRange.start.row <= startRow) {
|
473
|
+
break;
|
474
|
+
} else if (subRange.isMultiLine()) {
|
475
|
+
row = subRange.end.row;
|
476
|
+
} else if (startIndent == indent) {
|
477
|
+
break;
|
478
|
+
}
|
479
|
+
}
|
480
|
+
endRow = row;
|
481
|
+
}
|
482
|
+
|
483
|
+
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
484
|
+
};
|
485
|
+
this.getCommentRegionBlock = function(session, line, row) {
|
486
|
+
var startColumn = line.search(/\s*$/);
|
487
|
+
var maxRow = session.getLength();
|
488
|
+
var startRow = row;
|
489
|
+
|
490
|
+
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
491
|
+
var depth = 1;
|
492
|
+
while (++row < maxRow) {
|
493
|
+
line = session.getLine(row);
|
494
|
+
var m = re.exec(line);
|
495
|
+
if (!m) continue;
|
496
|
+
if (m[1]) depth--;
|
497
|
+
else depth++;
|
498
|
+
|
499
|
+
if (!depth) break;
|
500
|
+
}
|
501
|
+
|
502
|
+
var endRow = row;
|
503
|
+
if (endRow > startRow) {
|
504
|
+
return new Range(startRow, startColumn, endRow, line.length);
|
505
|
+
}
|
506
|
+
};
|
507
|
+
|
508
|
+
}).call(FoldMode.prototype);
|
509
|
+
|
510
|
+
});
|
511
|
+
|
512
|
+
define("ace/mode/zeek",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/zeek_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
513
|
+
"use strict";
|
514
|
+
|
515
|
+
var oop = require("../lib/oop");
|
516
|
+
var TextMode = require("./text").Mode;
|
517
|
+
var ZeekHighlightRules = require("./zeek_highlight_rules").ZeekHighlightRules;
|
518
|
+
var FoldMode = require("./folding/cstyle").FoldMode;
|
519
|
+
|
520
|
+
var Mode = function() {
|
521
|
+
this.HighlightRules = ZeekHighlightRules;
|
522
|
+
this.foldingRules = new FoldMode();
|
523
|
+
};
|
524
|
+
oop.inherits(Mode, TextMode);
|
525
|
+
|
526
|
+
(function() {
|
527
|
+
this.lineCommentStart = "#";
|
528
|
+
this.$id = "ace/mode/zeek";
|
529
|
+
}).call(Mode.prototype);
|
530
|
+
|
531
|
+
exports.Mode = Mode;
|
532
|
+
}); (function() {
|
533
|
+
window.require(["ace/mode/zeek"], function(m) {
|
534
|
+
if (typeof module == "object" && typeof exports == "object" && module) {
|
535
|
+
module.exports = m;
|
536
|
+
}
|
537
|
+
});
|
538
|
+
})();
|
539
|
+
|