fluentd-ui 0.3.12 → 0.3.13

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd-ui might be problematic. Click here for more details.

Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +4 -0
  3. data/Gemfile.lock +1 -1
  4. data/app/assets/javascripts/application.js +2 -0
  5. data/app/assets/javascripts/codemirror.js +29 -0
  6. data/app/assets/javascripts/codemirror_fluentd.js +59 -0
  7. data/app/assets/stylesheets/application.css +6 -0
  8. data/app/views/fluentd/settings/edit.html.haml +1 -1
  9. data/app/views/shared/vue/_setting.html.erb +1 -1
  10. data/bower.json +2 -1
  11. data/lib/fluentd-ui/version.rb +1 -1
  12. data/spec/features/source_and_output_spec.rb +16 -6
  13. data/vendor/assets/javascripts/bower/codemirror/.bower.json +29 -0
  14. data/vendor/assets/javascripts/bower/codemirror/AUTHORS +423 -0
  15. data/vendor/assets/javascripts/bower/codemirror/CONTRIBUTING.md +76 -0
  16. data/vendor/assets/javascripts/bower/codemirror/LICENSE +19 -0
  17. data/vendor/assets/javascripts/bower/codemirror/README.md +11 -0
  18. data/vendor/assets/javascripts/bower/codemirror/addon/comment/comment.js +183 -0
  19. data/vendor/assets/javascripts/bower/codemirror/addon/comment/continuecomment.js +85 -0
  20. data/vendor/assets/javascripts/bower/codemirror/addon/dialog/dialog.css +32 -0
  21. data/vendor/assets/javascripts/bower/codemirror/addon/dialog/dialog.js +155 -0
  22. data/vendor/assets/javascripts/bower/codemirror/addon/display/fullscreen.css +6 -0
  23. data/vendor/assets/javascripts/bower/codemirror/addon/display/fullscreen.js +41 -0
  24. data/vendor/assets/javascripts/bower/codemirror/addon/display/panel.js +94 -0
  25. data/vendor/assets/javascripts/bower/codemirror/addon/display/placeholder.js +58 -0
  26. data/vendor/assets/javascripts/bower/codemirror/addon/display/rulers.js +64 -0
  27. data/vendor/assets/javascripts/bower/codemirror/addon/edit/closebrackets.js +159 -0
  28. data/vendor/assets/javascripts/bower/codemirror/addon/edit/closetag.js +159 -0
  29. data/vendor/assets/javascripts/bower/codemirror/addon/edit/continuelist.js +51 -0
  30. data/vendor/assets/javascripts/bower/codemirror/addon/edit/matchbrackets.js +120 -0
  31. data/vendor/assets/javascripts/bower/codemirror/addon/edit/matchtags.js +66 -0
  32. data/vendor/assets/javascripts/bower/codemirror/addon/edit/trailingspace.js +27 -0
  33. data/vendor/assets/javascripts/bower/codemirror/addon/fold/brace-fold.js +105 -0
  34. data/vendor/assets/javascripts/bower/codemirror/addon/fold/comment-fold.js +57 -0
  35. data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldcode.js +145 -0
  36. data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldgutter.css +20 -0
  37. data/vendor/assets/javascripts/bower/codemirror/addon/fold/foldgutter.js +134 -0
  38. data/vendor/assets/javascripts/bower/codemirror/addon/fold/indent-fold.js +44 -0
  39. data/vendor/assets/javascripts/bower/codemirror/addon/fold/markdown-fold.js +49 -0
  40. data/vendor/assets/javascripts/bower/codemirror/addon/fold/xml-fold.js +182 -0
  41. data/vendor/assets/javascripts/bower/codemirror/addon/hint/anyword-hint.js +41 -0
  42. data/vendor/assets/javascripts/bower/codemirror/addon/hint/css-hint.js +56 -0
  43. data/vendor/assets/javascripts/bower/codemirror/addon/hint/html-hint.js +348 -0
  44. data/vendor/assets/javascripts/bower/codemirror/addon/hint/javascript-hint.js +146 -0
  45. data/vendor/assets/javascripts/bower/codemirror/addon/hint/show-hint.css +38 -0
  46. data/vendor/assets/javascripts/bower/codemirror/addon/hint/show-hint.js +389 -0
  47. data/vendor/assets/javascripts/bower/codemirror/addon/hint/sql-hint.js +197 -0
  48. data/vendor/assets/javascripts/bower/codemirror/addon/hint/xml-hint.js +110 -0
  49. data/vendor/assets/javascripts/bower/codemirror/addon/lint/coffeescript-lint.js +41 -0
  50. data/vendor/assets/javascripts/bower/codemirror/addon/lint/css-lint.js +35 -0
  51. data/vendor/assets/javascripts/bower/codemirror/addon/lint/javascript-lint.js +136 -0
  52. data/vendor/assets/javascripts/bower/codemirror/addon/lint/json-lint.js +31 -0
  53. data/vendor/assets/javascripts/bower/codemirror/addon/lint/lint.css +73 -0
  54. data/vendor/assets/javascripts/bower/codemirror/addon/lint/lint.js +204 -0
  55. data/vendor/assets/javascripts/bower/codemirror/addon/lint/yaml-lint.js +28 -0
  56. data/vendor/assets/javascripts/bower/codemirror/addon/merge/merge.css +112 -0
  57. data/vendor/assets/javascripts/bower/codemirror/addon/merge/merge.js +643 -0
  58. data/vendor/assets/javascripts/bower/codemirror/addon/mode/loadmode.js +64 -0
  59. data/vendor/assets/javascripts/bower/codemirror/addon/mode/multiplex.js +118 -0
  60. data/vendor/assets/javascripts/bower/codemirror/addon/mode/multiplex_test.js +33 -0
  61. data/vendor/assets/javascripts/bower/codemirror/addon/mode/overlay.js +85 -0
  62. data/vendor/assets/javascripts/bower/codemirror/addon/mode/simple.js +213 -0
  63. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/colorize.js +40 -0
  64. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode-standalone.js +157 -0
  65. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode.js +72 -0
  66. data/vendor/assets/javascripts/bower/codemirror/addon/runmode/runmode.node.js +120 -0
  67. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/annotatescrollbar.js +76 -0
  68. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/scrollpastend.js +46 -0
  69. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/simplescrollbars.css +66 -0
  70. data/vendor/assets/javascripts/bower/codemirror/addon/scroll/simplescrollbars.js +139 -0
  71. data/vendor/assets/javascripts/bower/codemirror/addon/search/match-highlighter.js +128 -0
  72. data/vendor/assets/javascripts/bower/codemirror/addon/search/matchesonscrollbar.css +8 -0
  73. data/vendor/assets/javascripts/bower/codemirror/addon/search/matchesonscrollbar.js +90 -0
  74. data/vendor/assets/javascripts/bower/codemirror/addon/search/search.js +164 -0
  75. data/vendor/assets/javascripts/bower/codemirror/addon/search/searchcursor.js +189 -0
  76. data/vendor/assets/javascripts/bower/codemirror/addon/selection/active-line.js +71 -0
  77. data/vendor/assets/javascripts/bower/codemirror/addon/selection/mark-selection.js +118 -0
  78. data/vendor/assets/javascripts/bower/codemirror/addon/tern/tern.css +86 -0
  79. data/vendor/assets/javascripts/bower/codemirror/addon/tern/tern.js +670 -0
  80. data/vendor/assets/javascripts/bower/codemirror/addon/tern/worker.js +44 -0
  81. data/vendor/assets/javascripts/bower/codemirror/addon/wrap/hardwrap.js +139 -0
  82. data/vendor/assets/javascripts/bower/codemirror/bower.json +16 -0
  83. data/vendor/assets/javascripts/bower/codemirror/keymap/emacs.js +411 -0
  84. data/vendor/assets/javascripts/bower/codemirror/keymap/sublime.js +540 -0
  85. data/vendor/assets/javascripts/bower/codemirror/keymap/vim.js +4901 -0
  86. data/vendor/assets/javascripts/bower/codemirror/lib/codemirror.css +309 -0
  87. data/vendor/assets/javascripts/bower/codemirror/lib/codemirror.js +8029 -0
  88. data/vendor/assets/javascripts/bower/codemirror/mode/apl/apl.js +175 -0
  89. data/vendor/assets/javascripts/bower/codemirror/mode/asterisk/asterisk.js +198 -0
  90. data/vendor/assets/javascripts/bower/codemirror/mode/clike/clike.js +489 -0
  91. data/vendor/assets/javascripts/bower/codemirror/mode/clike/scala.html +767 -0
  92. data/vendor/assets/javascripts/bower/codemirror/mode/clojure/clojure.js +243 -0
  93. data/vendor/assets/javascripts/bower/codemirror/mode/cobol/cobol.js +255 -0
  94. data/vendor/assets/javascripts/bower/codemirror/mode/coffeescript/coffeescript.js +369 -0
  95. data/vendor/assets/javascripts/bower/codemirror/mode/commonlisp/commonlisp.js +122 -0
  96. data/vendor/assets/javascripts/bower/codemirror/mode/css/css.js +717 -0
  97. data/vendor/assets/javascripts/bower/codemirror/mode/css/less.html +152 -0
  98. data/vendor/assets/javascripts/bower/codemirror/mode/css/less_test.js +51 -0
  99. data/vendor/assets/javascripts/bower/codemirror/mode/css/scss.html +157 -0
  100. data/vendor/assets/javascripts/bower/codemirror/mode/css/scss_test.js +110 -0
  101. data/vendor/assets/javascripts/bower/codemirror/mode/css/test.js +135 -0
  102. data/vendor/assets/javascripts/bower/codemirror/mode/cypher/cypher.js +146 -0
  103. data/vendor/assets/javascripts/bower/codemirror/mode/d/d.js +218 -0
  104. data/vendor/assets/javascripts/bower/codemirror/mode/dart/dart.js +50 -0
  105. data/vendor/assets/javascripts/bower/codemirror/mode/diff/diff.js +47 -0
  106. data/vendor/assets/javascripts/bower/codemirror/mode/django/django.js +67 -0
  107. data/vendor/assets/javascripts/bower/codemirror/mode/dockerfile/dockerfile.js +76 -0
  108. data/vendor/assets/javascripts/bower/codemirror/mode/dtd/dtd.js +142 -0
  109. data/vendor/assets/javascripts/bower/codemirror/mode/dylan/dylan.js +299 -0
  110. data/vendor/assets/javascripts/bower/codemirror/mode/ebnf/ebnf.js +195 -0
  111. data/vendor/assets/javascripts/bower/codemirror/mode/ecl/ecl.js +207 -0
  112. data/vendor/assets/javascripts/bower/codemirror/mode/eiffel/eiffel.js +162 -0
  113. data/vendor/assets/javascripts/bower/codemirror/mode/erlang/erlang.js +622 -0
  114. data/vendor/assets/javascripts/bower/codemirror/mode/fortran/fortran.js +188 -0
  115. data/vendor/assets/javascripts/bower/codemirror/mode/gas/gas.js +345 -0
  116. data/vendor/assets/javascripts/bower/codemirror/mode/gfm/gfm.js +123 -0
  117. data/vendor/assets/javascripts/bower/codemirror/mode/gfm/test.js +213 -0
  118. data/vendor/assets/javascripts/bower/codemirror/mode/gherkin/gherkin.js +178 -0
  119. data/vendor/assets/javascripts/bower/codemirror/mode/go/go.js +184 -0
  120. data/vendor/assets/javascripts/bower/codemirror/mode/groovy/groovy.js +226 -0
  121. data/vendor/assets/javascripts/bower/codemirror/mode/haml/haml.js +159 -0
  122. data/vendor/assets/javascripts/bower/codemirror/mode/haml/test.js +97 -0
  123. data/vendor/assets/javascripts/bower/codemirror/mode/haskell/haskell.js +267 -0
  124. data/vendor/assets/javascripts/bower/codemirror/mode/haxe/haxe.js +518 -0
  125. data/vendor/assets/javascripts/bower/codemirror/mode/htmlembedded/htmlembedded.js +86 -0
  126. data/vendor/assets/javascripts/bower/codemirror/mode/htmlmixed/htmlmixed.js +121 -0
  127. data/vendor/assets/javascripts/bower/codemirror/mode/http/http.js +113 -0
  128. data/vendor/assets/javascripts/bower/codemirror/mode/idl/idl.js +290 -0
  129. data/vendor/assets/javascripts/bower/codemirror/mode/jade/jade.js +590 -0
  130. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/javascript.js +686 -0
  131. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/json-ld.html +72 -0
  132. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/test.js +200 -0
  133. data/vendor/assets/javascripts/bower/codemirror/mode/javascript/typescript.html +61 -0
  134. data/vendor/assets/javascripts/bower/codemirror/mode/jinja2/jinja2.js +142 -0
  135. data/vendor/assets/javascripts/bower/codemirror/mode/julia/julia.js +301 -0
  136. data/vendor/assets/javascripts/bower/codemirror/mode/kotlin/kotlin.js +280 -0
  137. data/vendor/assets/javascripts/bower/codemirror/mode/livescript/livescript.js +280 -0
  138. data/vendor/assets/javascripts/bower/codemirror/mode/lua/lua.js +159 -0
  139. data/vendor/assets/javascripts/bower/codemirror/mode/markdown/markdown.js +765 -0
  140. data/vendor/assets/javascripts/bower/codemirror/mode/markdown/test.js +754 -0
  141. data/vendor/assets/javascripts/bower/codemirror/mode/meta.js +165 -0
  142. data/vendor/assets/javascripts/bower/codemirror/mode/mirc/mirc.js +193 -0
  143. data/vendor/assets/javascripts/bower/codemirror/mode/mllike/mllike.js +205 -0
  144. data/vendor/assets/javascripts/bower/codemirror/mode/modelica/modelica.js +245 -0
  145. data/vendor/assets/javascripts/bower/codemirror/mode/nginx/nginx.js +178 -0
  146. data/vendor/assets/javascripts/bower/codemirror/mode/ntriples/ntriples.js +186 -0
  147. data/vendor/assets/javascripts/bower/codemirror/mode/octave/octave.js +135 -0
  148. data/vendor/assets/javascripts/bower/codemirror/mode/pascal/pascal.js +109 -0
  149. data/vendor/assets/javascripts/bower/codemirror/mode/pegjs/pegjs.js +114 -0
  150. data/vendor/assets/javascripts/bower/codemirror/mode/perl/perl.js +832 -0
  151. data/vendor/assets/javascripts/bower/codemirror/mode/php/php.js +226 -0
  152. data/vendor/assets/javascripts/bower/codemirror/mode/php/test.js +154 -0
  153. data/vendor/assets/javascripts/bower/codemirror/mode/pig/pig.js +188 -0
  154. data/vendor/assets/javascripts/bower/codemirror/mode/properties/properties.js +78 -0
  155. data/vendor/assets/javascripts/bower/codemirror/mode/puppet/puppet.js +220 -0
  156. data/vendor/assets/javascripts/bower/codemirror/mode/python/python.js +359 -0
  157. data/vendor/assets/javascripts/bower/codemirror/mode/q/q.js +139 -0
  158. data/vendor/assets/javascripts/bower/codemirror/mode/r/r.js +162 -0
  159. data/vendor/assets/javascripts/bower/codemirror/mode/rpm/rpm.js +101 -0
  160. data/vendor/assets/javascripts/bower/codemirror/mode/rst/rst.js +557 -0
  161. data/vendor/assets/javascripts/bower/codemirror/mode/ruby/ruby.js +285 -0
  162. data/vendor/assets/javascripts/bower/codemirror/mode/ruby/test.js +14 -0
  163. data/vendor/assets/javascripts/bower/codemirror/mode/rust/rust.js +451 -0
  164. data/vendor/assets/javascripts/bower/codemirror/mode/sass/sass.js +327 -0
  165. data/vendor/assets/javascripts/bower/codemirror/mode/scheme/scheme.js +248 -0
  166. data/vendor/assets/javascripts/bower/codemirror/mode/shell/shell.js +139 -0
  167. data/vendor/assets/javascripts/bower/codemirror/mode/shell/test.js +58 -0
  168. data/vendor/assets/javascripts/bower/codemirror/mode/sieve/sieve.js +193 -0
  169. data/vendor/assets/javascripts/bower/codemirror/mode/slim/slim.js +575 -0
  170. data/vendor/assets/javascripts/bower/codemirror/mode/slim/test.js +96 -0
  171. data/vendor/assets/javascripts/bower/codemirror/mode/smalltalk/smalltalk.js +168 -0
  172. data/vendor/assets/javascripts/bower/codemirror/mode/smarty/smarty.js +221 -0
  173. data/vendor/assets/javascripts/bower/codemirror/mode/smartymixed/smartymixed.js +197 -0
  174. data/vendor/assets/javascripts/bower/codemirror/mode/solr/solr.js +104 -0
  175. data/vendor/assets/javascripts/bower/codemirror/mode/soy/soy.js +198 -0
  176. data/vendor/assets/javascripts/bower/codemirror/mode/sparql/sparql.js +174 -0
  177. data/vendor/assets/javascripts/bower/codemirror/mode/spreadsheet/spreadsheet.js +109 -0
  178. data/vendor/assets/javascripts/bower/codemirror/mode/sql/sql.js +391 -0
  179. data/vendor/assets/javascripts/bower/codemirror/mode/stex/stex.js +251 -0
  180. data/vendor/assets/javascripts/bower/codemirror/mode/stex/test.js +123 -0
  181. data/vendor/assets/javascripts/bower/codemirror/mode/tcl/tcl.js +147 -0
  182. data/vendor/assets/javascripts/bower/codemirror/mode/textile/test.js +417 -0
  183. data/vendor/assets/javascripts/bower/codemirror/mode/textile/textile.js +469 -0
  184. data/vendor/assets/javascripts/bower/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
  185. data/vendor/assets/javascripts/bower/codemirror/mode/tiddlywiki/tiddlywiki.js +369 -0
  186. data/vendor/assets/javascripts/bower/codemirror/mode/tiki/tiki.css +26 -0
  187. data/vendor/assets/javascripts/bower/codemirror/mode/tiki/tiki.js +323 -0
  188. data/vendor/assets/javascripts/bower/codemirror/mode/toml/toml.js +88 -0
  189. data/vendor/assets/javascripts/bower/codemirror/mode/tornado/tornado.js +68 -0
  190. data/vendor/assets/javascripts/bower/codemirror/mode/turtle/turtle.js +162 -0
  191. data/vendor/assets/javascripts/bower/codemirror/mode/vb/vb.js +274 -0
  192. data/vendor/assets/javascripts/bower/codemirror/mode/vbscript/vbscript.js +350 -0
  193. data/vendor/assets/javascripts/bower/codemirror/mode/velocity/velocity.js +201 -0
  194. data/vendor/assets/javascripts/bower/codemirror/mode/verilog/test.js +273 -0
  195. data/vendor/assets/javascripts/bower/codemirror/mode/verilog/verilog.js +364 -0
  196. data/vendor/assets/javascripts/bower/codemirror/mode/xml/test.js +51 -0
  197. data/vendor/assets/javascripts/bower/codemirror/mode/xml/xml.js +384 -0
  198. data/vendor/assets/javascripts/bower/codemirror/mode/xquery/test.js +67 -0
  199. data/vendor/assets/javascripts/bower/codemirror/mode/xquery/xquery.js +447 -0
  200. data/vendor/assets/javascripts/bower/codemirror/mode/yaml/yaml.js +117 -0
  201. data/vendor/assets/javascripts/bower/codemirror/mode/z80/z80.js +100 -0
  202. data/vendor/assets/javascripts/bower/codemirror/theme/3024-day.css +38 -0
  203. data/vendor/assets/javascripts/bower/codemirror/theme/3024-night.css +37 -0
  204. data/vendor/assets/javascripts/bower/codemirror/theme/ambiance-mobile.css +5 -0
  205. data/vendor/assets/javascripts/bower/codemirror/theme/ambiance.css +77 -0
  206. data/vendor/assets/javascripts/bower/codemirror/theme/base16-dark.css +36 -0
  207. data/vendor/assets/javascripts/bower/codemirror/theme/base16-light.css +36 -0
  208. data/vendor/assets/javascripts/bower/codemirror/theme/blackboard.css +30 -0
  209. data/vendor/assets/javascripts/bower/codemirror/theme/cobalt.css +23 -0
  210. data/vendor/assets/javascripts/bower/codemirror/theme/eclipse.css +23 -0
  211. data/vendor/assets/javascripts/bower/codemirror/theme/elegant.css +13 -0
  212. data/vendor/assets/javascripts/bower/codemirror/theme/erlang-dark.css +32 -0
  213. data/vendor/assets/javascripts/bower/codemirror/theme/lesser-dark.css +45 -0
  214. data/vendor/assets/javascripts/bower/codemirror/theme/mbo.css +35 -0
  215. data/vendor/assets/javascripts/bower/codemirror/theme/mdn-like.css +44 -0
  216. data/vendor/assets/javascripts/bower/codemirror/theme/midnight.css +45 -0
  217. data/vendor/assets/javascripts/bower/codemirror/theme/monokai.css +31 -0
  218. data/vendor/assets/javascripts/bower/codemirror/theme/neat.css +12 -0
  219. data/vendor/assets/javascripts/bower/codemirror/theme/neo.css +43 -0
  220. data/vendor/assets/javascripts/bower/codemirror/theme/night.css +26 -0
  221. data/vendor/assets/javascripts/bower/codemirror/theme/paraiso-dark.css +36 -0
  222. data/vendor/assets/javascripts/bower/codemirror/theme/paraiso-light.css +36 -0
  223. data/vendor/assets/javascripts/bower/codemirror/theme/pastel-on-dark.css +50 -0
  224. data/vendor/assets/javascripts/bower/codemirror/theme/rubyblue.css +23 -0
  225. data/vendor/assets/javascripts/bower/codemirror/theme/solarized.css +165 -0
  226. data/vendor/assets/javascripts/bower/codemirror/theme/the-matrix.css +28 -0
  227. data/vendor/assets/javascripts/bower/codemirror/theme/tomorrow-night-bright.css +35 -0
  228. data/vendor/assets/javascripts/bower/codemirror/theme/tomorrow-night-eighties.css +36 -0
  229. data/vendor/assets/javascripts/bower/codemirror/theme/twilight.css +30 -0
  230. data/vendor/assets/javascripts/bower/codemirror/theme/vibrant-ink.css +32 -0
  231. data/vendor/assets/javascripts/bower/codemirror/theme/xq-dark.css +51 -0
  232. data/vendor/assets/javascripts/bower/codemirror/theme/xq-light.css +43 -0
  233. data/vendor/assets/javascripts/bower/codemirror/theme/zenburn.css +37 -0
  234. metadata +225 -2
