ace-rails-ap 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1 -1
  3. data/lib/ace/rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/ace/ace.js +6911 -5290
  5. data/vendor/assets/javascripts/ace/ext-chromevox.js +537 -0
  6. data/vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js +301 -0
  7. data/vendor/assets/javascripts/ace/ext-emmet.js +1109 -0
  8. data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +207 -0
  9. data/vendor/assets/javascripts/ace/ext-language_tools.js +1665 -0
  10. data/vendor/assets/javascripts/ace/ext-modelist.js +168 -0
  11. data/vendor/assets/javascripts/ace/ext-old_ie.js +500 -0
  12. data/vendor/assets/javascripts/ace/ext-options.js +252 -0
  13. data/vendor/assets/javascripts/ace/ext-searchbox.js +421 -0
  14. data/vendor/assets/javascripts/ace/ext-settings_menu.js +632 -0
  15. data/vendor/assets/javascripts/ace/ext-spellcheck.js +68 -0
  16. data/vendor/assets/javascripts/ace/ext-split.js +271 -0
  17. data/vendor/assets/javascripts/ace/ext-static_highlight.js +178 -0
  18. data/vendor/assets/javascripts/ace/ext-statusbar.js +47 -0
  19. data/vendor/assets/javascripts/ace/ext-textarea.js +478 -0
  20. data/vendor/assets/javascripts/ace/ext-themelist.js +86 -0
  21. data/vendor/assets/javascripts/ace/ext-whitespace.js +206 -0
  22. data/vendor/assets/javascripts/ace/keybinding-emacs.js +822 -131
  23. data/vendor/assets/javascripts/ace/keybinding-vim.js +382 -258
  24. data/vendor/assets/javascripts/ace/mode-abap.js +261 -0
  25. data/vendor/assets/javascripts/ace/mode-actionscript.js +257 -0
  26. data/vendor/assets/javascripts/ace/mode-ada.js +118 -0
  27. data/vendor/assets/javascripts/ace/mode-asciidoc.js +373 -0
  28. data/vendor/assets/javascripts/ace/mode-assembly_x86.js +217 -0
  29. data/vendor/assets/javascripts/ace/mode-autohotkey.js +225 -0
  30. data/vendor/assets/javascripts/ace/mode-batchfile.js +213 -0
  31. data/vendor/assets/javascripts/ace/mode-c9search.js +144 -124
  32. data/vendor/assets/javascripts/ace/mode-c_cpp.js +296 -254
  33. data/vendor/assets/javascripts/ace/mode-clojure.js +113 -177
  34. data/vendor/assets/javascripts/ace/mode-cobol.js +125 -0
  35. data/vendor/assets/javascripts/ace/mode-coffee.js +152 -235
  36. data/vendor/assets/javascripts/ace/mode-coldfusion.js +823 -835
  37. data/vendor/assets/javascripts/ace/mode-csharp.js +325 -187
  38. data/vendor/assets/javascripts/ace/mode-css.js +583 -297
  39. data/vendor/assets/javascripts/ace/mode-curly.js +2423 -0
  40. data/vendor/assets/javascripts/ace/mode-d.js +492 -0
  41. data/vendor/assets/javascripts/ace/mode-dart.js +993 -0
  42. data/vendor/assets/javascripts/ace/mode-diff.js +124 -204
  43. data/vendor/assets/javascripts/ace/mode-django.js +2448 -0
  44. data/vendor/assets/javascripts/ace/mode-dot.js +361 -0
  45. data/vendor/assets/javascripts/ace/mode-ejs.js +2817 -0
  46. data/vendor/assets/javascripts/ace/mode-erlang.js +987 -0
  47. data/vendor/assets/javascripts/ace/mode-forth.js +280 -0
  48. data/vendor/assets/javascripts/ace/mode-ftl.js +1061 -0
  49. data/vendor/assets/javascripts/ace/mode-glsl.js +313 -275
  50. data/vendor/assets/javascripts/ace/mode-golang.js +268 -275
  51. data/vendor/assets/javascripts/ace/mode-groovy.js +347 -492
  52. data/vendor/assets/javascripts/ace/mode-haml.js +498 -0
  53. data/vendor/assets/javascripts/ace/mode-handlebars.js +2433 -0
  54. data/vendor/assets/javascripts/ace/mode-haskell.js +362 -0
  55. data/vendor/assets/javascripts/ace/mode-haxe.js +226 -202
  56. data/vendor/assets/javascripts/ace/mode-html.js +1099 -802
  57. data/vendor/assets/javascripts/ace/mode-html_completions.js +309 -0
  58. data/vendor/assets/javascripts/ace/mode-html_ruby.js +2822 -0
  59. data/vendor/assets/javascripts/ace/mode-ini.js +185 -0
  60. data/vendor/assets/javascripts/ace/mode-jack.js +653 -0
  61. data/vendor/assets/javascripts/ace/mode-jade.js +2081 -0
  62. data/vendor/assets/javascripts/ace/mode-java.js +339 -488
  63. data/vendor/assets/javascripts/ace/mode-javascript.js +342 -478
  64. data/vendor/assets/javascripts/ace/mode-json.js +215 -178
  65. data/vendor/assets/javascripts/ace/mode-jsoniq.js +2761 -0
  66. data/vendor/assets/javascripts/ace/mode-jsp.js +1553 -0
  67. data/vendor/assets/javascripts/ace/mode-jsx.js +325 -289
  68. data/vendor/assets/javascripts/ace/mode-julia.js +286 -0
  69. data/vendor/assets/javascripts/ace/mode-latex.js +141 -46
  70. data/vendor/assets/javascripts/ace/mode-less.js +493 -151
  71. data/vendor/assets/javascripts/ace/mode-liquid.js +594 -656
  72. data/vendor/assets/javascripts/ace/mode-lisp.js +137 -0
  73. data/vendor/assets/javascripts/ace/mode-livescript.js +288 -0
  74. data/vendor/assets/javascripts/ace/mode-logiql.js +669 -0
  75. data/vendor/assets/javascripts/ace/mode-lsl.js +890 -0
  76. data/vendor/assets/javascripts/ace/mode-lua.js +274 -368
  77. data/vendor/assets/javascripts/ace/mode-luapage.js +1331 -1107
  78. data/vendor/assets/javascripts/ace/mode-lucene.js +64 -0
  79. data/vendor/assets/javascripts/ace/mode-makefile.js +332 -0
  80. data/vendor/assets/javascripts/ace/mode-markdown.js +1303 -948
  81. data/vendor/assets/javascripts/ace/mode-matlab.js +230 -0
  82. data/vendor/assets/javascripts/ace/mode-mushcode.js +705 -0
  83. data/vendor/assets/javascripts/ace/mode-mushcode_high_rules.js +569 -0
  84. data/vendor/assets/javascripts/ace/mode-mysql.js +185 -0
  85. data/vendor/assets/javascripts/ace/mode-nix.js +935 -0
  86. data/vendor/assets/javascripts/ace/mode-objectivec.js +699 -0
  87. data/vendor/assets/javascripts/ace/mode-ocaml.js +44 -63
  88. data/vendor/assets/javascripts/ace/mode-pascal.js +233 -0
  89. data/vendor/assets/javascripts/ace/mode-perl.js +116 -189
  90. data/vendor/assets/javascripts/ace/mode-pgsql.js +886 -500
  91. data/vendor/assets/javascripts/ace/mode-php.js +1158 -380
  92. data/vendor/assets/javascripts/ace/mode-plain_text.js +56 -0
  93. data/vendor/assets/javascripts/ace/mode-powershell.js +222 -167
  94. data/vendor/assets/javascripts/ace/mode-prolog.js +354 -0
  95. data/vendor/assets/javascripts/ace/mode-properties.js +100 -0
  96. data/vendor/assets/javascripts/ace/mode-protobuf.js +885 -0
  97. data/vendor/assets/javascripts/ace/mode-python.js +99 -201
  98. data/vendor/assets/javascripts/ace/mode-r.js +337 -0
  99. data/vendor/assets/javascripts/ace/mode-rdoc.js +210 -0
  100. data/vendor/assets/javascripts/ace/mode-rhtml.js +2663 -0
  101. data/vendor/assets/javascripts/ace/mode-ruby.js +262 -136
  102. data/vendor/assets/javascripts/ace/mode-rust.js +245 -0
  103. data/vendor/assets/javascripts/ace/mode-sass.js +443 -0
  104. data/vendor/assets/javascripts/ace/mode-scad.js +225 -240
  105. data/vendor/assets/javascripts/ace/mode-scala.js +340 -494
  106. data/vendor/assets/javascripts/ace/mode-scheme.js +143 -0
  107. data/vendor/assets/javascripts/ace/mode-scss.js +499 -157
  108. data/vendor/assets/javascripts/ace/mode-sh.js +180 -110
  109. data/vendor/assets/javascripts/ace/mode-sjs.js +1154 -0
  110. data/vendor/assets/javascripts/ace/mode-snippets.js +198 -0
  111. data/vendor/assets/javascripts/ace/mode-soy_template.js +2707 -0
  112. data/vendor/assets/javascripts/ace/mode-space.js +160 -0
  113. data/vendor/assets/javascripts/ace/mode-sql.js +48 -69
  114. data/vendor/assets/javascripts/ace/mode-stylus.js +447 -0
  115. data/vendor/assets/javascripts/ace/mode-svg.js +552 -605
  116. data/vendor/assets/javascripts/ace/mode-tcl.js +139 -98
  117. data/vendor/assets/javascripts/ace/mode-tex.js +187 -0
  118. data/vendor/assets/javascripts/ace/mode-textile.js +29 -40
  119. data/vendor/assets/javascripts/ace/mode-tmsnippet.js +200 -0
  120. data/vendor/assets/javascripts/ace/mode-toml.js +177 -0
  121. data/vendor/assets/javascripts/ace/mode-twig.js +2228 -0
  122. data/vendor/assets/javascripts/ace/mode-typescript.js +1018 -0
  123. data/vendor/assets/javascripts/ace/mode-vbscript.js +250 -0
  124. data/vendor/assets/javascripts/ace/mode-velocity.js +1621 -0
  125. data/vendor/assets/javascripts/ace/mode-verilog.js +127 -0
  126. data/vendor/assets/javascripts/ace/mode-vhdl.js +139 -0
  127. data/vendor/assets/javascripts/ace/mode-xml.js +350 -242
  128. data/vendor/assets/javascripts/ace/mode-xquery.js +2490 -300
  129. data/vendor/assets/javascripts/ace/mode-yaml.js +146 -45
  130. data/vendor/assets/javascripts/ace/theme-ambiance.js +202 -0
  131. data/vendor/assets/javascripts/ace/theme-chaos.js +179 -0
  132. data/vendor/assets/javascripts/ace/theme-chrome.js +97 -153
  133. data/vendor/assets/javascripts/ace/theme-clouds.js +78 -119
  134. data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +79 -120
  135. data/vendor/assets/javascripts/ace/theme-cobalt.js +89 -140
  136. data/vendor/assets/javascripts/ace/theme-crimson_editor.js +93 -145
  137. data/vendor/assets/javascripts/ace/theme-dawn.js +84 -143
  138. data/vendor/assets/javascripts/ace/theme-dreamweaver.js +99 -162
  139. data/vendor/assets/javascripts/ace/theme-eclipse.js +78 -111
  140. data/vendor/assets/javascripts/ace/theme-github.js +70 -121
  141. data/vendor/assets/javascripts/ace/theme-idle_fingers.js +75 -134
  142. data/vendor/assets/javascripts/ace/theme-kr.js +135 -0
  143. data/vendor/assets/javascripts/ace/theme-merbivore.js +80 -143
  144. data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +81 -149
  145. data/vendor/assets/javascripts/ace/theme-mono_industrial.js +87 -146
  146. data/vendor/assets/javascripts/ace/theme-monokai.js +88 -146
  147. data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +82 -142
  148. data/vendor/assets/javascripts/ace/theme-solarized_dark.js +83 -144
  149. data/vendor/assets/javascripts/ace/theme-solarized_light.js +76 -133
  150. data/vendor/assets/javascripts/ace/theme-terminal.js +145 -0
  151. data/vendor/assets/javascripts/ace/theme-textmate.js +101 -158
  152. data/vendor/assets/javascripts/ace/theme-tomorrow.js +89 -163
  153. data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +89 -163
  154. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +89 -165
  155. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +101 -162
  156. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +90 -160
  157. data/vendor/assets/javascripts/ace/theme-twilight.js +87 -158
  158. data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +75 -140
  159. data/vendor/assets/javascripts/ace/theme-xcode.js +120 -0
  160. data/vendor/assets/javascripts/ace/worker-coffee.js +3049 -2665
  161. data/vendor/assets/javascripts/ace/worker-css.js +1779 -4376
  162. data/vendor/assets/javascripts/ace/worker-javascript.js +8701 -9008
  163. data/vendor/assets/javascripts/ace/worker-json.js +709 -1340
  164. data/vendor/assets/javascripts/ace/worker-lua.js +3525 -0
  165. data/vendor/assets/javascripts/ace/worker-php.js +6893 -0
  166. data/vendor/assets/javascripts/ace/worker-xquery.js +19924 -64507
  167. metadata +100 -17
