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
@@ -5,7 +5,9 @@ var oop = require("../lib/oop");
|
|
5
5
|
|
6
6
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
7
7
|
|
8
|
-
var CsoundPreprocessorHighlightRules = function() {
|
8
|
+
var CsoundPreprocessorHighlightRules = function(embeddedRulePrefix) {
|
9
|
+
|
10
|
+
this.embeddedRulePrefix = embeddedRulePrefix === undefined ? "" : embeddedRulePrefix;
|
9
11
|
|
10
12
|
this.semicolonComments = {
|
11
13
|
token : "comment.line.semicolon.csound",
|
@@ -92,6 +94,17 @@ var CsoundPreprocessorHighlightRules = function() {
|
|
92
94
|
next : "pop"
|
93
95
|
}
|
94
96
|
]
|
97
|
+
}, {
|
98
|
+
token : "keyword.preprocessor.csound",
|
99
|
+
regex : /#includestr/,
|
100
|
+
push : [
|
101
|
+
this.comments,
|
102
|
+
{
|
103
|
+
token : "string.csound",
|
104
|
+
regex : /([^ \t])(?:.*?\1)/,
|
105
|
+
next : "pop"
|
106
|
+
}
|
107
|
+
]
|
95
108
|
}, {
|
96
109
|
token : "keyword.preprocessor.csound",
|
97
110
|
regex : /#[ \t]*define/,
|
@@ -211,6 +224,12 @@ oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules);
|
|
211
224
|
(function() {
|
212
225
|
|
213
226
|
this.pushRule = function(params) {
|
227
|
+
if (Array.isArray(params.next)) {
|
228
|
+
for (var i = 0; i < params.next.length; i++) {
|
229
|
+
params.next[i] = this.embeddedRulePrefix + params.next[i];
|
230
|
+
}
|
231
|
+
}
|
232
|
+
|
214
233
|
return {
|
215
234
|
regex : params.regex, onMatch: function(value, currentState, stack, line) {
|
216
235
|
if (stack.length === 0)
|
@@ -225,34 +244,23 @@ oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules);
|
|
225
244
|
this.next = stack[stack.length - 1];
|
226
245
|
return params.token;
|
227
246
|
},
|
247
|
+
|
228
248
|
get next() { return Array.isArray(params.next) ? params.next[params.next.length - 1] : params.next; },
|
229
249
|
set next(next) {
|
230
|
-
if (Array.isArray(params.next)) {
|
231
|
-
var oldNext = params.next[params.next.length - 1];
|
232
|
-
var oldNextIndex = oldNext.length - 1;
|
233
|
-
var newNextIndex = next.length - 1;
|
234
|
-
if (newNextIndex > oldNextIndex) {
|
235
|
-
while (oldNextIndex >= 0 && newNextIndex >= 0) {
|
236
|
-
if (oldNext.charAt(oldNextIndex) !== next.charAt(newNextIndex)) {
|
237
|
-
var prefix = next.substr(0, newNextIndex);
|
238
|
-
for (var i = 0; i < params.next.length; i++) {
|
239
|
-
params.next[i] = prefix + params.next[i];
|
240
|
-
}
|
241
|
-
break;
|
242
|
-
}
|
243
|
-
oldNextIndex--;
|
244
|
-
newNextIndex--;
|
245
|
-
}
|
246
|
-
}
|
247
|
-
} else {
|
250
|
+
if (!Array.isArray(params.next)) {
|
248
251
|
params.next = next;
|
249
252
|
}
|
250
253
|
},
|
254
|
+
|
251
255
|
get token() { return params.token; }
|
252
256
|
};
|
253
257
|
};
|
254
258
|
|
255
259
|
this.popRule = function(params) {
|
260
|
+
if (params.next) {
|
261
|
+
params.next = this.embeddedRulePrefix + params.next;
|
262
|
+
}
|
263
|
+
|
256
264
|
return {
|
257
265
|
regex : params.regex, onMatch: function(value, currentState, stack, line) {
|
258
266
|
stack.pop();
|
@@ -279,9 +287,9 @@ var oop = require("../lib/oop");
|
|
279
287
|
|
280
288
|
var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules;
|
281
289
|
|
282
|
-
var CsoundScoreHighlightRules = function() {
|
290
|
+
var CsoundScoreHighlightRules = function(embeddedRulePrefix) {
|
283
291
|
|
284
|
-
CsoundPreprocessorHighlightRules.call(this);
|
292
|
+
CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix);
|
285
293
|
|
286
294
|
this.quotedStringContents.push({
|
287
295
|
token : "invalid.illegal.csound-score",
|
@@ -984,9 +992,9 @@ var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").Csound
|
|
984
992
|
var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
|
985
993
|
var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
|
986
994
|
|
987
|
-
var CsoundOrchestraHighlightRules = function() {
|
995
|
+
var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
988
996
|
|
989
|
-
CsoundPreprocessorHighlightRules.call(this);
|
997
|
+
CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix);
|
990
998
|
var opcodes = [
|
991
999
|
"ATSadd",
|
992
1000
|
"ATSaddnz",
|
@@ -2734,6 +2742,8 @@ var CsoundOrchestraHighlightRules = function() {
|
|
2734
2742
|
next : "macro parameter value braced string"
|
2735
2743
|
});
|
2736
2744
|
|
2745
|
+
var scoreHighlightRules = new CsoundScoreHighlightRules("csound-score-");
|
2746
|
+
|
2737
2747
|
this.addRules({
|
2738
2748
|
"macro parameter value braced string": [
|
2739
2749
|
{
|
@@ -2832,7 +2842,7 @@ var CsoundOrchestraHighlightRules = function() {
|
|
2832
2842
|
{
|
2833
2843
|
token : "punctuation.definition.string.begin.csound",
|
2834
2844
|
regex : /{{/,
|
2835
|
-
next : "
|
2845
|
+
next : scoreHighlightRules.embeddedRulePrefix + "start"
|
2836
2846
|
}, this.popRule({
|
2837
2847
|
token : "empty",
|
2838
2848
|
regex : /$/
|
@@ -2882,7 +2892,7 @@ var CsoundOrchestraHighlightRules = function() {
|
|
2882
2892
|
regex : /}}/
|
2883
2893
|
})
|
2884
2894
|
];
|
2885
|
-
this.embedRules(
|
2895
|
+
this.embedRules(scoreHighlightRules.getRules(), scoreHighlightRules.embeddedRulePrefix, rules);
|
2886
2896
|
this.embedRules(PythonHighlightRules, "python-", rules);
|
2887
2897
|
this.embedRules(LuaHighlightRules, "lua-", rules);
|
2888
2898
|
|
@@ -3910,6 +3920,9 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
3910
3920
|
|
3911
3921
|
var CsoundDocumentHighlightRules = function() {
|
3912
3922
|
|
3923
|
+
var orchestraHighlightRules = new CsoundOrchestraHighlightRules("csound-");
|
3924
|
+
var scoreHighlightRules = new CsoundScoreHighlightRules("csound-score-");
|
3925
|
+
|
3913
3926
|
this.$rules = {
|
3914
3927
|
"start": [
|
3915
3928
|
{
|
@@ -3928,11 +3941,11 @@ var CsoundDocumentHighlightRules = function() {
|
|
3928
3941
|
}, {
|
3929
3942
|
token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
|
3930
3943
|
regex : "(<)(CsInstruments)(>)",
|
3931
|
-
next : "
|
3944
|
+
next : orchestraHighlightRules.embeddedRulePrefix + "start"
|
3932
3945
|
}, {
|
3933
3946
|
token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
|
3934
3947
|
regex : "(<)(CsScore)(>)",
|
3935
|
-
next : "
|
3948
|
+
next : scoreHighlightRules.embeddedRulePrefix + "start"
|
3936
3949
|
}, {
|
3937
3950
|
token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
|
3938
3951
|
regex : "(<)([Hh][Tt][Mm][Ll])(>)",
|
@@ -3941,12 +3954,12 @@ var CsoundDocumentHighlightRules = function() {
|
|
3941
3954
|
]
|
3942
3955
|
};
|
3943
3956
|
|
3944
|
-
this.embedRules(
|
3957
|
+
this.embedRules(orchestraHighlightRules.getRules(), orchestraHighlightRules.embeddedRulePrefix, [{
|
3945
3958
|
token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
|
3946
3959
|
regex : "(</)(CsInstruments)(>)",
|
3947
3960
|
next : "synthesizer"
|
3948
3961
|
}]);
|
3949
|
-
this.embedRules(
|
3962
|
+
this.embedRules(scoreHighlightRules.getRules(), scoreHighlightRules.embeddedRulePrefix, [{
|
3950
3963
|
token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
|
3951
3964
|
regex : "(</)(CsScore)(>)",
|
3952
3965
|
next : "synthesizer"
|
@@ -5,7 +5,9 @@ var oop = require("../lib/oop");
|
|
5
5
|
|
6
6
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
7
7
|
|
8
|
-
var CsoundPreprocessorHighlightRules = function() {
|
8
|
+
var CsoundPreprocessorHighlightRules = function(embeddedRulePrefix) {
|
9
|
+
|
10
|
+
this.embeddedRulePrefix = embeddedRulePrefix === undefined ? "" : embeddedRulePrefix;
|
9
11
|
|
10
12
|
this.semicolonComments = {
|
11
13
|
token : "comment.line.semicolon.csound",
|
@@ -92,6 +94,17 @@ var CsoundPreprocessorHighlightRules = function() {
|
|
92
94
|
next : "pop"
|
93
95
|
}
|
94
96
|
]
|
97
|
+
}, {
|
98
|
+
token : "keyword.preprocessor.csound",
|
99
|
+
regex : /#includestr/,
|
100
|
+
push : [
|
101
|
+
this.comments,
|
102
|
+
{
|
103
|
+
token : "string.csound",
|
104
|
+
regex : /([^ \t])(?:.*?\1)/,
|
105
|
+
next : "pop"
|
106
|
+
}
|
107
|
+
]
|
95
108
|
}, {
|
96
109
|
token : "keyword.preprocessor.csound",
|
97
110
|
regex : /#[ \t]*define/,
|
@@ -211,6 +224,12 @@ oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules);
|
|
211
224
|
(function() {
|
212
225
|
|
213
226
|
this.pushRule = function(params) {
|
227
|
+
if (Array.isArray(params.next)) {
|
228
|
+
for (var i = 0; i < params.next.length; i++) {
|
229
|
+
params.next[i] = this.embeddedRulePrefix + params.next[i];
|
230
|
+
}
|
231
|
+
}
|
232
|
+
|
214
233
|
return {
|
215
234
|
regex : params.regex, onMatch: function(value, currentState, stack, line) {
|
216
235
|
if (stack.length === 0)
|
@@ -225,34 +244,23 @@ oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules);
|
|
225
244
|
this.next = stack[stack.length - 1];
|
226
245
|
return params.token;
|
227
246
|
},
|
247
|
+
|
228
248
|
get next() { return Array.isArray(params.next) ? params.next[params.next.length - 1] : params.next; },
|
229
249
|
set next(next) {
|
230
|
-
if (Array.isArray(params.next)) {
|
231
|
-
var oldNext = params.next[params.next.length - 1];
|
232
|
-
var oldNextIndex = oldNext.length - 1;
|
233
|
-
var newNextIndex = next.length - 1;
|
234
|
-
if (newNextIndex > oldNextIndex) {
|
235
|
-
while (oldNextIndex >= 0 && newNextIndex >= 0) {
|
236
|
-
if (oldNext.charAt(oldNextIndex) !== next.charAt(newNextIndex)) {
|
237
|
-
var prefix = next.substr(0, newNextIndex);
|
238
|
-
for (var i = 0; i < params.next.length; i++) {
|
239
|
-
params.next[i] = prefix + params.next[i];
|
240
|
-
}
|
241
|
-
break;
|
242
|
-
}
|
243
|
-
oldNextIndex--;
|
244
|
-
newNextIndex--;
|
245
|
-
}
|
246
|
-
}
|
247
|
-
} else {
|
250
|
+
if (!Array.isArray(params.next)) {
|
248
251
|
params.next = next;
|
249
252
|
}
|
250
253
|
},
|
254
|
+
|
251
255
|
get token() { return params.token; }
|
252
256
|
};
|
253
257
|
};
|
254
258
|
|
255
259
|
this.popRule = function(params) {
|
260
|
+
if (params.next) {
|
261
|
+
params.next = this.embeddedRulePrefix + params.next;
|
262
|
+
}
|
263
|
+
|
256
264
|
return {
|
257
265
|
regex : params.regex, onMatch: function(value, currentState, stack, line) {
|
258
266
|
stack.pop();
|
@@ -279,9 +287,9 @@ var oop = require("../lib/oop");
|
|
279
287
|
|
280
288
|
var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules;
|
281
289
|
|
282
|
-
var CsoundScoreHighlightRules = function() {
|
290
|
+
var CsoundScoreHighlightRules = function(embeddedRulePrefix) {
|
283
291
|
|
284
|
-
CsoundPreprocessorHighlightRules.call(this);
|
292
|
+
CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix);
|
285
293
|
|
286
294
|
this.quotedStringContents.push({
|
287
295
|
token : "invalid.illegal.csound-score",
|
@@ -984,9 +992,9 @@ var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").Csound
|
|
984
992
|
var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
|
985
993
|
var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
|
986
994
|
|
987
|
-
var CsoundOrchestraHighlightRules = function() {
|
995
|
+
var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
988
996
|
|
989
|
-
CsoundPreprocessorHighlightRules.call(this);
|
997
|
+
CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix);
|
990
998
|
var opcodes = [
|
991
999
|
"ATSadd",
|
992
1000
|
"ATSaddnz",
|
@@ -2734,6 +2742,8 @@ var CsoundOrchestraHighlightRules = function() {
|
|
2734
2742
|
next : "macro parameter value braced string"
|
2735
2743
|
});
|
2736
2744
|
|
2745
|
+
var scoreHighlightRules = new CsoundScoreHighlightRules("csound-score-");
|
2746
|
+
|
2737
2747
|
this.addRules({
|
2738
2748
|
"macro parameter value braced string": [
|
2739
2749
|
{
|
@@ -2832,7 +2842,7 @@ var CsoundOrchestraHighlightRules = function() {
|
|
2832
2842
|
{
|
2833
2843
|
token : "punctuation.definition.string.begin.csound",
|
2834
2844
|
regex : /{{/,
|
2835
|
-
next : "
|
2845
|
+
next : scoreHighlightRules.embeddedRulePrefix + "start"
|
2836
2846
|
}, this.popRule({
|
2837
2847
|
token : "empty",
|
2838
2848
|
regex : /$/
|
@@ -2882,7 +2892,7 @@ var CsoundOrchestraHighlightRules = function() {
|
|
2882
2892
|
regex : /}}/
|
2883
2893
|
})
|
2884
2894
|
];
|
2885
|
-
this.embedRules(
|
2895
|
+
this.embedRules(scoreHighlightRules.getRules(), scoreHighlightRules.embeddedRulePrefix, rules);
|
2886
2896
|
this.embedRules(PythonHighlightRules, "python-", rules);
|
2887
2897
|
this.embedRules(LuaHighlightRules, "lua-", rules);
|
2888
2898
|
|
@@ -5,7 +5,9 @@ var oop = require("../lib/oop");
|
|
5
5
|
|
6
6
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
7
7
|
|
8
|
-
var CsoundPreprocessorHighlightRules = function() {
|
8
|
+
var CsoundPreprocessorHighlightRules = function(embeddedRulePrefix) {
|
9
|
+
|
10
|
+
this.embeddedRulePrefix = embeddedRulePrefix === undefined ? "" : embeddedRulePrefix;
|
9
11
|
|
10
12
|
this.semicolonComments = {
|
11
13
|
token : "comment.line.semicolon.csound",
|
@@ -92,6 +94,17 @@ var CsoundPreprocessorHighlightRules = function() {
|
|
92
94
|
next : "pop"
|
93
95
|
}
|
94
96
|
]
|
97
|
+
}, {
|
98
|
+
token : "keyword.preprocessor.csound",
|
99
|
+
regex : /#includestr/,
|
100
|
+
push : [
|
101
|
+
this.comments,
|
102
|
+
{
|
103
|
+
token : "string.csound",
|
104
|
+
regex : /([^ \t])(?:.*?\1)/,
|
105
|
+
next : "pop"
|
106
|
+
}
|
107
|
+
]
|
95
108
|
}, {
|
96
109
|
token : "keyword.preprocessor.csound",
|
97
110
|
regex : /#[ \t]*define/,
|
@@ -211,6 +224,12 @@ oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules);
|
|
211
224
|
(function() {
|
212
225
|
|
213
226
|
this.pushRule = function(params) {
|
227
|
+
if (Array.isArray(params.next)) {
|
228
|
+
for (var i = 0; i < params.next.length; i++) {
|
229
|
+
params.next[i] = this.embeddedRulePrefix + params.next[i];
|
230
|
+
}
|
231
|
+
}
|
232
|
+
|
214
233
|
return {
|
215
234
|
regex : params.regex, onMatch: function(value, currentState, stack, line) {
|
216
235
|
if (stack.length === 0)
|
@@ -225,34 +244,23 @@ oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules);
|
|
225
244
|
this.next = stack[stack.length - 1];
|
226
245
|
return params.token;
|
227
246
|
},
|
247
|
+
|
228
248
|
get next() { return Array.isArray(params.next) ? params.next[params.next.length - 1] : params.next; },
|
229
249
|
set next(next) {
|
230
|
-
if (Array.isArray(params.next)) {
|
231
|
-
var oldNext = params.next[params.next.length - 1];
|
232
|
-
var oldNextIndex = oldNext.length - 1;
|
233
|
-
var newNextIndex = next.length - 1;
|
234
|
-
if (newNextIndex > oldNextIndex) {
|
235
|
-
while (oldNextIndex >= 0 && newNextIndex >= 0) {
|
236
|
-
if (oldNext.charAt(oldNextIndex) !== next.charAt(newNextIndex)) {
|
237
|
-
var prefix = next.substr(0, newNextIndex);
|
238
|
-
for (var i = 0; i < params.next.length; i++) {
|
239
|
-
params.next[i] = prefix + params.next[i];
|
240
|
-
}
|
241
|
-
break;
|
242
|
-
}
|
243
|
-
oldNextIndex--;
|
244
|
-
newNextIndex--;
|
245
|
-
}
|
246
|
-
}
|
247
|
-
} else {
|
250
|
+
if (!Array.isArray(params.next)) {
|
248
251
|
params.next = next;
|
249
252
|
}
|
250
253
|
},
|
254
|
+
|
251
255
|
get token() { return params.token; }
|
252
256
|
};
|
253
257
|
};
|
254
258
|
|
255
259
|
this.popRule = function(params) {
|
260
|
+
if (params.next) {
|
261
|
+
params.next = this.embeddedRulePrefix + params.next;
|
262
|
+
}
|
263
|
+
|
256
264
|
return {
|
257
265
|
regex : params.regex, onMatch: function(value, currentState, stack, line) {
|
258
266
|
stack.pop();
|
@@ -279,9 +287,9 @@ var oop = require("../lib/oop");
|
|
279
287
|
|
280
288
|
var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules;
|
281
289
|
|
282
|
-
var CsoundScoreHighlightRules = function() {
|
290
|
+
var CsoundScoreHighlightRules = function(embeddedRulePrefix) {
|
283
291
|
|
284
|
-
CsoundPreprocessorHighlightRules.call(this);
|
292
|
+
CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix);
|
285
293
|
|
286
294
|
this.quotedStringContents.push({
|
287
295
|
token : "invalid.illegal.csound-score",
|
@@ -108,11 +108,11 @@ var FSharpHighlightRules = function () {
|
|
108
108
|
regex: "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|=|\\(\\*\\)"
|
109
109
|
},
|
110
110
|
{
|
111
|
-
token: "paren.
|
111
|
+
token: "paren.lparen",
|
112
112
|
regex: "[[({]"
|
113
113
|
},
|
114
114
|
{
|
115
|
-
token: "paren.
|
115
|
+
token: "paren.rparen",
|
116
116
|
regex: "[\\])}]"
|
117
117
|
}
|
118
118
|
],
|
@@ -789,106 +789,264 @@ oop.inherits(Mode, TextMode);
|
|
789
789
|
exports.Mode = Mode;
|
790
790
|
});
|
791
791
|
|
792
|
-
define("ace/mode/gobstones_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/
|
792
|
+
define("ace/mode/gobstones_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports) {
|
793
793
|
"use strict";
|
794
794
|
|
795
795
|
var oop = require("../lib/oop");
|
796
|
-
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
797
796
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
798
797
|
|
799
798
|
var GobstonesHighlightRules = function() {
|
800
799
|
|
801
|
-
|
802
|
-
"program|procedure|function|interactive|
|
803
|
-
|
804
|
-
|
805
|
-
var buildinConstants = (
|
806
|
-
"False|True"
|
807
|
-
);
|
808
|
-
|
809
|
-
|
810
|
-
var langClasses = (
|
811
|
-
"Poner|Sacar|Mover|IrAlBorde|VaciarTablero|" +
|
812
|
-
"nroBolitas|hayBolitas|puedeMover|siguiente|previo|opuesto|minBool|maxBool|" +
|
813
|
-
"minDir|maxDir|minColor|maxColor"
|
814
|
-
);
|
800
|
+
var definitions = {
|
801
|
+
standard: "program|procedure|function|interactive|return|let",
|
802
|
+
type: "type|is|variant|record|field|case"
|
803
|
+
};
|
815
804
|
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
805
|
+
var control = {
|
806
|
+
commands: {
|
807
|
+
repetitions: "repeat|while|foreach|in",
|
808
|
+
alternatives: "if|elseif|else|switch"
|
809
|
+
},
|
810
|
+
expressions: {
|
811
|
+
alternatives: "choose|when|otherwise|matching|select|on"
|
812
|
+
}
|
813
|
+
};
|
814
|
+
|
815
|
+
var values = {
|
816
|
+
colors: "Verde|Rojo|Azul|Negro",
|
817
|
+
cardinals: "Norte|Sur|Este|Oeste",
|
818
|
+
booleans: "True|False",
|
819
|
+
numbers: /([-]?)([0-9]+)\b/,
|
820
|
+
strings: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
821
|
+
};
|
822
|
+
|
823
|
+
var primitives = {
|
824
|
+
commands: "Poner|Sacar|Mover|IrAlBorde|VaciarTablero|BOOM",
|
825
|
+
expressions: "nroBolitas|hayBolitas|puedeMover|"+
|
826
|
+
"siguiente|previo|opuesto|"+
|
827
|
+
"minBool|maxBool|minDir|maxDir|minColor|maxColor|"+
|
828
|
+
"primero|sinElPrimero|esVacía|"+
|
829
|
+
"boom",
|
830
|
+
keys: "K_A|K_B|K_C|K_D|K_E|K_F|K_G|K_G|K_H|K_I|K_J|K_K|K_L|K_M|K_N|K_Ñ|"+
|
831
|
+
"K_O|K_P|K_Q|K_R|K_S|K_T|K_U|K_V|K_W|K_X|K_Y|K_Z|"+
|
832
|
+
"K_0|K_1|K_2|K_3|K_4|K_5|K_6|K_7|K_8|K_9|"+
|
833
|
+
"K_F1|K_F2|K_F3|K_F4|K_F5|K_F6|K_F7|K_F8|K_F9|K_F10|K_F11|K_12|"+
|
834
|
+
"K_UP|K_DOWN|K_LEFT|K_RIGHT|K_RETURN|K_BACKSPACE|K_TAB|K_SPACE|K_ESCAPE"+
|
835
|
+
|
836
|
+
"K_CTRL_A|K_CTRL_B|K_CTRL_C|K_CTRL_D|K_CTRL_E|K_CTRL_F|K_CT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IFT_F7|K_CTRL_ALT_SHIFT_F8|"+
|
922
|
+
"K_CTRL_ALT_SHIFT_F9|K_CTRL_ALT_SHIFT_F10|K_CTRL_ALT_SHIFT_F11|K_CTRL_ALT_SHIFT_F12|"+
|
923
|
+
"K_CTRL_ALT_SHIFT_UP|K_CTRL_ALT_SHIFT_DOWN|K_CTRL_ALT_SHIFT_LEFT|K_CTRL_ALT_SHIFT_RIGHT|"+
|
924
|
+
"K_CTRL_ALT_SHIFT_RETURN|K_CTRL_ALT_SHIFT_BACKSPACE|K_CTRL_ALT_SHIFT_TAB|"+
|
925
|
+
"K_CTRL_ALT_SHIFT_SPACE|K_CTRL_ALT_SHIFT_ESCAPE"
|
926
|
+
};
|
927
|
+
|
928
|
+
var operations = {
|
929
|
+
commands: ":=",
|
930
|
+
expressions: {
|
931
|
+
numeric: "\\+|\\-|\\*|\\^|div|mod",
|
932
|
+
comparison: ">=|<=|==|\\/=|>|<",
|
933
|
+
boolean: "\\|\\||&&|not",
|
934
|
+
other: "\\+\\+|<\\-|\\[|\\]|\\_|\\->"
|
935
|
+
}
|
936
|
+
};
|
889
937
|
|
890
|
-
|
891
|
-
|
938
|
+
var comments = {
|
939
|
+
line: {
|
940
|
+
double_slash: "\\/\\/.*$",
|
941
|
+
double_dash: "\\-\\-.*$",
|
942
|
+
number_sign: "#.*$"
|
943
|
+
},
|
944
|
+
block: { start: "\\/\\*", end: "\\*\\/" },
|
945
|
+
block_alt: { start: "\\{\\-", end: "\\-\\}" }
|
946
|
+
};
|
947
|
+
|
948
|
+
this.$rules = {
|
949
|
+
"start" : [
|
950
|
+
{
|
951
|
+
token : "comment.line.double-slash.gobstones",
|
952
|
+
regex : comments.line.double_slash
|
953
|
+
},
|
954
|
+
{
|
955
|
+
token : "comment.line.double-dash.gobstones",
|
956
|
+
regex : comments.line.double_dash
|
957
|
+
},
|
958
|
+
{
|
959
|
+
token : "comment.line.number-sign.gobstones",
|
960
|
+
regex : comments.line.number_sign
|
961
|
+
},
|
962
|
+
{
|
963
|
+
token : "comment.block.dash-asterisc.gobstones",
|
964
|
+
regex : comments.block.start,
|
965
|
+
next : "block_comment_end"
|
966
|
+
},
|
967
|
+
{
|
968
|
+
token : "comment.block.brace-dash.gobstones",
|
969
|
+
regex : comments.block_alt.start,
|
970
|
+
next : "block_comment_alt_end"
|
971
|
+
},
|
972
|
+
{
|
973
|
+
token : "constant.numeric.gobstones",
|
974
|
+
regex : values.numbers
|
975
|
+
},
|
976
|
+
{
|
977
|
+
token : "string.quoted.double.gobstones",
|
978
|
+
regex : values.strings
|
979
|
+
},
|
980
|
+
{
|
981
|
+
token : "keyword.operator.other.gobstones",
|
982
|
+
regex : operations.expressions.other
|
983
|
+
},
|
984
|
+
{
|
985
|
+
token : "keyword.operator.numeric.gobstones",
|
986
|
+
regex : operations.expressions.numeric
|
987
|
+
},
|
988
|
+
{
|
989
|
+
token : "keyword.operator.compare.gobstones",
|
990
|
+
regex : operations.expressions.comparison
|
991
|
+
},
|
992
|
+
{
|
993
|
+
token : "keyword.operator.boolean.gobstones",
|
994
|
+
regex : operations.expressions.boolean
|
995
|
+
},
|
996
|
+
{
|
997
|
+
token : this.createKeywordMapper({
|
998
|
+
"storage.type.definitions.gobstones": definitions.standard,
|
999
|
+
"storage.type.types.gobstones": definitions.type,
|
1000
|
+
"keyword.control.commands.repetitions.gobstones": control.commands.repetitions,
|
1001
|
+
"keyword.control.commands.alternatives.gobstones": control.commands.alternatives,
|
1002
|
+
"keyword.control.expressions.alternatives.gobstones": control.expressions.alternatives,
|
1003
|
+
"constant.language.colors.gobstones":values.colors,
|
1004
|
+
"constant.language.cardinals.gobstones": values.cardinals,
|
1005
|
+
"constant.language.boolean.gobstones": values.booleans,
|
1006
|
+
"support.function.gobstones": primitives.commands,
|
1007
|
+
"support.variable.gobstones": primitives.expressions,
|
1008
|
+
"variable.language.gobstones": primitives.keys
|
1009
|
+
}, "identifier.gobstones"),
|
1010
|
+
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
1011
|
+
},
|
1012
|
+
{
|
1013
|
+
token : "comma.gobstones",
|
1014
|
+
regex : ","
|
1015
|
+
},
|
1016
|
+
{
|
1017
|
+
token : "semicolon.gobstones",
|
1018
|
+
regex : ";"
|
1019
|
+
},
|
1020
|
+
{
|
1021
|
+
token : "lparen",
|
1022
|
+
regex : "[[({]"
|
1023
|
+
},
|
1024
|
+
{
|
1025
|
+
token : "rparen",
|
1026
|
+
regex : "[\\])}]"
|
1027
|
+
},
|
1028
|
+
{
|
1029
|
+
token : "text",
|
1030
|
+
regex : "\\s+"
|
1031
|
+
}
|
1032
|
+
],
|
1033
|
+
"block_comment_end": [{
|
1034
|
+
token : "comment.block.dash-asterisc.gobstones",
|
1035
|
+
regex : comments.block.end,
|
1036
|
+
next : "start"
|
1037
|
+
}, {
|
1038
|
+
defaultToken : "comment.block.dash-asterisc.gobstones"
|
1039
|
+
}
|
1040
|
+
],
|
1041
|
+
"block_comment_alt_end": [{
|
1042
|
+
token : "comment.block.brace-dash.gobstones",
|
1043
|
+
regex : comments.block_alt.end,
|
1044
|
+
next : "start"
|
1045
|
+
}, {
|
1046
|
+
defaultToken : "comment.block.brace-dash.gobstones"
|
1047
|
+
}
|
1048
|
+
]
|
1049
|
+
};
|
892
1050
|
};
|
893
1051
|
|
894
1052
|
oop.inherits(GobstonesHighlightRules, TextHighlightRules);
|
@@ -896,7 +1054,7 @@ oop.inherits(GobstonesHighlightRules, TextHighlightRules);
|
|
896
1054
|
exports.GobstonesHighlightRules = GobstonesHighlightRules;
|
897
1055
|
});
|
898
1056
|
|
899
|
-
define("ace/mode/gobstones",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/gobstones_highlight_rules"], function(require, exports
|
1057
|
+
define("ace/mode/gobstones",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/gobstones_highlight_rules"], function(require, exports) {
|
900
1058
|
"use strict";
|
901
1059
|
|
902
1060
|
var oop = require("../lib/oop");
|
@@ -911,8 +1069,8 @@ var Mode = function() {
|
|
911
1069
|
oop.inherits(Mode, JavaScriptMode);
|
912
1070
|
|
913
1071
|
(function() {
|
914
|
-
|
915
|
-
this.createWorker = function(
|
1072
|
+
|
1073
|
+
this.createWorker = function() {
|
916
1074
|
return null;
|
917
1075
|
};
|
918
1076
|
|