ace-rails-ap 4.2 → 4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ace/rails/version.rb +1 -1
  3. data/update.sh +1 -1
  4. data/vendor/assets/javascripts/ace/ace.js +661 -160
  5. data/vendor/assets/javascripts/ace/ext-beautify.js +1 -0
  6. data/vendor/assets/javascripts/ace/ext-emmet.js +314 -218
  7. data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +37 -32
  8. data/vendor/assets/javascripts/ace/ext-language_tools.js +362 -225
  9. data/vendor/assets/javascripts/ace/ext-linking.js +1 -1
  10. data/vendor/assets/javascripts/ace/ext-modelist.js +6 -2
  11. data/vendor/assets/javascripts/ace/ext-options.js +45 -34
  12. data/vendor/assets/javascripts/ace/ext-prompt.js +2764 -0
  13. data/vendor/assets/javascripts/ace/ext-rtl.js +1 -3
  14. data/vendor/assets/javascripts/ace/ext-settings_menu.js +49 -38
  15. data/vendor/assets/javascripts/ace/ext-statusbar.js +2 -2
  16. data/vendor/assets/javascripts/ace/ext-whitespace.js +4 -0
  17. data/vendor/assets/javascripts/ace/keybinding-emacs.js +1 -0
  18. data/vendor/assets/javascripts/ace/keybinding-vim.js +296 -66
  19. data/vendor/assets/javascripts/ace/mode-aql.js +102 -0
  20. data/vendor/assets/javascripts/ace/mode-autohotkey.js +3 -1
  21. data/vendor/assets/javascripts/ace/mode-cirru.js +2 -2
  22. data/vendor/assets/javascripts/ace/mode-crystal.js +642 -0
  23. data/vendor/assets/javascripts/ace/mode-csound_document.js +42 -29
  24. data/vendor/assets/javascripts/ace/mode-csound_orchestra.js +35 -25
  25. data/vendor/assets/javascripts/ace/mode-csound_score.js +29 -21
  26. data/vendor/assets/javascripts/ace/mode-fsharp.js +2 -2
  27. data/vendor/assets/javascripts/ace/mode-gherkin.js +0 -2
  28. data/vendor/assets/javascripts/ace/mode-gobstones.js +252 -94
  29. data/vendor/assets/javascripts/ace/mode-io.js +1 -7
  30. data/vendor/assets/javascripts/ace/mode-jade.js +1 -1
  31. data/vendor/assets/javascripts/ace/mode-lua.js +30 -10
  32. data/vendor/assets/javascripts/ace/mode-luapage.js +30 -10
  33. data/vendor/assets/javascripts/ace/mode-lucene.js +77 -9
  34. data/vendor/assets/javascripts/ace/mode-markdown.js +2 -1
  35. data/vendor/assets/javascripts/ace/mode-mask.js +1 -1
  36. data/vendor/assets/javascripts/ace/mode-nginx.js +298 -0
  37. data/vendor/assets/javascripts/ace/mode-nim.js +363 -0
  38. data/vendor/assets/javascripts/ace/mode-pascal.js +84 -66
  39. data/vendor/assets/javascripts/ace/mode-php.js +1 -1
  40. data/vendor/assets/javascripts/ace/mode-php_laravel_blade.js +1 -1
  41. data/vendor/assets/javascripts/ace/mode-puppet.js +3 -3
  42. data/vendor/assets/javascripts/ace/mode-slim.js +2 -1
  43. data/vendor/assets/javascripts/ace/mode-tcl.js +3 -0
  44. data/vendor/assets/javascripts/ace/mode-terraform.js +4 -4
  45. data/vendor/assets/javascripts/ace/mode-yaml.js +44 -13
  46. data/vendor/assets/javascripts/ace/mode-zeek.js +539 -0
  47. data/vendor/assets/javascripts/ace/snippets/abap.js +8 -1
  48. data/vendor/assets/javascripts/ace/snippets/abc.js +8 -1
  49. data/vendor/assets/javascripts/ace/snippets/actionscript.js +8 -1
  50. data/vendor/assets/javascripts/ace/snippets/ada.js +8 -1
  51. data/vendor/assets/javascripts/ace/snippets/apache_conf.js +8 -1
  52. data/vendor/assets/javascripts/ace/snippets/apex.js +14 -0
  53. data/vendor/assets/javascripts/ace/snippets/applescript.js +8 -1
  54. data/vendor/assets/javascripts/ace/snippets/aql.js +14 -0
  55. data/vendor/assets/javascripts/ace/snippets/asciidoc.js +8 -1
  56. data/vendor/assets/javascripts/ace/snippets/asl.js +13 -0
  57. data/vendor/assets/javascripts/ace/snippets/assembly_x86.js +8 -1
  58. data/vendor/assets/javascripts/ace/snippets/autohotkey.js +8 -1
  59. data/vendor/assets/javascripts/ace/snippets/batchfile.js +8 -1
  60. data/vendor/assets/javascripts/ace/snippets/bro.js +8 -1
  61. data/vendor/assets/javascripts/ace/snippets/c9search.js +8 -1
  62. data/vendor/assets/javascripts/ace/snippets/c_cpp.js +8 -1
  63. data/vendor/assets/javascripts/ace/snippets/cirru.js +8 -1
  64. data/vendor/assets/javascripts/ace/snippets/clojure.js +8 -1
  65. data/vendor/assets/javascripts/ace/snippets/cobol.js +8 -1
  66. data/vendor/assets/javascripts/ace/snippets/coffee.js +8 -1
  67. data/vendor/assets/javascripts/ace/snippets/coldfusion.js +8 -1
  68. data/vendor/assets/javascripts/ace/snippets/crystal.js +14 -0
  69. data/vendor/assets/javascripts/ace/snippets/csharp.js +8 -1
  70. data/vendor/assets/javascripts/ace/snippets/csound_document.js +24 -0
  71. data/vendor/assets/javascripts/ace/snippets/csound_orchestra.js +61 -0
  72. data/vendor/assets/javascripts/ace/snippets/csound_score.js +14 -0
  73. data/vendor/assets/javascripts/ace/snippets/csp.js +14 -0
  74. data/vendor/assets/javascripts/ace/snippets/css.js +8 -1
  75. data/vendor/assets/javascripts/ace/snippets/curly.js +8 -1
  76. data/vendor/assets/javascripts/ace/snippets/d.js +8 -1
  77. data/vendor/assets/javascripts/ace/snippets/dart.js +8 -1
  78. data/vendor/assets/javascripts/ace/snippets/diff.js +8 -1
  79. data/vendor/assets/javascripts/ace/snippets/django.js +8 -1
  80. data/vendor/assets/javascripts/ace/snippets/dockerfile.js +8 -1
  81. data/vendor/assets/javascripts/ace/snippets/dot.js +8 -1
  82. data/vendor/assets/javascripts/ace/snippets/drools.js +8 -1
  83. data/vendor/assets/javascripts/ace/snippets/edifact.js +254 -0
  84. data/vendor/assets/javascripts/ace/snippets/eiffel.js +8 -1
  85. data/vendor/assets/javascripts/ace/snippets/ejs.js +8 -1
  86. data/vendor/assets/javascripts/ace/snippets/elixir.js +8 -1
  87. data/vendor/assets/javascripts/ace/snippets/elm.js +8 -1
  88. data/vendor/assets/javascripts/ace/snippets/erlang.js +8 -1
  89. data/vendor/assets/javascripts/ace/snippets/forth.js +8 -1
  90. data/vendor/assets/javascripts/ace/snippets/fortran.js +8 -1
  91. data/vendor/assets/javascripts/ace/snippets/fsharp.js +14 -0
  92. data/vendor/assets/javascripts/ace/snippets/fsl.js +14 -0
  93. data/vendor/assets/javascripts/ace/snippets/ftl.js +8 -1
  94. data/vendor/assets/javascripts/ace/snippets/gcode.js +8 -1
  95. data/vendor/assets/javascripts/ace/snippets/gherkin.js +8 -1
  96. data/vendor/assets/javascripts/ace/snippets/gitignore.js +8 -1
  97. data/vendor/assets/javascripts/ace/snippets/glsl.js +8 -1
  98. data/vendor/assets/javascripts/ace/snippets/gobstones.js +1701 -24
  99. data/vendor/assets/javascripts/ace/snippets/golang.js +8 -1
  100. data/vendor/assets/javascripts/ace/snippets/graphqlschema.js +8 -1
  101. data/vendor/assets/javascripts/ace/snippets/groovy.js +8 -1
  102. data/vendor/assets/javascripts/ace/snippets/haml.js +8 -1
  103. data/vendor/assets/javascripts/ace/snippets/handlebars.js +8 -1
  104. data/vendor/assets/javascripts/ace/snippets/haskell.js +8 -1
  105. data/vendor/assets/javascripts/ace/snippets/haskell_cabal.js +8 -1
  106. data/vendor/assets/javascripts/ace/snippets/haxe.js +8 -1
  107. data/vendor/assets/javascripts/ace/snippets/hjson.js +8 -1
  108. data/vendor/assets/javascripts/ace/snippets/html.js +36 -2
  109. data/vendor/assets/javascripts/ace/snippets/html_elixir.js +8 -1
  110. data/vendor/assets/javascripts/ace/snippets/html_ruby.js +8 -1
  111. data/vendor/assets/javascripts/ace/snippets/ini.js +8 -1
  112. data/vendor/assets/javascripts/ace/snippets/io.js +8 -1
  113. data/vendor/assets/javascripts/ace/snippets/jack.js +8 -1
  114. data/vendor/assets/javascripts/ace/snippets/jade.js +8 -1
  115. data/vendor/assets/javascripts/ace/snippets/java.js +8 -1
  116. data/vendor/assets/javascripts/ace/snippets/javascript.js +8 -1
  117. data/vendor/assets/javascripts/ace/snippets/json.js +8 -1
  118. data/vendor/assets/javascripts/ace/snippets/jsoniq.js +8 -1
  119. data/vendor/assets/javascripts/ace/snippets/jsp.js +8 -1
  120. data/vendor/assets/javascripts/ace/snippets/jssm.js +14 -0
  121. data/vendor/assets/javascripts/ace/snippets/jsx.js +8 -1
  122. data/vendor/assets/javascripts/ace/snippets/julia.js +8 -1
  123. data/vendor/assets/javascripts/ace/snippets/kotlin.js +8 -1
  124. data/vendor/assets/javascripts/ace/snippets/latex.js +8 -1
  125. data/vendor/assets/javascripts/ace/snippets/less.js +8 -1
  126. data/vendor/assets/javascripts/ace/snippets/liquid.js +890 -2
  127. data/vendor/assets/javascripts/ace/snippets/lisp.js +8 -1
  128. data/vendor/assets/javascripts/ace/snippets/livescript.js +8 -1
  129. data/vendor/assets/javascripts/ace/snippets/logiql.js +8 -1
  130. data/vendor/assets/javascripts/ace/snippets/logtalk.js +14 -0
  131. data/vendor/assets/javascripts/ace/snippets/lsl.js +8 -1
  132. data/vendor/assets/javascripts/ace/snippets/lua.js +8 -1
  133. data/vendor/assets/javascripts/ace/snippets/luapage.js +8 -1
  134. data/vendor/assets/javascripts/ace/snippets/lucene.js +8 -1
  135. data/vendor/assets/javascripts/ace/snippets/makefile.js +8 -1
  136. data/vendor/assets/javascripts/ace/snippets/markdown.js +8 -1
  137. data/vendor/assets/javascripts/ace/snippets/mask.js +8 -1
  138. data/vendor/assets/javascripts/ace/snippets/matlab.js +8 -1
  139. data/vendor/assets/javascripts/ace/snippets/maze.js +8 -1
  140. data/vendor/assets/javascripts/ace/snippets/mel.js +8 -1
  141. data/vendor/assets/javascripts/ace/snippets/mixal.js +14 -0
  142. data/vendor/assets/javascripts/ace/snippets/mushcode.js +8 -1
  143. data/vendor/assets/javascripts/ace/snippets/mysql.js +8 -1
  144. data/vendor/assets/javascripts/ace/snippets/nginx.js +14 -0
  145. data/vendor/assets/javascripts/ace/snippets/nim.js +14 -0
  146. data/vendor/assets/javascripts/ace/snippets/nix.js +8 -1
  147. data/vendor/assets/javascripts/ace/snippets/nsis.js +8 -1
  148. data/vendor/assets/javascripts/ace/snippets/objectivec.js +8 -1
  149. data/vendor/assets/javascripts/ace/snippets/ocaml.js +8 -1
  150. data/vendor/assets/javascripts/ace/snippets/pascal.js +8 -1
  151. data/vendor/assets/javascripts/ace/snippets/perl.js +8 -1
  152. data/vendor/assets/javascripts/ace/snippets/perl6.js +14 -0
  153. data/vendor/assets/javascripts/ace/snippets/pgsql.js +8 -1
  154. data/vendor/assets/javascripts/ace/snippets/php.js +49 -36
  155. data/vendor/assets/javascripts/ace/snippets/php_laravel_blade.js +14 -0
  156. data/vendor/assets/javascripts/ace/snippets/pig.js +8 -1
  157. data/vendor/assets/javascripts/ace/snippets/plain_text.js +8 -1
  158. data/vendor/assets/javascripts/ace/snippets/powershell.js +8 -1
  159. data/vendor/assets/javascripts/ace/snippets/praat.js +8 -1
  160. data/vendor/assets/javascripts/ace/snippets/prolog.js +8 -1
  161. data/vendor/assets/javascripts/ace/snippets/properties.js +8 -1
  162. data/vendor/assets/javascripts/ace/snippets/protobuf.js +8 -1
  163. data/vendor/assets/javascripts/ace/snippets/puppet.js +14 -0
  164. data/vendor/assets/javascripts/ace/snippets/python.js +8 -1
  165. data/vendor/assets/javascripts/ace/snippets/r.js +8 -1
  166. data/vendor/assets/javascripts/ace/snippets/razor.js +8 -1
  167. data/vendor/assets/javascripts/ace/snippets/rdoc.js +8 -1
  168. data/vendor/assets/javascripts/ace/snippets/red.js +14 -0
  169. data/vendor/assets/javascripts/ace/snippets/redshift.js +14 -0
  170. data/vendor/assets/javascripts/ace/snippets/rhtml.js +8 -1
  171. data/vendor/assets/javascripts/ace/snippets/rst.js +8 -1
  172. data/vendor/assets/javascripts/ace/snippets/ruby.js +8 -1
  173. data/vendor/assets/javascripts/ace/snippets/rust.js +8 -1
  174. data/vendor/assets/javascripts/ace/snippets/sass.js +8 -1
  175. data/vendor/assets/javascripts/ace/snippets/scad.js +8 -1
  176. data/vendor/assets/javascripts/ace/snippets/scala.js +8 -1
  177. data/vendor/assets/javascripts/ace/snippets/scheme.js +8 -1
  178. data/vendor/assets/javascripts/ace/snippets/scss.js +8 -1
  179. data/vendor/assets/javascripts/ace/snippets/sh.js +8 -1
  180. data/vendor/assets/javascripts/ace/snippets/sjs.js +8 -1
  181. data/vendor/assets/javascripts/ace/snippets/slim.js +14 -0
  182. data/vendor/assets/javascripts/ace/snippets/smarty.js +8 -1
  183. data/vendor/assets/javascripts/ace/snippets/snippets.js +8 -1
  184. data/vendor/assets/javascripts/ace/snippets/soy_template.js +8 -1
  185. data/vendor/assets/javascripts/ace/snippets/space.js +8 -1
  186. data/vendor/assets/javascripts/ace/snippets/sparql.js +8 -1
  187. data/vendor/assets/javascripts/ace/snippets/sql.js +8 -1
  188. data/vendor/assets/javascripts/ace/snippets/sqlserver.js +8 -1
  189. data/vendor/assets/javascripts/ace/snippets/stylus.js +8 -1
  190. data/vendor/assets/javascripts/ace/snippets/svg.js +8 -1
  191. data/vendor/assets/javascripts/ace/snippets/swift.js +8 -1
  192. data/vendor/assets/javascripts/ace/snippets/tcl.js +8 -1
  193. data/vendor/assets/javascripts/ace/snippets/terraform.js +14 -0
  194. data/vendor/assets/javascripts/ace/snippets/tex.js +8 -1
  195. data/vendor/assets/javascripts/ace/snippets/text.js +8 -1
  196. data/vendor/assets/javascripts/ace/snippets/textile.js +8 -1
  197. data/vendor/assets/javascripts/ace/snippets/toml.js +8 -1
  198. data/vendor/assets/javascripts/ace/snippets/tsx.js +8 -1
  199. data/vendor/assets/javascripts/ace/snippets/turtle.js +8 -1
  200. data/vendor/assets/javascripts/ace/snippets/twig.js +8 -1
  201. data/vendor/assets/javascripts/ace/snippets/typescript.js +8 -1
  202. data/vendor/assets/javascripts/ace/snippets/vala.js +8 -1
  203. data/vendor/assets/javascripts/ace/snippets/vbscript.js +8 -1
  204. data/vendor/assets/javascripts/ace/snippets/velocity.js +8 -1
  205. data/vendor/assets/javascripts/ace/snippets/verilog.js +8 -1
  206. data/vendor/assets/javascripts/ace/snippets/vhdl.js +8 -1
  207. data/vendor/assets/javascripts/ace/snippets/visualforce.js +14 -0
  208. data/vendor/assets/javascripts/ace/snippets/wollok.js +8 -1
  209. data/vendor/assets/javascripts/ace/snippets/xml.js +8 -1
  210. data/vendor/assets/javascripts/ace/snippets/xquery.js +8 -1
  211. data/vendor/assets/javascripts/ace/snippets/yaml.js +8 -1
  212. data/vendor/assets/javascripts/ace/snippets/zeek.js +14 -0
  213. data/vendor/assets/javascripts/ace/worker-coffee.js +2 -2
  214. data/vendor/assets/javascripts/ace/worker-css.js +9 -3
  215. data/vendor/assets/javascripts/ace/worker-html.js +2 -2
  216. data/vendor/assets/javascripts/ace/worker-javascript.js +2 -2
  217. data/vendor/assets/javascripts/ace/worker-json.js +2 -2
  218. data/vendor/assets/javascripts/ace/worker-lua.js +2 -2
  219. data/vendor/assets/javascripts/ace/worker-php.js +4 -4
  220. data/vendor/assets/javascripts/ace/worker-xml.js +2 -2
  221. data/vendor/assets/javascripts/ace/worker-xquery.js +2 -2
  222. metadata +34 -16
  223. data/vendor/assets/javascripts/ace/ext-chromevox.js +0 -540
  224. data/vendor/assets/javascripts/ace/ext-old_ie.js +0 -502
  225. data/vendor/assets/javascripts/ace/mode-bash.js +0 -247
  226. data/vendor/assets/javascripts/ace/mode-lean.js +0 -281
  227. data/vendor/assets/javascripts/ace/mode-live_script.js +0 -481
  228. data/vendor/assets/javascripts/ace/mode-mips_assembler.js +0 -235
  229. data/vendor/assets/javascripts/ace/mode-mipsassembler.js +0 -196
  230. data/vendor/assets/javascripts/ace/mode-swig.js +0 -1099
  231. data/vendor/assets/javascripts/ace/snippets/lean.js +0 -7
  232. data/vendor/assets/javascripts/ace/snippets/live_script.js +0 -7
  233. data/vendor/assets/javascripts/ace/snippets/mips_assembler.js +0 -7
  234. data/vendor/assets/javascripts/ace/snippets/mipsassembler.js +0 -7
  235. 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 : "csound-score-start"
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(CsoundScoreHighlightRules, "csound-score-", rules);
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 : "csound-start"
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 : "csound-score-start"
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(CsoundOrchestraHighlightRules, "csound-", [{
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(CsoundScoreHighlightRules, "csound-score-", [{
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 : "csound-score-start"
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(CsoundScoreHighlightRules, "csound-score-", rules);
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.lpar",
111
+ token: "paren.lparen",
112
112
  regex: "[[({]"
113
113
  },
114
114
  {
115
- token: "paren.rpar",
115
+ token: "paren.rparen",
116
116
  regex: "[\\])}]"
117
117
  }
118
118
  ],
@@ -133,8 +133,6 @@ oop.inherits(Mode, TextMode);
133
133
  var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
134
134
  var tokens = tokenizedLine.tokens;
135
135
 
136
- console.log(state);
137
-
138
136
  if(line.match("[ ]*\\|")) {
139
137
  indent += "| ";
140
138
  }
@@ -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/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
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
- var keywords = (
802
- "program|procedure|function|interactive|if|then|else|switch|repeat|while|foreach|in|not|div|mod|Skip|return"
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
- var supportType = (
817
- "Verde|Rojo|Azul|Negro|Norte|Sur|Este|Oeste"
818
- );
819
-
820
- var keywordMapper = this.createKeywordMapper({
821
- "keyword": keywords,
822
- "constant.language": buildinConstants,
823
- "support.function": langClasses,
824
- "support.type": supportType
825
- }, "identifier");
826
-
827
- this.$rules = {
828
- "start" : [
829
- {
830
- token : "comment",
831
- regex : "\\/\\/.*$"
832
- },
833
- {
834
- token : "comment",
835
- regex : "\\-\\-.*$"
836
- },
837
- {
838
- token : "comment",
839
- regex : "#.*$"
840
- },
841
- DocCommentHighlightRules.getStartRule("doc-start"),
842
- {
843
- token : "comment", // multi line comment
844
- regex : "\\/\\*",
845
- next : "comment"
846
- }, {
847
-
848
- token : "string", // single line
849
- regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
850
- }, {
851
- token : "string", // single line
852
- regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
853
- }, {
854
- token : "constant.numeric", // hex
855
- regex : /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
856
- }, {
857
- token : "constant.numeric", // float
858
- regex : /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/
859
- }, {
860
- token : "constant.language.boolean",
861
- regex : "(?:True|False)\\b"
862
- }, {
863
- token : "keyword.operator",
864
- regex : ":=|\\.\\.|,|;|\\|\\||\\/\\/|\\+|\\-|\\^|\\*|>|<|>=|=>|==|&&"
865
- }, {
866
- token : keywordMapper,
867
- regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
868
- }, {
869
- token : "lparen",
870
- regex : "[[({]"
871
- }, {
872
- token : "rparen",
873
- regex : "[\\])}]"
874
- }, {
875
- token : "text",
876
- regex : "\\s+"
877
- }
878
- ],
879
- "comment" : [
880
- {
881
- token : "comment", // closing comment
882
- regex : "\\*\\/",
883
- next : "start"
884
- }, {
885
- defaultToken : "comment"
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_CTRL_G|K_CTRL_G|"+
837
+ "K_CTRL_H|K_CTRL_I|K_CTRL_J|K_CTRL_K|K_CTRL_L|K_CTRL_M|K_CTRL_N|K_CTRL_Ñ|"+
838
+ "K_CTRL_O|K_CTRL_P|K_CTRL_Q|K_CTRL_R|K_CTRL_S|K_CTRL_T|K_CTRL_U|K_CTRL_V|"+
839
+ "K_CTRL_W|K_CTRL_X|K_CTRL_Y|K_CTRL_Z|"+
840
+ "K_CTRL_0|K_CTRL_1|K_CTRL_2|K_CTRL_3|K_CTRL_4|K_CTRL_5|K_CTRL_6|K_CTRL_7|K_CTRL_8|K_CTRL_9|"+
841
+ "K_CTRL_F1|K_CTRL_F2|K_CTRL_F3|K_CTRL_F4|K_CTRL_F5|K_CTRL_F6|K_CTRL_F7|"+
842
+ "K_CTRL_F8|K_CTRL_F9|K_CTRL_F10|K_CTRL_F11|K_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|K_CTRL_ALT_SHIFT_6|K_CTRL_ALT_SHIFT_7|"+
919
+ "K_CTRL_ALT_SHIFT_8|K_CTRL_ALT_SHIFT_9|"+
920
+ "K_CTRL_ALT_SHIFT_F1|K_CTRL_ALT_SHIFT_F2|K_CTRL_ALT_SHIFT_F3|K_CTRL_ALT_SHIFT_F4|"+
921
+ "K_CTRL_ALT_SHIFT_F5|K_CTRL_ALT_SHIFT_F6|K_CTRL_ALT_SHIFT_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
- this.embedRules(DocCommentHighlightRules, "doc-",
891
- [ DocCommentHighlightRules.getEndRule("start") ]);
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, module) {
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(session) {
1072
+
1073
+ this.createWorker = function() {
916
1074
  return null;
917
1075
  };
918
1076