@@ -0,0 +1,230 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Distributed under the BSD license:
3
+ *
4
+ * Copyright (c) 2010, Ajax.org B.V.
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ * * Redistributions of source code must retain the above copyright
10
+ * notice, this list of conditions and the following disclaimer.
11
+ * * Redistributions in binary form must reproduce the above copyright
12
+ * notice, this list of conditions and the following disclaimer in the
13
+ * documentation and/or other materials provided with the distribution.
14
+ * * Neither the name of Ajax.org B.V. nor the
15
+ * names of its contributors may be used to endorse or promote products
16
+ * derived from this software without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *
29
+ * ***** END LICENSE BLOCK ***** */
30
+
31
+ define('ace/mode/matlab', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/matlab_highlight_rules', 'ace/range'], function(require, exports, module) {
32
+
33
+
34
+ var oop = require("../lib/oop");
35
+ var TextMode = require("./text").Mode;
36
+ var Tokenizer = require("../tokenizer").Tokenizer;
37
+ var MatlabHighlightRules = require("./matlab_highlight_rules").MatlabHighlightRules;
38
+ var Range = require("../range").Range;
39
+
40
+ var Mode = function() {
41
+ this.HighlightRules = MatlabHighlightRules;
42
+ };
43
+ oop.inherits(Mode, TextMode);
44
+
45
+ (function() {
46
+
47
+ this.lineCommentStart = "%";
48
+ this.blockComment = {start: "%{", end: "%}"};
49
+
50
+ this.$id = "ace/mode/matlab";
51
+ }).call(Mode.prototype);
52
+
53
+ exports.Mode = Mode;
54
+
55
+ });
56
+
57
+ define('ace/mode/matlab_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
58
+
59
+
60
+ var oop = require("../lib/oop");
61
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
62
+
63
+ var MatlabHighlightRules = function() {
64
+
65
+ var keywords = (
66
+ "break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while"
67
+ );
68
+
69
+ var builtinConstants = (
70
+ "true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout"
71
+ );
72
+
73
+ var builtinFunctions = (
74
+ "abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|"+
75
+ "airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan(?:2|d|h)?|" +
76
+ "audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|"+
77
+ "bessel(?:h|i|j|k|y)|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|"+
78
+ "bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|"+
79
+ "camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:\.(?:close|closeVar|"+
80
+ "computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|"+
81
+ "getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|"+
82
+ "getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|"+
83
+ "getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|"+
84
+ "getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|"+
85
+ "hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|"+
86
+ "renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|"+
87
+ "setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|"+
88
+ "cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|"+
89
+ "clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|"+
90
+ "commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers\.Map|contour(?:3|c|f|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|"+
91
+ "copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|"+
92
+ "cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|"+
93
+ "dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|"+
94
+ "demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|"+
95
+ "dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|"+
96
+ "erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event\.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|"+
97
+ "expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|"+
98
+ "fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|"+
99
+ "findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|"+
100
+ "frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|"+
101
+ "get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|"+
102
+ "guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|"+
103
+ "hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|"+
104
+ "hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|"+
105
+ "ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|"+
106
+ "1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|"+
107
+ "isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|"+
108
+ "isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|"+
109
+ "isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|"+
110
+ "lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|"+
111
+ "linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|"+
112
+ "lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab\.io\.MatFile|matlab\.mixin\.(?:Copyable|Heterogeneous(?:\.getDefaultScalarElement)?)|matlabrc|"+
113
+ "matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta\.(?:class(?:\.fromName)?|DynamicProperty|EnumeratedValue|event|"+
114
+ "MetaData|method|package(?:\.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:\.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|"+
115
+ "minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|"+
116
+ "multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|"+
117
+ "ncwriteschema|ndgrid|ndims|ne|NET(?:\.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|"+
118
+ "NetException|setStaticProperty))?|netcdf\.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|"+
119
+ "getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|"+
120
+ "inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|"+
121
+ "setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|"+
122
+ "ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|"+
123
+ "orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|"+
124
+ "permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|"+
125
+ "polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|"+
126
+ "PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:\.(?:create|"+
127
+ "getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|"+
128
+ "rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|"+
129
+ "restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|"+
130
+ "saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|"+
131
+ "setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|"+
132
+ "spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|"+
133
+ "str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|"+
134
+ "strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|"+
135
+ "support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|"+
136
+ "textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:\.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|"+
137
+ "transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|"+
138
+ "uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|"+
139
+ "uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|"+
140
+ "userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:\.isPlatformSupported)?|VideoWriter(?:\.getProfiles)?|"+
141
+ "view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|"+
142
+ "what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|"+
143
+ "ylabel|ylim|zeros|zip|zlabel|zlim|zoom|addedvarplot|andrewsplot|anova(?:1|2|n)|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|"+
144
+ "pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|"+
145
+ "cholcov|Classification(?:BaggedEnsemble|Discriminant(?:\.(?:fit|make|template))?|Ensemble|KNN(?:\.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|"+
146
+ "template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|"+
147
+ "controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|"+
148
+ "dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|"+
149
+ "fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:\.fit)?|geo(?:cdf|inv|mean|"+
150
+ "pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:\.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|"+
151
+ "gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|"+
152
+ "jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|"+
153
+ "LinearModel(?:\.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|"+
154
+ "mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:\.fit)?|nan(?:cov|max|mean|median|min|std|"+
155
+ "sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|"+
156
+ "nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:\.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|"+
157
+ "pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|"+
158
+ "Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|"+
159
+ "rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|template))?)|regstats|relieff|ridge|"+
160
+ "robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|"+
161
+ "statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|"+
162
+ "ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztest"+
163
+ "adapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|"+
164
+ "bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|"+
165
+ "cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|"+
166
+ "entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|"+
167
+ "getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|"+
168
+ "iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|"+
169
+ "imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|"+
170
+ "imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|"+
171
+ "imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|"+
172
+ "imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|"+
173
+ "imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|"+
174
+ "iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|"+
175
+ "isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|"+
176
+ "medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|"+
177
+ "reflect|regionprops|registration\.metric\.(?:MattesMutualInformation|MeanSquares)|registration\.optimizer\.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|"+
178
+ "rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|"+
179
+ "warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb|bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|"+
180
+ "linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog"
181
+ );
182
+ var storageType = (
183
+ "cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse"
184
+ );
185
+ var keywordMapper = this.createKeywordMapper({
186
+ "storage.type": storageType,
187
+ "support.function": builtinFunctions,
188
+ "keyword": keywords,
189
+ "constant.language": builtinConstants
190
+ }, "identifier", true);
191
+
192
+ this.$rules = {
193
+ "start" : [ {
194
+ token : "comment",
195
+ regex : "^%[^\r\n]*"
196
+ }, {
197
+ token : "string", // " string
198
+ regex : '".*?"'
199
+ }, {
200
+ token : "string", // ' string
201
+ regex : "'.*?'"
202
+ }, {
203
+ token : "constant.numeric", // float
204
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
205
+ }, {
206
+ token : keywordMapper,
207
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
208
+ }, {
209
+ token : "keyword.operator",
210
+ regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
211
+ }, {
212
+ token : "punctuation.operator",
213
+ regex : "\\?|\\:|\\,|\\;|\\."
214
+ }, {
215
+ token : "paren.lparen",
216
+ regex : "[\\(]"
217
+ }, {
218
+ token : "paren.rparen",
219
+ regex : "[\\)]"
220
+ }, {
221
+ token : "text",
222
+ regex : "\\s+"
223
+ } ]
224
+ };
225
+ };
226
+
227
+ oop.inherits(MatlabHighlightRules, TextHighlightRules);
228
+
229
+ exports.MatlabHighlightRules = MatlabHighlightRules;
230
+ });
@@ -0,0 +1,705 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Distributed under the BSD license:
3
+ *
4
+ * Copyright (c) 2010, Ajax.org B.V.
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ * * Redistributions of source code must retain the above copyright
10
+ * notice, this list of conditions and the following disclaimer.
11
+ * * Redistributions in binary form must reproduce the above copyright
12
+ * notice, this list of conditions and the following disclaimer in the
13
+ * documentation and/or other materials provided with the distribution.
14
+ * * Neither the name of Ajax.org B.V. nor the
15
+ * names of its contributors may be used to endorse or promote products
16
+ * derived from this software without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *
29
+ * ***** END LICENSE BLOCK ***** */
30
+
31
+ define('ace/mode/mushcode', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/mushcode_high_rules', 'ace/mode/folding/pythonic', 'ace/range'], function(require, exports, module) {
32
+
33
+
34
+ var oop = require("../lib/oop");
35
+ var TextMode = require("./text").Mode;
36
+ var Tokenizer = require("../tokenizer").Tokenizer;
37
+ var MushCodeRules = require("./mushcode_high_rules").MushCodeRules;
38
+ var PythonFoldMode = require("./folding/pythonic").FoldMode;
39
+ var Range = require("../range").Range;
40
+
41
+ var Mode = function() {
42
+ this.HighlightRules = MushCodeRules;
43
+ this.foldingRules = new PythonFoldMode("\\:");
44
+ };
45
+ oop.inherits(Mode, TextMode);
46
+
47
+ (function() {
48
+
49
+ this.lineCommentStart = "#";
50
+
51
+ this.getNextLineIndent = function(state, line, tab) {
52
+ var indent = this.$getIndent(line);
53
+
54
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
55
+ var tokens = tokenizedLine.tokens;
56
+
57
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
58
+ return indent;
59
+ }
60
+
61
+ if (state == "start") {
62
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
63
+ if (match) {
64
+ indent += tab;
65
+ }
66
+ }
67
+
68
+ return indent;
69
+ };
70
+
71
+ var outdents = {
72
+ "pass": 1,
73
+ "return": 1,
74
+ "raise": 1,
75
+ "break": 1,
76
+ "continue": 1
77
+ };
78
+
79
+ this.checkOutdent = function(state, line, input) {
80
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
81
+ return false;
82
+
83
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
84
+
85
+ if (!tokens)
86
+ return false;
87
+ do {
88
+ var last = tokens.pop();
89
+ } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
90
+
91
+ if (!last)
92
+ return false;
93
+
94
+ return (last.type == "keyword" && outdents[last.value]);
95
+ };
96
+
97
+ this.autoOutdent = function(state, doc, row) {
98
+
99
+ row += 1;
100
+ var indent = this.$getIndent(doc.getLine(row));
101
+ var tab = doc.getTabString();
102
+ if (indent.slice(-tab.length) == tab)
103
+ doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
104
+ };
105
+
106
+ this.$id = "ace/mode/mushcode";
107
+ }).call(Mode.prototype);
108
+
109
+ exports.Mode = Mode;
110
+ });
111
+
112
+ define('ace/mode/mushcode_high_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
113
+
114
+
115
+ var oop = require("../lib/oop");
116
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
117
+
118
+ var MushCodeRules = function() {
119
+
120
+
121
+ var keywords = (
122
+ "@if|"+
123
+ "@ifelse|"+
124
+ "@switch|"+
125
+ "@halt|"+
126
+ "@dolist|"+
127
+ "@create|"+
128
+ "@scent|"+
129
+ "@sound|"+
130
+ "@touch|"+
131
+ "@ataste|"+
132
+ "@osound|"+
133
+ "@ahear|"+
134
+ "@aahear|"+
135
+ "@amhear|"+
136
+ "@otouch|"+
137
+ "@otaste|"+
138
+ "@drop|"+
139
+ "@odrop|"+
140
+ "@adrop|"+
141
+ "@dropfail|"+
142
+ "@odropfail|"+
143
+ "@smell|"+
144
+ "@oemit|"+
145
+ "@emit|"+
146
+ "@pemit|"+
147
+ "@parent|"+
148
+ "@clone|"+
149
+ "@taste|"+
150
+ "whisper|"+
151
+ "page|"+
152
+ "say|"+
153
+ "pose|"+
154
+ "semipose|"+
155
+ "teach|"+
156
+ "touch|"+
157
+ "taste|"+
158
+ "smell|"+
159
+ "listen|"+
160
+ "look|"+
161
+ "move|"+
162
+ "go|"+
163
+ "home|"+
164
+ "follow|"+
165
+ "unfollow|"+
166
+ "desert|"+
167
+ "dismiss|"+
168
+ "@tel"
169
+ );
170
+
171
+ var builtinConstants = (
172
+ "=#0"
173
+ );
174
+
175
+ var builtinFunctions = (
176
+ "default|"+
177
+ "edefault|"+
178
+ "eval|"+
179
+ "get_eval|"+
180
+ "get|"+
181
+ "grep|"+
182
+ "grepi|"+
183
+ "hasattr|"+
184
+ "hasattrp|"+
185
+ "hasattrval|"+
186
+ "hasattrpval|"+
187
+ "lattr|"+
188
+ "nattr|"+
189
+ "poss|"+
190
+ "udefault|"+
191
+ "ufun|"+
192
+ "u|"+
193
+ "v|"+
194
+ "uldefault|"+
195
+ "xget|"+
196
+ "zfun|"+
197
+ "band|"+
198
+ "bnand|"+
199
+ "bnot|"+
200
+ "bor|"+
201
+ "bxor|"+
202
+ "shl|"+
203
+ "shr|"+
204
+ "and|"+
205
+ "cand|"+
206
+ "cor|"+
207
+ "eq|"+
208
+ "gt|"+
209
+ "gte|"+
210
+ "lt|"+
211
+ "lte|"+
212
+ "nand|"+
213
+ "neq|"+
214
+ "nor|"+
215
+ "not|"+
216
+ "or|"+
217
+ "t|"+
218
+ "xor|"+
219
+ "con|"+
220
+ "entrances|"+
221
+ "exit|"+
222
+ "followers|"+
223
+ "home|"+
224
+ "lcon|"+
225
+ "lexits|"+
226
+ "loc|"+
227
+ "locate|"+
228
+ "lparent|"+
229
+ "lsearch|"+
230
+ "next|"+
231
+ "num|"+
232
+ "owner|"+
233
+ "parent|"+
234
+ "pmatch|"+
235
+ "rloc|"+
236
+ "rnum|"+
237
+ "room|"+
238
+ "where|"+
239
+ "zone|"+
240
+ "worn|"+
241
+ "held|"+
242
+ "carried|"+
243
+ "acos|"+
244
+ "asin|"+
245
+ "atan|"+
246
+ "ceil|"+
247
+ "cos|"+
248
+ "e|"+
249
+ "exp|"+
250
+ "fdiv|"+
251
+ "fmod|"+
252
+ "floor|"+
253
+ "log|"+
254
+ "ln|"+
255
+ "pi|"+
256
+ "power|"+
257
+ "round|"+
258
+ "sin|"+
259
+ "sqrt|"+
260
+ "tan|"+
261
+ "aposs|"+
262
+ "andflags|"+
263
+ "conn|"+
264
+ "commandssent|"+
265
+ "controls|"+
266
+ "doing|"+
267
+ "elock|"+
268
+ "findable|"+
269
+ "flags|"+
270
+ "fullname|"+
271
+ "hasflag|"+
272
+ "haspower|"+
273
+ "hastype|"+
274
+ "hidden|"+
275
+ "idle|"+
276
+ "isbaker|"+
277
+ "lock|"+
278
+ "lstats|"+
279
+ "money|"+
280
+ "who|"+
281
+ "name|"+
282
+ "nearby|"+
283
+ "obj|"+
284
+ "objflags|"+
285
+ "photo|"+
286
+ "poll|"+
287
+ "powers|"+
288
+ "pendingtext|"+
289
+ "receivedtext|"+
290
+ "restarts|"+
291
+ "restarttime|"+
292
+ "subj|"+
293
+ "shortestpath|"+
294
+ "tmoney|"+
295
+ "type|"+
296
+ "visible|"+
297
+ "cat|"+
298
+ "element|"+
299
+ "elements|"+
300
+ "extract|"+
301
+ "filter|"+
302
+ "filterbool|"+
303
+ "first|"+
304
+ "foreach|"+
305
+ "fold|"+
306
+ "grab|"+
307
+ "graball|"+
308
+ "index|"+
309
+ "insert|"+
310
+ "itemize|"+
311
+ "items|"+
312
+ "iter|"+
313
+ "last|"+
314
+ "ldelete|"+
315
+ "map|"+
316
+ "match|"+
317
+ "matchall|"+
318
+ "member|"+
319
+ "mix|"+
320
+ "munge|"+
321
+ "pick|"+
322
+ "remove|"+
323
+ "replace|"+
324
+ "rest|"+
325
+ "revwords|"+
326
+ "setdiff|"+
327
+ "setinter|"+
328
+ "setunion|"+
329
+ "shuffle|"+
330
+ "sort|"+
331
+ "sortby|"+
332
+ "splice|"+
333
+ "step|"+
334
+ "wordpos|"+
335
+ "words|"+
336
+ "add|"+
337
+ "lmath|"+
338
+ "max|"+
339
+ "mean|"+
340
+ "median|"+
341
+ "min|"+
342
+ "mul|"+
343
+ "percent|"+
344
+ "sign|"+
345
+ "stddev|"+
346
+ "sub|"+
347
+ "val|"+
348
+ "bound|"+
349
+ "abs|"+
350
+ "inc|"+
351
+ "dec|"+
352
+ "dist2d|"+
353
+ "dist3d|"+
354
+ "div|"+
355
+ "floordiv|"+
356
+ "mod|"+
357
+ "modulo|"+
358
+ "remainder|"+
359
+ "vadd|"+
360
+ "vdim|"+
361
+ "vdot|"+
362
+ "vmag|"+
363
+ "vmax|"+
364
+ "vmin|"+
365
+ "vmul|"+
366
+ "vsub|"+
367
+ "vunit|"+
368
+ "regedit|"+
369
+ "regeditall|"+
370
+ "regeditalli|"+
371
+ "regediti|"+
372
+ "regmatch|"+
373
+ "regmatchi|"+
374
+ "regrab|"+
375
+ "regraball|"+
376
+ "regraballi|"+
377
+ "regrabi|"+
378
+ "regrep|"+
379
+ "regrepi|"+
380
+ "after|"+
381
+ "alphamin|"+
382
+ "alphamax|"+
383
+ "art|"+
384
+ "before|"+
385
+ "brackets|"+
386
+ "capstr|"+
387
+ "case|"+
388
+ "caseall|"+
389
+ "center|"+
390
+ "containsfansi|"+
391
+ "comp|"+
392
+ "decompose|"+
393
+ "decrypt|"+
394
+ "delete|"+
395
+ "edit|"+
396
+ "encrypt|"+
397
+ "escape|"+
398
+ "if|"+
399
+ "ifelse|"+
400
+ "lcstr|"+
401
+ "left|"+
402
+ "lit|"+
403
+ "ljust|"+
404
+ "merge|"+
405
+ "mid|"+
406
+ "ostrlen|"+
407
+ "pos|"+
408
+ "repeat|"+
409
+ "reverse|"+
410
+ "right|"+
411
+ "rjust|"+
412
+ "scramble|"+
413
+ "secure|"+
414
+ "space|"+
415
+ "spellnum|"+
416
+ "squish|"+
417
+ "strcat|"+
418
+ "strmatch|"+
419
+ "strinsert|"+
420
+ "stripansi|"+
421
+ "stripfansi|"+
422
+ "strlen|"+
423
+ "switch|"+
424
+ "switchall|"+
425
+ "table|"+
426
+ "tr|"+
427
+ "trim|"+
428
+ "ucstr|"+
429
+ "unsafe|"+
430
+ "wrap|"+
431
+ "ctitle|"+
432
+ "cwho|"+
433
+ "channels|"+
434
+ "clock|"+
435
+ "cflags|"+
436
+ "ilev|"+
437
+ "itext|"+
438
+ "inum|"+
439
+ "convsecs|"+
440
+ "convutcsecs|"+
441
+ "convtime|"+
442
+ "ctime|"+
443
+ "etimefmt|"+
444
+ "isdaylight|"+
445
+ "mtime|"+
446
+ "secs|"+
447
+ "msecs|"+
448
+ "starttime|"+
449
+ "time|"+
450
+ "timefmt|"+
451
+ "timestring|"+
452
+ "utctime|"+
453
+ "atrlock|"+
454
+ "clone|"+
455
+ "create|"+
456
+ "cook|"+
457
+ "dig|"+
458
+ "emit|"+
459
+ "lemit|"+
460
+ "link|"+
461
+ "oemit|"+
462
+ "open|"+
463
+ "pemit|"+
464
+ "remit|"+
465
+ "set|"+
466
+ "tel|"+
467
+ "wipe|"+
468
+ "zemit|"+
469
+ "fbcreate|"+
470
+ "fbdestroy|"+
471
+ "fbwrite|"+
472
+ "fbclear|"+
473
+ "fbcopy|"+
474
+ "fbcopyto|"+
475
+ "fbclip|"+
476
+ "fbdump|"+
477
+ "fbflush|"+
478
+ "fbhset|"+
479
+ "fblist|"+
480
+ "fbstats|"+
481
+ "qentries|"+
482
+ "qentry|"+
483
+ "play|"+
484
+ "ansi|"+
485
+ "break|"+
486
+ "c|"+
487
+ "asc|"+
488
+ "die|"+
489
+ "isdbref|"+
490
+ "isint|"+
491
+ "isnum|"+
492
+ "isletters|"+
493
+ "linecoords|"+
494
+ "localize|"+
495
+ "lnum|"+
496
+ "nameshort|"+
497
+ "null|"+
498
+ "objeval|"+
499
+ "r|"+
500
+ "rand|"+
501
+ "s|"+
502
+ "setq|"+
503
+ "setr|"+
504
+ "soundex|"+
505
+ "soundslike|"+
506
+ "valid|"+
507
+ "vchart|"+
508
+ "vchart2|"+
509
+ "vlabel|"+
510
+ "@@|"+
511
+ "bakerdays|"+
512
+ "bodybuild|"+
513
+ "box|"+
514
+ "capall|"+
515
+ "catalog|"+
516
+ "children|"+
517
+ "ctrailer|"+
518
+ "darttime|"+
519
+ "debt|"+
520
+ "detailbar|"+
521
+ "exploredroom|"+
522
+ "fansitoansi|"+
523
+ "fansitoxansi|"+
524
+ "fullbar|"+
525
+ "halfbar|"+
526
+ "isdarted|"+
527
+ "isnewbie|"+
528
+ "isword|"+
529
+ "lambda|"+
530
+ "lobjects|"+
531
+ "lplayers|"+
532
+ "lthings|"+
533
+ "lvexits|"+
534
+ "lvobjects|"+
535
+ "lvplayers|"+
536
+ "lvthings|"+
537
+ "newswrap|"+
538
+ "numsuffix|"+
539
+ "playerson|"+
540
+ "playersthisweek|"+
541
+ "randomad|"+
542
+ "randword|"+
543
+ "realrandword|"+
544
+ "replacechr|"+
545
+ "second|"+
546
+ "splitamount|"+
547
+ "strlenall|"+
548
+ "text|"+
549
+ "third|"+
550
+ "tofansi|"+
551
+ "totalac|"+
552
+ "unique|"+
553
+ "getaddressroom|"+
554
+ "listpropertycomm|"+
555
+ "listpropertyres|"+
556
+ "lotowner|"+
557
+ "lotrating|"+
558
+ "lotratingcount|"+
559
+ "lotvalue|"+
560
+ "boughtproduct|"+
561
+ "companyabb|"+
562
+ "companyicon|"+
563
+ "companylist|"+
564
+ "companyname|"+
565
+ "companyowners|"+
566
+ "companyvalue|"+
567
+ "employees|"+
568
+ "invested|"+
569
+ "productlist|"+
570
+ "productname|"+
571
+ "productowners|"+
572
+ "productrating|"+
573
+ "productratingcount|"+
574
+ "productsoldat|"+
575
+ "producttype|"+
576
+ "ratedproduct|"+
577
+ "soldproduct|"+
578
+ "topproducts|"+
579
+ "totalspentonproduct|"+
580
+ "totalstock|"+
581
+ "transfermoney|"+
582
+ "uniquebuyercount|"+
583
+ "uniqueproductsbought|"+
584
+ "validcompany|"+
585
+ "deletepicture|"+
586
+ "fbsave|"+
587
+ "getpicturesecurity|"+
588
+ "haspicture|"+
589
+ "listpictures|"+
590
+ "picturesize|"+
591
+ "replacecolor|"+
592
+ "rgbtocolor|"+
593
+ "savepicture|"+
594
+ "setpicturesecurity|"+
595
+ "showpicture|"+
596
+ "piechart|"+
597
+ "piechartlabel|"+
598
+ "createmaze|"+
599
+ "drawmaze|"+
600
+ "drawwireframe"
601
+ );
602
+ var keywordMapper = this.createKeywordMapper({
603
+ "invalid.deprecated": "debugger",
604
+ "support.function": builtinFunctions,
605
+ "constant.language": builtinConstants,
606
+ "keyword": keywords
607
+ }, "identifier");
608
+
609
+ var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
610
+
611
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
612
+ var octInteger = "(?:0[oO]?[0-7]+)";
613
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
614
+ var binInteger = "(?:0[bB][01]+)";
615
+ var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
616
+
617
+ var exponent = "(?:[eE][+-]?\\d+)";
618
+ var fraction = "(?:\\.\\d+)";
619
+ var intPart = "(?:\\d+)";
620
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
621
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
622
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
623
+
624
+ this.$rules = {
625
+ "start" : [
626
+ {
627
+ token : "variable", // mush substitution register
628
+ regex : "%[0-9]{1}"
629
+ },
630
+ {
631
+ token : "variable", // mush substitution register
632
+ regex : "%q[0-9A-Za-z]{1}"
633
+ },
634
+ {
635
+ token : "variable", // mush special character register
636
+ regex : "%[a-zA-Z]{1}"
637
+ },
638
+ {
639
+ token: "variable.language",
640
+ regex: "%[a-z0-9-_]+"
641
+ },
642
+ {
643
+ token : "constant.numeric", // imaginary
644
+ regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
645
+ }, {
646
+ token : "constant.numeric", // float
647
+ regex : floatNumber
648
+ }, {
649
+ token : "constant.numeric", // long integer
650
+ regex : integer + "[lL]\\b"
651
+ }, {
652
+ token : "constant.numeric", // integer
653
+ regex : integer + "\\b"
654
+ }, {
655
+ token : keywordMapper,
656
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
657
+ }, {
658
+ token : "keyword.operator",
659
+ regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|#|%|<<|>>|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
660
+ }, {
661
+ token : "paren.lparen",
662
+ regex : "[\\[\\(\\{]"
663
+ }, {
664
+ token : "paren.rparen",
665
+ regex : "[\\]\\)\\}]"
666
+ }, {
667
+ token : "text",
668
+ regex : "\\s+"
669
+ } ]
670
+ };
671
+ };
672
+
673
+ oop.inherits(MushCodeRules, TextHighlightRules);
674
+
675
+ exports.MushCodeRules = MushCodeRules;
676
+ });
677
+
678
+ define('ace/mode/folding/pythonic', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
679
+
680
+
681
+ var oop = require("../../lib/oop");
682
+ var BaseFoldMode = require("./fold_mode").FoldMode;
683
+
684
+ var FoldMode = exports.FoldMode = function(markers) {
685
+ this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$");
686
+ };
687
+ oop.inherits(FoldMode, BaseFoldMode);
688
+
689
+ (function() {
690
+
691
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
692
+ var line = session.getLine(row);
693
+ var match = line.match(this.foldingStartMarker);
694
+ if (match) {
695
+ if (match[1])
696
+ return this.openingBracketBlock(session, match[1], row, match.index);
697
+ if (match[2])
698
+ return this.indentationBlock(session, row, match.index + match[2].length);
699
+ return this.indentationBlock(session, row);
700
+ }
701
+ }
702
+
703
+ }).call(FoldMode.prototype);
704
+
705
+ });