@@ -0,0 +1,175 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ CodeMirror.defineMode("apl", function() {
15
+ var builtInOps = {
16
+ ".": "innerProduct",
17
+ "\\": "scan",
18
+ "/": "reduce",
19
+ "⌿": "reduce1Axis",
20
+ "⍀": "scan1Axis",
21
+ "¨": "each",
22
+ "⍣": "power"
23
+ };
24
+ var builtInFuncs = {
25
+ "+": ["conjugate", "add"],
26
+ "−": ["negate", "subtract"],
27
+ "×": ["signOf", "multiply"],
28
+ "÷": ["reciprocal", "divide"],
29
+ "⌈": ["ceiling", "greaterOf"],
30
+ "⌊": ["floor", "lesserOf"],
31
+ "∣": ["absolute", "residue"],
32
+ "⍳": ["indexGenerate", "indexOf"],
33
+ "?": ["roll", "deal"],
34
+ "⋆": ["exponentiate", "toThePowerOf"],
35
+ "⍟": ["naturalLog", "logToTheBase"],
36
+ "○": ["piTimes", "circularFuncs"],
37
+ "!": ["factorial", "binomial"],
38
+ "⌹": ["matrixInverse", "matrixDivide"],
39
+ "<": [null, "lessThan"],
40
+ "≤": [null, "lessThanOrEqual"],
41
+ "=": [null, "equals"],
42
+ ">": [null, "greaterThan"],
43
+ "≥": [null, "greaterThanOrEqual"],
44
+ "≠": [null, "notEqual"],
45
+ "≡": ["depth", "match"],
46
+ "≢": [null, "notMatch"],
47
+ "∈": ["enlist", "membership"],
48
+ "⍷": [null, "find"],
49
+ "∪": ["unique", "union"],
50
+ "∩": [null, "intersection"],
51
+ "∼": ["not", "without"],
52
+ "∨": [null, "or"],
53
+ "∧": [null, "and"],
54
+ "⍱": [null, "nor"],
55
+ "⍲": [null, "nand"],
56
+ "⍴": ["shapeOf", "reshape"],
57
+ ",": ["ravel", "catenate"],
58
+ "⍪": [null, "firstAxisCatenate"],
59
+ "⌽": ["reverse", "rotate"],
60
+ "⊖": ["axis1Reverse", "axis1Rotate"],
61
+ "⍉": ["transpose", null],
62
+ "↑": ["first", "take"],
63
+ "↓": [null, "drop"],
64
+ "⊂": ["enclose", "partitionWithAxis"],
65
+ "⊃": ["diclose", "pick"],
66
+ "⌷": [null, "index"],
67
+ "⍋": ["gradeUp", null],
68
+ "⍒": ["gradeDown", null],
69
+ "⊤": ["encode", null],
70
+ "⊥": ["decode", null],
71
+ "⍕": ["format", "formatByExample"],
72
+ "⍎": ["execute", null],
73
+ "⊣": ["stop", "left"],
74
+ "⊢": ["pass", "right"]
75
+ };
76
+
77
+ var isOperator = /[\.\/⌿⍀¨⍣]/;
78
+ var isNiladic = /⍬/;
79
+ var isFunction = /[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/;
80
+ var isArrow = /←/;
81
+ var isComment = /[⍝#].*$/;
82
+
83
+ var stringEater = function(type) {
84
+ var prev;
85
+ prev = false;
86
+ return function(c) {
87
+ prev = c;
88
+ if (c === type) {
89
+ return prev === "\\";
90
+ }
91
+ return true;
92
+ };
93
+ };
94
+ return {
95
+ startState: function() {
96
+ return {
97
+ prev: false,
98
+ func: false,
99
+ op: false,
100
+ string: false,
101
+ escape: false
102
+ };
103
+ },
104
+ token: function(stream, state) {
105
+ var ch, funcName, word;
106
+ if (stream.eatSpace()) {
107
+ return null;
108
+ }
109
+ ch = stream.next();
110
+ if (ch === '"' || ch === "'") {
111
+ stream.eatWhile(stringEater(ch));
112
+ stream.next();
113
+ state.prev = true;
114
+ return "string";
115
+ }
116
+ if (/[\[{\(]/.test(ch)) {
117
+ state.prev = false;
118
+ return null;
119
+ }
120
+ if (/[\]}\)]/.test(ch)) {
121
+ state.prev = true;
122
+ return null;
123
+ }
124
+ if (isNiladic.test(ch)) {
125
+ state.prev = false;
126
+ return "niladic";
127
+ }
128
+ if (/[¯\d]/.test(ch)) {
129
+ if (state.func) {
130
+ state.func = false;
131
+ state.prev = false;
132
+ } else {
133
+ state.prev = true;
134
+ }
135
+ stream.eatWhile(/[\w\.]/);
136
+ return "number";
137
+ }
138
+ if (isOperator.test(ch)) {
139
+ return "operator apl-" + builtInOps[ch];
140
+ }
141
+ if (isArrow.test(ch)) {
142
+ return "apl-arrow";
143
+ }
144
+ if (isFunction.test(ch)) {
145
+ funcName = "apl-";
146
+ if (builtInFuncs[ch] != null) {
147
+ if (state.prev) {
148
+ funcName += builtInFuncs[ch][1];
149
+ } else {
150
+ funcName += builtInFuncs[ch][0];
151
+ }
152
+ }
153
+ state.func = true;
154
+ state.prev = false;
155
+ return "function " + funcName;
156
+ }
157
+ if (isComment.test(ch)) {
158
+ stream.skipToEnd();
159
+ return "comment";
160
+ }
161
+ if (ch === "∘" && stream.peek() === ".") {
162
+ stream.next();
163
+ return "function jot-dot";
164
+ }
165
+ stream.eatWhile(/[\w\$_]/);
166
+ word = stream.current();
167
+ state.prev = true;
168
+ return "keyword";
169
+ }
170
+ };
171
+ });
172
+
173
+ CodeMirror.defineMIME("text/apl", "apl");
174
+
175
+ });
@@ -0,0 +1,198 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ /*
5
+ * =====================================================================================
6
+ *
7
+ * Filename: mode/asterisk/asterisk.js
8
+ *
9
+ * Description: CodeMirror mode for Asterisk dialplan
10
+ *
11
+ * Created: 05/17/2012 09:20:25 PM
12
+ * Revision: none
13
+ *
14
+ * Author: Stas Kobzar (stas@modulis.ca),
15
+ * Company: Modulis.ca Inc.
16
+ *
17
+ * =====================================================================================
18
+ */
19
+
20
+ (function(mod) {
21
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
22
+ mod(require("../../lib/codemirror"));
23
+ else if (typeof define == "function" && define.amd) // AMD
24
+ define(["../../lib/codemirror"], mod);
25
+ else // Plain browser env
26
+ mod(CodeMirror);
27
+ })(function(CodeMirror) {
28
+ "use strict";
29
+
30
+ CodeMirror.defineMode("asterisk", function() {
31
+ var atoms = ["exten", "same", "include","ignorepat","switch"],
32
+ dpcmd = ["#include","#exec"],
33
+ apps = [
34
+ "addqueuemember","adsiprog","aelsub","agentlogin","agentmonitoroutgoing","agi",
35
+ "alarmreceiver","amd","answer","authenticate","background","backgrounddetect",
36
+ "bridge","busy","callcompletioncancel","callcompletionrequest","celgenuserevent",
37
+ "changemonitor","chanisavail","channelredirect","chanspy","clearhash","confbridge",
38
+ "congestion","continuewhile","controlplayback","dahdiacceptr2call","dahdibarge",
39
+ "dahdiras","dahdiscan","dahdisendcallreroutingfacility","dahdisendkeypadfacility",
40
+ "datetime","dbdel","dbdeltree","deadagi","dial","dictate","directory","disa",
41
+ "dumpchan","eagi","echo","endwhile","exec","execif","execiftime","exitwhile","extenspy",
42
+ "externalivr","festival","flash","followme","forkcdr","getcpeid","gosub","gosubif",
43
+ "goto","gotoif","gotoiftime","hangup","iax2provision","ices","importvar","incomplete",
44
+ "ivrdemo","jabberjoin","jabberleave","jabbersend","jabbersendgroup","jabberstatus",
45
+ "jack","log","macro","macroexclusive","macroexit","macroif","mailboxexists","meetme",
46
+ "meetmeadmin","meetmechanneladmin","meetmecount","milliwatt","minivmaccmess","minivmdelete",
47
+ "minivmgreet","minivmmwi","minivmnotify","minivmrecord","mixmonitor","monitor","morsecode",
48
+ "mp3player","mset","musiconhold","nbscat","nocdr","noop","odbc","odbc","odbcfinish",
49
+ "originate","ospauth","ospfinish","osplookup","ospnext","page","park","parkandannounce",
50
+ "parkedcall","pausemonitor","pausequeuemember","pickup","pickupchan","playback","playtones",
51
+ "privacymanager","proceeding","progress","queue","queuelog","raiseexception","read","readexten",
52
+ "readfile","receivefax","receivefax","receivefax","record","removequeuemember",
53
+ "resetcdr","retrydial","return","ringing","sayalpha","saycountedadj","saycountednoun",
54
+ "saycountpl","saydigits","saynumber","sayphonetic","sayunixtime","senddtmf","sendfax",
55
+ "sendfax","sendfax","sendimage","sendtext","sendurl","set","setamaflags",
56
+ "setcallerpres","setmusiconhold","sipaddheader","sipdtmfmode","sipremoveheader","skel",
57
+ "slastation","slatrunk","sms","softhangup","speechactivategrammar","speechbackground",
58
+ "speechcreate","speechdeactivategrammar","speechdestroy","speechloadgrammar","speechprocessingsound",
59
+ "speechstart","speechunloadgrammar","stackpop","startmusiconhold","stopmixmonitor","stopmonitor",
60
+ "stopmusiconhold","stopplaytones","system","testclient","testserver","transfer","tryexec",
61
+ "trysystem","unpausemonitor","unpausequeuemember","userevent","verbose","vmauthenticate",
62
+ "vmsayname","voicemail","voicemailmain","wait","waitexten","waitfornoise","waitforring",
63
+ "waitforsilence","waitmusiconhold","waituntil","while","zapateller"
64
+ ];
65
+
66
+ function basicToken(stream,state){
67
+ var cur = '';
68
+ var ch = '';
69
+ ch = stream.next();
70
+ // comment
71
+ if(ch == ";") {
72
+ stream.skipToEnd();
73
+ return "comment";
74
+ }
75
+ // context
76
+ if(ch == '[') {
77
+ stream.skipTo(']');
78
+ stream.eat(']');
79
+ return "header";
80
+ }
81
+ // string
82
+ if(ch == '"') {
83
+ stream.skipTo('"');
84
+ return "string";
85
+ }
86
+ if(ch == "'") {
87
+ stream.skipTo("'");
88
+ return "string-2";
89
+ }
90
+ // dialplan commands
91
+ if(ch == '#') {
92
+ stream.eatWhile(/\w/);
93
+ cur = stream.current();
94
+ if(dpcmd.indexOf(cur) !== -1) {
95
+ stream.skipToEnd();
96
+ return "strong";
97
+ }
98
+ }
99
+ // application args
100
+ if(ch == '$'){
101
+ var ch1 = stream.peek();
102
+ if(ch1 == '{'){
103
+ stream.skipTo('}');
104
+ stream.eat('}');
105
+ return "variable-3";
106
+ }
107
+ }
108
+ // extension
109
+ stream.eatWhile(/\w/);
110
+ cur = stream.current();
111
+ if(atoms.indexOf(cur) !== -1) {
112
+ state.extenStart = true;
113
+ switch(cur) {
114
+ case 'same': state.extenSame = true; break;
115
+ case 'include':
116
+ case 'switch':
117
+ case 'ignorepat':
118
+ state.extenInclude = true;break;
119
+ default:break;
120
+ }
121
+ return "atom";
122
+ }
123
+ }
124
+
125
+ return {
126
+ startState: function() {
127
+ return {
128
+ extenStart: false,
129
+ extenSame: false,
130
+ extenInclude: false,
131
+ extenExten: false,
132
+ extenPriority: false,
133
+ extenApplication: false
134
+ };
135
+ },
136
+ token: function(stream, state) {
137
+
138
+ var cur = '';
139
+ var ch = '';
140
+ if(stream.eatSpace()) return null;
141
+ // extension started
142
+ if(state.extenStart){
143
+ stream.eatWhile(/[^\s]/);
144
+ cur = stream.current();
145
+ if(/^=>?$/.test(cur)){
146
+ state.extenExten = true;
147
+ state.extenStart = false;
148
+ return "strong";
149
+ } else {
150
+ state.extenStart = false;
151
+ stream.skipToEnd();
152
+ return "error";
153
+ }
154
+ } else if(state.extenExten) {
155
+ // set exten and priority
156
+ state.extenExten = false;
157
+ state.extenPriority = true;
158
+ stream.eatWhile(/[^,]/);
159
+ if(state.extenInclude) {
160
+ stream.skipToEnd();
161
+ state.extenPriority = false;
162
+ state.extenInclude = false;
163
+ }
164
+ if(state.extenSame) {
165
+ state.extenPriority = false;
166
+ state.extenSame = false;
167
+ state.extenApplication = true;
168
+ }
169
+ return "tag";
170
+ } else if(state.extenPriority) {
171
+ state.extenPriority = false;
172
+ state.extenApplication = true;
173
+ ch = stream.next(); // get comma
174
+ if(state.extenSame) return null;
175
+ stream.eatWhile(/[^,]/);
176
+ return "number";
177
+ } else if(state.extenApplication) {
178
+ stream.eatWhile(/,/);
179
+ cur = stream.current();
180
+ if(cur === ',') return null;
181
+ stream.eatWhile(/\w/);
182
+ cur = stream.current().toLowerCase();
183
+ state.extenApplication = false;
184
+ if(apps.indexOf(cur) !== -1){
185
+ return "def strong";
186
+ }
187
+ } else{
188
+ return basicToken(stream,state);
189
+ }
190
+
191
+ return null;
192
+ }
193
+ };
194
+ });
195
+
196
+ CodeMirror.defineMIME("text/x-asterisk", "asterisk");
197
+
198
+ });
@@ -0,0 +1,489 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ CodeMirror.defineMode("clike", function(config, parserConfig) {
15
+ var indentUnit = config.indentUnit,
16
+ statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
17
+ dontAlignCalls = parserConfig.dontAlignCalls,
18
+ keywords = parserConfig.keywords || {},
19
+ builtin = parserConfig.builtin || {},
20
+ blockKeywords = parserConfig.blockKeywords || {},
21
+ atoms = parserConfig.atoms || {},
22
+ hooks = parserConfig.hooks || {},
23
+ multiLineStrings = parserConfig.multiLineStrings,
24
+ indentStatements = parserConfig.indentStatements !== false;
25
+ var isOperatorChar = /[+\-*&%=<>!?|\/]/;
26
+
27
+ var curPunc;
28
+
29
+ function tokenBase(stream, state) {
30
+ var ch = stream.next();
31
+ if (hooks[ch]) {
32
+ var result = hooks[ch](stream, state);
33
+ if (result !== false) return result;
34
+ }
35
+ if (ch == '"' || ch == "'") {
36
+ state.tokenize = tokenString(ch);
37
+ return state.tokenize(stream, state);
38
+ }
39
+ if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
40
+ curPunc = ch;
41
+ return null;
42
+ }
43
+ if (/\d/.test(ch)) {
44
+ stream.eatWhile(/[\w\.]/);
45
+ return "number";
46
+ }
47
+ if (ch == "/") {
48
+ if (stream.eat("*")) {
49
+ state.tokenize = tokenComment;
50
+ return tokenComment(stream, state);
51
+ }
52
+ if (stream.eat("/")) {
53
+ stream.skipToEnd();
54
+ return "comment";
55
+ }
56
+ }
57
+ if (isOperatorChar.test(ch)) {
58
+ stream.eatWhile(isOperatorChar);
59
+ return "operator";
60
+ }
61
+ stream.eatWhile(/[\w\$_\xa1-\uffff]/);
62
+ var cur = stream.current();
63
+ if (keywords.propertyIsEnumerable(cur)) {
64
+ if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
65
+ return "keyword";
66
+ }
67
+ if (builtin.propertyIsEnumerable(cur)) {
68
+ if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
69
+ return "builtin";
70
+ }
71
+ if (atoms.propertyIsEnumerable(cur)) return "atom";
72
+ return "variable";
73
+ }
74
+
75
+ function tokenString(quote) {
76
+ return function(stream, state) {
77
+ var escaped = false, next, end = false;
78
+ while ((next = stream.next()) != null) {
79
+ if (next == quote && !escaped) {end = true; break;}
80
+ escaped = !escaped && next == "\\";
81
+ }
82
+ if (end || !(escaped || multiLineStrings))
83
+ state.tokenize = null;
84
+ return "string";
85
+ };
86
+ }
87
+
88
+ function tokenComment(stream, state) {
89
+ var maybeEnd = false, ch;
90
+ while (ch = stream.next()) {
91
+ if (ch == "/" && maybeEnd) {
92
+ state.tokenize = null;
93
+ break;
94
+ }
95
+ maybeEnd = (ch == "*");
96
+ }
97
+ return "comment";
98
+ }
99
+
100
+ function Context(indented, column, type, align, prev) {
101
+ this.indented = indented;
102
+ this.column = column;
103
+ this.type = type;
104
+ this.align = align;
105
+ this.prev = prev;
106
+ }
107
+ function pushContext(state, col, type) {
108
+ var indent = state.indented;
109
+ if (state.context && state.context.type == "statement")
110
+ indent = state.context.indented;
111
+ return state.context = new Context(indent, col, type, null, state.context);
112
+ }
113
+ function popContext(state) {
114
+ var t = state.context.type;
115
+ if (t == ")" || t == "]" || t == "}")
116
+ state.indented = state.context.indented;
117
+ return state.context = state.context.prev;
118
+ }
119
+
120
+ // Interface
121
+
122
+ return {
123
+ startState: function(basecolumn) {
124
+ return {
125
+ tokenize: null,
126
+ context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
127
+ indented: 0,
128
+ startOfLine: true
129
+ };
130
+ },
131
+
132
+ token: function(stream, state) {
133
+ var ctx = state.context;
134
+ if (stream.sol()) {
135
+ if (ctx.align == null) ctx.align = false;
136
+ state.indented = stream.indentation();
137
+ state.startOfLine = true;
138
+ }
139
+ if (stream.eatSpace()) return null;
140
+ curPunc = null;
141
+ var style = (state.tokenize || tokenBase)(stream, state);
142
+ if (style == "comment" || style == "meta") return style;
143
+ if (ctx.align == null) ctx.align = true;
144
+
145
+ if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state);
146
+ else if (curPunc == "{") pushContext(state, stream.column(), "}");
147
+ else if (curPunc == "[") pushContext(state, stream.column(), "]");
148
+ else if (curPunc == "(") pushContext(state, stream.column(), ")");
149
+ else if (curPunc == "}") {
150
+ while (ctx.type == "statement") ctx = popContext(state);
151
+ if (ctx.type == "}") ctx = popContext(state);
152
+ while (ctx.type == "statement") ctx = popContext(state);
153
+ }
154
+ else if (curPunc == ctx.type) popContext(state);
155
+ else if (indentStatements &&
156
+ (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') ||
157
+ (ctx.type == "statement" && curPunc == "newstatement")))
158
+ pushContext(state, stream.column(), "statement");
159
+ state.startOfLine = false;
160
+ return style;
161
+ },
162
+
163
+ indent: function(state, textAfter) {
164
+ if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;
165
+ var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
166
+ if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
167
+ var closing = firstChar == ctx.type;
168
+ if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit);
169
+ else if (ctx.align && (!dontAlignCalls || ctx.type != ")")) return ctx.column + (closing ? 0 : 1);
170
+ else if (ctx.type == ")" && !closing) return ctx.indented + statementIndentUnit;
171
+ else return ctx.indented + (closing ? 0 : indentUnit);
172
+ },
173
+
174
+ electricChars: "{}",
175
+ blockCommentStart: "/*",
176
+ blockCommentEnd: "*/",
177
+ lineComment: "//",
178
+ fold: "brace"
179
+ };
180
+ });
181
+
182
+ function words(str) {
183
+ var obj = {}, words = str.split(" ");
184
+ for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
185
+ return obj;
186
+ }
187
+ var cKeywords = "auto if break int case long char register continue return default short do sizeof " +
188
+ "double static else struct entry switch extern typedef float union for unsigned " +
189
+ "goto while enum void const signed volatile";
190
+
191
+ function cppHook(stream, state) {
192
+ if (!state.startOfLine) return false;
193
+ for (;;) {
194
+ if (stream.skipTo("\\")) {
195
+ stream.next();
196
+ if (stream.eol()) {
197
+ state.tokenize = cppHook;
198
+ break;
199
+ }
200
+ } else {
201
+ stream.skipToEnd();
202
+ state.tokenize = null;
203
+ break;
204
+ }
205
+ }
206
+ return "meta";
207
+ }
208
+
209
+ function cpp11StringHook(stream, state) {
210
+ stream.backUp(1);
211
+ // Raw strings.
212
+ if (stream.match(/(R|u8R|uR|UR|LR)/)) {
213
+ var match = stream.match(/"([^\s\\()]{0,16})\(/);
214
+ if (!match) {
215
+ return false;
216
+ }
217
+ state.cpp11RawStringDelim = match[1];
218
+ state.tokenize = tokenRawString;
219
+ return tokenRawString(stream, state);
220
+ }
221
+ // Unicode strings/chars.
222
+ if (stream.match(/(u8|u|U|L)/)) {
223
+ if (stream.match(/["']/, /* eat */ false)) {
224
+ return "string";
225
+ }
226
+ return false;
227
+ }
228
+ // Ignore this hook.
229
+ stream.next();
230
+ return false;
231
+ }
232
+
233
+ // C#-style strings where "" escapes a quote.
234
+ function tokenAtString(stream, state) {
235
+ var next;
236
+ while ((next = stream.next()) != null) {
237
+ if (next == '"' && !stream.eat('"')) {
238
+ state.tokenize = null;
239
+ break;
240
+ }
241
+ }
242
+ return "string";
243
+ }
244
+
245
+ // C++11 raw string literal is <prefix>"<delim>( anything )<delim>", where
246
+ // <delim> can be a string up to 16 characters long.
247
+ function tokenRawString(stream, state) {
248
+ // Escape characters that have special regex meanings.
249
+ var delim = state.cpp11RawStringDelim.replace(/[^\w\s]/g, '\\$&');
250
+ var match = stream.match(new RegExp(".*?\\)" + delim + '"'));
251
+ if (match)
252
+ state.tokenize = null;
253
+ else
254
+ stream.skipToEnd();
255
+ return "string";
256
+ }
257
+
258
+ function def(mimes, mode) {
259
+ if (typeof mimes == "string") mimes = [mimes];
260
+ var words = [];
261
+ function add(obj) {
262
+ if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop))
263
+ words.push(prop);
264
+ }
265
+ add(mode.keywords);
266
+ add(mode.builtin);
267
+ add(mode.atoms);
268
+ if (words.length) {
269
+ mode.helperType = mimes[0];
270
+ CodeMirror.registerHelper("hintWords", mimes[0], words);
271
+ }
272
+
273
+ for (var i = 0; i < mimes.length; ++i)
274
+ CodeMirror.defineMIME(mimes[i], mode);
275
+ }
276
+
277
+ def(["text/x-csrc", "text/x-c", "text/x-chdr"], {
278
+ name: "clike",
279
+ keywords: words(cKeywords),
280
+ blockKeywords: words("case do else for if switch while struct"),
281
+ atoms: words("null"),
282
+ hooks: {"#": cppHook},
283
+ modeProps: {fold: ["brace", "include"]}
284
+ });
285
+
286
+ def(["text/x-c++src", "text/x-c++hdr"], {
287
+ name: "clike",
288
+ keywords: words(cKeywords + " asm dynamic_cast namespace reinterpret_cast try bool explicit new " +
289
+ "static_cast typeid catch operator template typename class friend private " +
290
+ "this using const_cast inline public throw virtual delete mutable protected " +
291
+ "wchar_t alignas alignof constexpr decltype nullptr noexcept thread_local final " +
292
+ "static_assert override"),
293
+ blockKeywords: words("catch class do else finally for if struct switch try while"),
294
+ atoms: words("true false null"),
295
+ hooks: {
296
+ "#": cppHook,
297
+ "u": cpp11StringHook,
298
+ "U": cpp11StringHook,
299
+ "L": cpp11StringHook,
300
+ "R": cpp11StringHook
301
+ },
302
+ modeProps: {fold: ["brace", "include"]}
303
+ });
304
+
305
+ def("text/x-java", {
306
+ name: "clike",
307
+ keywords: words("abstract assert boolean break byte case catch char class const continue default " +
308
+ "do double else enum extends final finally float for goto if implements import " +
309
+ "instanceof int interface long native new package private protected public " +
310
+ "return short static strictfp super switch synchronized this throw throws transient " +
311
+ "try void volatile while"),
312
+ blockKeywords: words("catch class do else finally for if switch try while"),
313
+ atoms: words("true false null"),
314
+ hooks: {
315
+ "@": function(stream) {
316
+ stream.eatWhile(/[\w\$_]/);
317
+ return "meta";
318
+ }
319
+ },
320
+ modeProps: {fold: ["brace", "import"]}
321
+ });
322
+
323
+ def("text/x-csharp", {
324
+ name: "clike",
325
+ keywords: words("abstract as base break case catch checked class const continue" +
326
+ " default delegate do else enum event explicit extern finally fixed for" +
327
+ " foreach goto if implicit in interface internal is lock namespace new" +
328
+ " operator out override params private protected public readonly ref return sealed" +
329
+ " sizeof stackalloc static struct switch this throw try typeof unchecked" +
330
+ " unsafe using virtual void volatile while add alias ascending descending dynamic from get" +
331
+ " global group into join let orderby partial remove select set value var yield"),
332
+ blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
333
+ builtin: words("Boolean Byte Char DateTime DateTimeOffset Decimal Double" +
334
+ " Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32" +
335
+ " UInt64 bool byte char decimal double short int long object" +
336
+ " sbyte float string ushort uint ulong"),
337
+ atoms: words("true false null"),
338
+ hooks: {
339
+ "@": function(stream, state) {
340
+ if (stream.eat('"')) {
341
+ state.tokenize = tokenAtString;
342
+ return tokenAtString(stream, state);
343
+ }
344
+ stream.eatWhile(/[\w\$_]/);
345
+ return "meta";
346
+ }
347
+ }
348
+ });
349
+
350
+ function tokenTripleString(stream, state) {
351
+ var escaped = false;
352
+ while (!stream.eol()) {
353
+ if (!escaped && stream.match('"""')) {
354
+ state.tokenize = null;
355
+ break;
356
+ }
357
+ escaped = stream.next() != "\\" && !escaped;
358
+ }
359
+ return "string";
360
+ }
361
+
362
+ def("text/x-scala", {
363
+ name: "clike",
364
+ keywords: words(
365
+
366
+ /* scala */
367
+ "abstract case catch class def do else extends false final finally for forSome if " +
368
+ "implicit import lazy match new null object override package private protected return " +
369
+ "sealed super this throw trait try trye type val var while with yield _ : = => <- <: " +
370
+ "<% >: # @ " +
371
+
372
+ /* package scala */
373
+ "assert assume require print println printf readLine readBoolean readByte readShort " +
374
+ "readChar readInt readLong readFloat readDouble " +
375
+
376
+ "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
377
+ "Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable " +
378
+ "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
379
+ "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
380
+ "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: " +
381
+
382
+ /* package java.lang */
383
+ "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
384
+ "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
385
+ "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
386
+ "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
387
+ ),
388
+ multiLineStrings: true,
389
+ blockKeywords: words("catch class do else finally for forSome if match switch try while"),
390
+ atoms: words("true false null"),
391
+ indentStatements: false,
392
+ hooks: {
393
+ "@": function(stream) {
394
+ stream.eatWhile(/[\w\$_]/);
395
+ return "meta";
396
+ },
397
+ '"': function(stream, state) {
398
+ if (!stream.match('""')) return false;
399
+ state.tokenize = tokenTripleString;
400
+ return state.tokenize(stream, state);
401
+ }
402
+ }
403
+ });
404
+
405
+ def(["x-shader/x-vertex", "x-shader/x-fragment"], {
406
+ name: "clike",
407
+ keywords: words("float int bool void " +
408
+ "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " +
409
+ "mat2 mat3 mat4 " +
410
+ "sampler1D sampler2D sampler3D samplerCube " +
411
+ "sampler1DShadow sampler2DShadow" +
412
+ "const attribute uniform varying " +
413
+ "break continue discard return " +
414
+ "for while do if else struct " +
415
+ "in out inout"),
416
+ blockKeywords: words("for while do if else struct"),
417
+ builtin: words("radians degrees sin cos tan asin acos atan " +
418
+ "pow exp log exp2 sqrt inversesqrt " +
419
+ "abs sign floor ceil fract mod min max clamp mix step smootstep " +
420
+ "length distance dot cross normalize ftransform faceforward " +
421
+ "reflect refract matrixCompMult " +
422
+ "lessThan lessThanEqual greaterThan greaterThanEqual " +
423
+ "equal notEqual any all not " +
424
+ "texture1D texture1DProj texture1DLod texture1DProjLod " +
425
+ "texture2D texture2DProj texture2DLod texture2DProjLod " +
426
+ "texture3D texture3DProj texture3DLod texture3DProjLod " +
427
+ "textureCube textureCubeLod " +
428
+ "shadow1D shadow2D shadow1DProj shadow2DProj " +
429
+ "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " +
430
+ "dFdx dFdy fwidth " +
431
+ "noise1 noise2 noise3 noise4"),
432
+ atoms: words("true false " +
433
+ "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " +
434
+ "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " +
435
+ "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " +
436
+ "gl_FogCoord " +
437
+ "gl_Position gl_PointSize gl_ClipVertex " +
438
+ "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " +
439
+ "gl_TexCoord gl_FogFragCoord " +
440
+ "gl_FragCoord gl_FrontFacing " +
441
+ "gl_FragColor gl_FragData gl_FragDepth " +
442
+ "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " +
443
+ "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " +
444
+ "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " +
445
+ "gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose " +
446
+ "gl_ProjectionMatrixInverseTranspose " +
447
+ "gl_ModelViewProjectionMatrixInverseTranspose " +
448
+ "gl_TextureMatrixInverseTranspose " +
449
+ "gl_NormalScale gl_DepthRange gl_ClipPlane " +
450
+ "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " +
451
+ "gl_FrontLightModelProduct gl_BackLightModelProduct " +
452
+ "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " +
453
+ "gl_FogParameters " +
454
+ "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " +
455
+ "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " +
456
+ "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " +
457
+ "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " +
458
+ "gl_MaxDrawBuffers"),
459
+ hooks: {"#": cppHook},
460
+ modeProps: {fold: ["brace", "include"]}
461
+ });
462
+
463
+ def("text/x-nesc", {
464
+ name: "clike",
465
+ keywords: words(cKeywords + "as atomic async call command component components configuration event generic " +
466
+ "implementation includes interface module new norace nx_struct nx_union post provides " +
467
+ "signal task uses abstract extends"),
468
+ blockKeywords: words("case do else for if switch while struct"),
469
+ atoms: words("null"),
470
+ hooks: {"#": cppHook},
471
+ modeProps: {fold: ["brace", "include"]}
472
+ });
473
+
474
+ def("text/x-objectivec", {
475
+ name: "clike",
476
+ keywords: words(cKeywords + "inline restrict _Bool _Complex _Imaginery BOOL Class bycopy byref id IMP in " +
477
+ "inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),
478
+ atoms: words("YES NO NULL NILL ON OFF"),
479
+ hooks: {
480
+ "@": function(stream) {
481
+ stream.eatWhile(/[\w\$]/);
482
+ return "keyword";
483
+ },
484
+ "#": cppHook
485
+ },
486
+ modeProps: {fold: "brace"}
487
+ });
488
+
489
+ });