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
@@ -0,0 +1,363 @@
1
+ define("ace/mode/nim_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
+ var NimHighlightRules = function () {
7
+
8
+ var keywordMapper = this.createKeywordMapper({
9
+ "variable": "var|let|const",
10
+ "keyword": "assert|parallel|spawn|export|include|from|template|mixin|bind|import|concept|raise|defer|try|finally|except|converter|proc|func|macro|method|and|or|not|xor|shl|shr|div|mod|in|notin|is|isnot|of|static|if|elif|else|case|of|discard|when|return|yield|block|break|while|echo|continue|asm|using|cast|addr|unsafeAddr|type|ref|ptr|do|declared|defined|definedInScope|compiles|sizeOf|is|shallowCopy|getAst|astToStr|spawn|procCall|for|iterator|as",
11
+ "storage.type": "newSeq|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|char|bool|string|set|pointer|float32|float64|enum|object|cstring|array|seq|openArray|varargs|UncheckedArray|tuple|set|distinct|void|auto|openarray|range",
12
+ "support.function": "lock|ze|toU8|toU16|toU32|ord|low|len|high|add|pop|contains|card|incl|excl|dealloc|inc",
13
+ "constant.language": "nil|true|false"
14
+ }, "identifier");
15
+
16
+ var hexNumber = "(?:0[xX][\\dA-Fa-f][\\dA-Fa-f_]*)";
17
+ var decNumber = "(?:[0-9][\\d_]*)";
18
+ var octNumber = "(?:0o[0-7][0-7_]*)";
19
+ var binNumber = "(?:0[bB][01][01_]*)";
20
+ var intNumber = "(?:" + hexNumber + "|" + decNumber + "|" + octNumber + "|" + binNumber + ")(?:'?[iIuU](?:8|16|32|64)|u)?\\b";
21
+ var exponent = "(?:[eE][+-]?[\\d][\\d_]*)";
22
+ var floatNumber = "(?:[\\d][\\d_]*(?:[.][\\d](?:[\\d_]*)" + exponent + "?)|" + exponent + ")";
23
+ var floatNumberExt = "(?:" + hexNumber + "(?:'(?:(?:[fF](?:32|64)?)|[dD])))|(?:" + floatNumber + "|" + decNumber + "|" + octNumber + "|" + binNumber + ")(?:'(?:(?:[fF](?:32|64)?)|[dD]))";
24
+ var stringEscape = "\\\\([abeprcnlftv\\\"']|x[0-9A-Fa-f]{2}|[0-2][0-9]{2}|u[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
25
+ var identifier = '[a-zA-Z][a-zA-Z0-9_]*';
26
+ this.$rules = {
27
+ "start": [{
28
+ token: ["identifier", "keyword.operator", "support.function"],
29
+ regex: "(" + identifier + ")([.]{1})(" + identifier + ")(?=\\()"
30
+ }, {//pragmas
31
+ token: "paren.lparen",
32
+ regex: "(\\{\\.)",
33
+ next: [{
34
+ token: "paren.rparen",
35
+ regex: '(\\.\\}|\\})',
36
+ next: "start"
37
+ }, {
38
+ include: "methods"
39
+ }, {
40
+ token: "identifier",
41
+ regex: identifier
42
+ }, {
43
+ token: "punctuation",
44
+ regex: /[,]/
45
+ }, {
46
+ token: "keyword.operator",
47
+ regex: /[=:.]/
48
+ }, {
49
+ token: "paren.lparen",
50
+ regex: /[[(]/
51
+ }, {
52
+ token: "paren.rparen",
53
+ regex: /[\])]/
54
+ }, {
55
+ include: "math"
56
+ }, {
57
+ include: "strings"
58
+ }, {
59
+ defaultToken: "text"
60
+ }]
61
+ }, {
62
+ token: "comment.doc.start",
63
+ regex: /##\[(?!])/,
64
+ push: "docBlockComment"
65
+ }, {
66
+ token: "comment.start",
67
+ regex: /#\[(?!])/,
68
+ push: "blockComment"
69
+ }, {
70
+ token: "comment.doc",
71
+ regex: '##.*$'
72
+ }, {
73
+ token: "comment",
74
+ regex: '#.*$'
75
+ }, {
76
+ include: "strings"
77
+ }, {// character
78
+ token: "string",
79
+ regex: "'(?:\\\\(?:[abercnlftv]|x[0-9A-Fa-f]{2}|[0-2][0-9]{2}|u[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})|.{1})?'"
80
+ }, {
81
+ include: "methods"
82
+ }, {
83
+ token: keywordMapper,
84
+ regex: "[a-zA-Z][a-zA-Z0-9_]*\\b"
85
+ }, {
86
+ token: ["keyword.operator", "text", "storage.type"],
87
+ regex: "([:])(\\s+)(" + identifier + ")(?=$|\\)|\\[|,|\\s+=|;|\\s+\\{)"
88
+ }, {
89
+ token: "paren.lparen",
90
+ regex: /\[\.|{\||\(\.|\[:|[[({`]/
91
+ }, {
92
+ token: "paren.rparen",
93
+ regex: /\.\)|\|}|\.]|[\])}]/
94
+ }, {
95
+ token: "keyword.operator",
96
+ regex: /[=+\-*\/<>@$~&%|!?^.:\\]/
97
+ }, {
98
+ token: "punctuation",
99
+ regex: /[,;]/
100
+ }, {
101
+ include: "math"
102
+ }],
103
+ blockComment: [{
104
+ regex: /#\[]/,
105
+ token: "comment"
106
+ }, {
107
+ regex: /#\[(?!])/,
108
+ token: "comment.start",
109
+ push: "blockComment"
110
+ }, {
111
+ regex: /]#/,
112
+ token: "comment.end",
113
+ next: "pop"
114
+ }, {
115
+ defaultToken: "comment"
116
+ }],
117
+ docBlockComment: [{
118
+ regex: /##\[]/,
119
+ token: "comment.doc"
120
+ }, {
121
+ regex: /##\[(?!])/,
122
+ token: "comment.doc.start",
123
+ push: "docBlockComment"
124
+ }, {
125
+ regex: /]##/,
126
+ token: "comment.doc.end",
127
+ next: "pop"
128
+ }, {
129
+ defaultToken: "comment.doc"
130
+ }],
131
+ math: [{
132
+ token: "constant.float",
133
+ regex: floatNumberExt
134
+ }, {
135
+ token: "constant.float",
136
+ regex: floatNumber
137
+ }, {
138
+ token: "constant.integer",
139
+ regex: intNumber
140
+ }],
141
+ methods: [{
142
+ token: "support.function",
143
+ regex: "(\\w+)(?=\\()"
144
+ }],
145
+ strings: [{
146
+ token: "string",
147
+ regex: '(\\b' + identifier + ')?"""',
148
+ push: [{
149
+ token: "string",
150
+ regex: '"""',
151
+ next: "pop"
152
+ }, {
153
+ defaultToken: "string"
154
+ }]
155
+ }, {
156
+ token: "string",
157
+ regex: "\\b" + identifier + '"(?=.)',
158
+ push: [{
159
+ token: "string",
160
+ regex: '"|$',
161
+ next: "pop"
162
+ }, {
163
+ defaultToken: "string"
164
+ }]
165
+ }, {
166
+ token: "string",
167
+ regex: '"',
168
+ push: [{
169
+ token: "string",
170
+ regex: '"|$',
171
+ next: "pop"
172
+ }, {
173
+ token: "constant.language.escape",
174
+ regex: stringEscape
175
+ }, {
176
+ defaultToken: "string"
177
+ }]
178
+ }]
179
+ };
180
+ this.normalizeRules();
181
+ };
182
+
183
+
184
+ oop.inherits(NimHighlightRules, TextHighlightRules);
185
+
186
+ exports.NimHighlightRules = NimHighlightRules;
187
+ });
188
+
189
+ define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
190
+ "use strict";
191
+
192
+ var oop = require("../../lib/oop");
193
+ var Range = require("../../range").Range;
194
+ var BaseFoldMode = require("./fold_mode").FoldMode;
195
+
196
+ var FoldMode = exports.FoldMode = function(commentRegex) {
197
+ if (commentRegex) {
198
+ this.foldingStartMarker = new RegExp(
199
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
200
+ );
201
+ this.foldingStopMarker = new RegExp(
202
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
203
+ );
204
+ }
205
+ };
206
+ oop.inherits(FoldMode, BaseFoldMode);
207
+
208
+ (function() {
209
+
210
+ this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
211
+ this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
212
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
213
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
214
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
215
+ this._getFoldWidgetBase = this.getFoldWidget;
216
+ this.getFoldWidget = function(session, foldStyle, row) {
217
+ var line = session.getLine(row);
218
+
219
+ if (this.singleLineBlockCommentRe.test(line)) {
220
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
221
+ return "";
222
+ }
223
+
224
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
225
+
226
+ if (!fw && this.startRegionRe.test(line))
227
+ return "start"; // lineCommentRegionStart
228
+
229
+ return fw;
230
+ };
231
+
232
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
233
+ var line = session.getLine(row);
234
+
235
+ if (this.startRegionRe.test(line))
236
+ return this.getCommentRegionBlock(session, line, row);
237
+
238
+ var match = line.match(this.foldingStartMarker);
239
+ if (match) {
240
+ var i = match.index;
241
+
242
+ if (match[1])
243
+ return this.openingBracketBlock(session, match[1], row, i);
244
+
245
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
246
+
247
+ if (range && !range.isMultiLine()) {
248
+ if (forceMultiline) {
249
+ range = this.getSectionRange(session, row);
250
+ } else if (foldStyle != "all")
251
+ range = null;
252
+ }
253
+
254
+ return range;
255
+ }
256
+
257
+ if (foldStyle === "markbegin")
258
+ return;
259
+
260
+ var match = line.match(this.foldingStopMarker);
261
+ if (match) {
262
+ var i = match.index + match[0].length;
263
+
264
+ if (match[1])
265
+ return this.closingBracketBlock(session, match[1], row, i);
266
+
267
+ return session.getCommentFoldRange(row, i, -1);
268
+ }
269
+ };
270
+
271
+ this.getSectionRange = function(session, row) {
272
+ var line = session.getLine(row);
273
+ var startIndent = line.search(/\S/);
274
+ var startRow = row;
275
+ var startColumn = line.length;
276
+ row = row + 1;
277
+ var endRow = row;
278
+ var maxRow = session.getLength();
279
+ while (++row < maxRow) {
280
+ line = session.getLine(row);
281
+ var indent = line.search(/\S/);
282
+ if (indent === -1)
283
+ continue;
284
+ if (startIndent > indent)
285
+ break;
286
+ var subRange = this.getFoldWidgetRange(session, "all", row);
287
+
288
+ if (subRange) {
289
+ if (subRange.start.row <= startRow) {
290
+ break;
291
+ } else if (subRange.isMultiLine()) {
292
+ row = subRange.end.row;
293
+ } else if (startIndent == indent) {
294
+ break;
295
+ }
296
+ }
297
+ endRow = row;
298
+ }
299
+
300
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
301
+ };
302
+ this.getCommentRegionBlock = function(session, line, row) {
303
+ var startColumn = line.search(/\s*$/);
304
+ var maxRow = session.getLength();
305
+ var startRow = row;
306
+
307
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
308
+ var depth = 1;
309
+ while (++row < maxRow) {
310
+ line = session.getLine(row);
311
+ var m = re.exec(line);
312
+ if (!m) continue;
313
+ if (m[1]) depth--;
314
+ else depth++;
315
+
316
+ if (!depth) break;
317
+ }
318
+
319
+ var endRow = row;
320
+ if (endRow > startRow) {
321
+ return new Range(startRow, startColumn, endRow, line.length);
322
+ }
323
+ };
324
+
325
+ }).call(FoldMode.prototype);
326
+
327
+ });
328
+
329
+ define("ace/mode/nim",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nim_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) {
330
+ "use strict";
331
+
332
+ var oop = require("../lib/oop");
333
+ var TextMode = require("./text").Mode;
334
+ var NimHighlightRules = require("./nim_highlight_rules").NimHighlightRules;
335
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
336
+
337
+ var Mode = function () {
338
+ TextMode.call(this);
339
+ this.HighlightRules = NimHighlightRules;
340
+ this.foldingRules = new CStyleFoldMode();
341
+ this.$behaviour = this.$defaultBehaviour;
342
+ };
343
+
344
+ oop.inherits(Mode, TextMode);
345
+
346
+
347
+ (function () {
348
+ this.lineCommentStart = "#";
349
+ this.blockComment = {start: "#[", end: "]#", nestable: true};
350
+
351
+
352
+ this.$id = "ace/mode/nim";
353
+ }).call(Mode.prototype);
354
+
355
+ exports.Mode = Mode;
356
+ }); (function() {
357
+ window.require(["ace/mode/nim"], function(m) {
358
+ if (typeof module == "object" && typeof exports == "object" && module) {
359
+ module.exports = m;
360
+ }
361
+ });
362
+ })();
363
+
@@ -5,74 +5,92 @@ var oop = require("../lib/oop");
5
5
  var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
6
6
 
7
7
  var PascalHighlightRules = function() {
8
-
9
- this.$rules = { start:
10
- [ { caseInsensitive: true,
11
- token: 'keyword.control.pascal',
12
- regex: '\\b(?:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b' },
13
- { caseInsensitive: true,
14
- token:
15
- [ 'variable.pascal', "text",
16
- 'storage.type.prototype.pascal',
17
- 'entity.name.function.prototype.pascal' ],
18
- regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))' },
19
- { caseInsensitive: true,
20
- token:
21
- [ 'variable.pascal', "text",
22
- 'storage.type.function.pascal',
23
- 'entity.name.function.pascal' ],
24
- regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?' },
25
- { token: 'constant.numeric.pascal',
26
- regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b' },
27
- { token: 'punctuation.definition.comment.pascal',
28
- regex: '--.*$',
29
- push_:
30
- [ { token: 'comment.line.double-dash.pascal.one',
31
- regex: '$',
32
- next: 'pop' },
33
- { defaultToken: 'comment.line.double-dash.pascal.one' } ] },
34
- { token: 'punctuation.definition.comment.pascal',
35
- regex: '//.*$',
36
- push_:
37
- [ { token: 'comment.line.double-slash.pascal.two',
38
- regex: '$',
39
- next: 'pop' },
40
- { defaultToken: 'comment.line.double-slash.pascal.two' } ] },
41
- { token: 'punctuation.definition.comment.pascal',
42
- regex: '\\(\\*',
43
- push:
44
- [ { token: 'punctuation.definition.comment.pascal',
45
- regex: '\\*\\)',
46
- next: 'pop' },
47
- { defaultToken: 'comment.block.pascal.one' } ] },
48
- { token: 'punctuation.definition.comment.pascal',
49
- regex: '\\{',
50
- push:
51
- [ { token: 'punctuation.definition.comment.pascal',
52
- regex: '\\}',
53
- next: 'pop' },
54
- { defaultToken: 'comment.block.pascal.two' } ] },
55
- { token: 'punctuation.definition.string.begin.pascal',
56
- regex: '"',
57
- push:
58
- [ { token: 'constant.character.escape.pascal', regex: '\\\\.' },
59
- { token: 'punctuation.definition.string.end.pascal',
8
+ var keywordMapper = this.createKeywordMapper({
9
+ "keyword.control": "absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class" +
10
+ "|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization" +
11
+ "|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is" +
12
+ "|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private" +
13
+ "|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr" +
14
+ "|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor"
15
+ }, "identifier", true);
16
+
17
+ this.$rules = {
18
+ start: [{
19
+ caseInsensitive: true,
20
+ token: ['variable', "text",
21
+ 'storage.type.prototype',
22
+ 'entity.name.function.prototype'
23
+ ],
24
+ regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))'
25
+ }, {
26
+ caseInsensitive: true,
27
+ token: ['variable', "text", 'storage.type.function', 'entity.name.function'],
28
+ regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?'
29
+ }, {
30
+ caseInsensitive: true,
31
+ token: keywordMapper,
32
+ regex: /\b[a-z_]+\b/
33
+ }, {
34
+ token: 'constant.numeric',
35
+ regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b'
36
+ }, {
37
+ token: 'punctuation.definition.comment',
38
+ regex: '--.*$'
39
+ }, {
40
+ token: 'punctuation.definition.comment',
41
+ regex: '//.*$'
42
+ }, {
43
+ token: 'punctuation.definition.comment',
44
+ regex: '\\(\\*',
45
+ push: [{
46
+ token: 'punctuation.definition.comment',
47
+ regex: '\\*\\)',
48
+ next: 'pop'
49
+ },
50
+ { defaultToken: 'comment.block.one' }
51
+ ]
52
+ }, {
53
+ token: 'punctuation.definition.comment',
54
+ regex: '\\{',
55
+ push: [{
56
+ token: 'punctuation.definition.comment',
57
+ regex: '\\}',
58
+ next: 'pop'
59
+ },
60
+ { defaultToken: 'comment.block.two' }
61
+ ]
62
+ }, {
63
+ token: 'punctuation.definition.string.begin',
60
64
  regex: '"',
61
- next: 'pop' },
62
- { defaultToken: 'string.quoted.double.pascal' } ]
63
- },
64
- { token: 'punctuation.definition.string.begin.pascal',
65
- regex: '\'',
66
- push:
67
- [ { token: 'constant.character.escape.apostrophe.pascal',
68
- regex: '\'\'' },
69
- { token: 'punctuation.definition.string.end.pascal',
65
+ push: [{ token: 'constant.character.escape', regex: '\\\\.' },
66
+ {
67
+ token: 'punctuation.definition.string.end',
68
+ regex: '"',
69
+ next: 'pop'
70
+ },
71
+ { defaultToken: 'string.quoted.double' }
72
+ ]
73
+ }, {
74
+ token: 'punctuation.definition.string.begin',
70
75
  regex: '\'',
71
- next: 'pop' },
72
- { defaultToken: 'string.quoted.single.pascal' } ] },
73
- { token: 'keyword.operator',
74
- regex: '[+\\-;,/*%]|:=|=' } ] };
75
-
76
+ push: [{
77
+ token: 'constant.character.escape.apostrophe',
78
+ regex: '\'\''
79
+ },
80
+ {
81
+ token: 'punctuation.definition.string.end',
82
+ regex: '\'',
83
+ next: 'pop'
84
+ },
85
+ { defaultToken: 'string.quoted.single' }
86
+ ]
87
+ }, {
88
+ token: 'keyword.operator',
89
+ regex: '[+\\-;,/*%]|:=|='
90
+ }
91
+ ]
92
+ };
93
+
76
94
  this.normalizeRules();
77
95
  };
78
96