jekyll-theme-anc 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +1 -0
  4. data/_includes/disqus.html +42 -0
  5. data/_includes/facebook_share_btn.html +1 -0
  6. data/_includes/footer.html +79 -0
  7. data/_includes/go2top.html +22 -0
  8. data/_includes/google-analytics.html +11 -0
  9. data/_includes/head.html +50 -0
  10. data/_includes/header.html +13 -0
  11. data/_includes/jspdf.html +41 -0
  12. data/_includes/nav.html +25 -0
  13. data/_includes/pageloginpoper.html +59 -0
  14. data/_includes/post-categories.html +8 -0
  15. data/_includes/post_seo.html +59 -0
  16. data/_includes/youtube_video.html +11 -0
  17. data/_layouts/blog.html +33 -0
  18. data/_layouts/default.html +151 -0
  19. data/_layouts/home.html +26 -0
  20. data/_layouts/page.html +5 -0
  21. data/_layouts/post.html +83 -0
  22. data/_sass/anc.scss +9 -0
  23. data/_sass/anc/_base.scss +144 -0
  24. data/_sass/anc/_layout.scss +0 -0
  25. data/_sass/anc/_materialize.scss +38 -0
  26. data/_sass/anc/_syntax-highlighting.scss +78 -0
  27. data/_sass/anc/components/_variables.scss +343 -0
  28. data/_sass/materialize-css/components/_badges.scss +47 -0
  29. data/_sass/materialize-css/components/_buttons.scss +291 -0
  30. data/_sass/materialize-css/components/_cards.scss +196 -0
  31. data/_sass/materialize-css/components/_carousel.scss +90 -0
  32. data/_sass/materialize-css/components/_chips.scss +89 -0
  33. data/_sass/materialize-css/components/_collapsible.scss +84 -0
  34. data/_sass/materialize-css/components/_color.scss +412 -0
  35. data/_sass/materialize-css/components/_dropdown.scss +68 -0
  36. data/_sass/materialize-css/components/_global.scss +734 -0
  37. data/_sass/materialize-css/components/_grid.scss +156 -0
  38. data/_sass/materialize-css/components/_icons-material-design.scss +5 -0
  39. data/_sass/materialize-css/components/_materialbox.scss +43 -0
  40. data/_sass/materialize-css/components/_modal.scss +90 -0
  41. data/_sass/materialize-css/components/_navbar.scss +208 -0
  42. data/_sass/materialize-css/components/_normalize.scss +424 -0
  43. data/_sass/materialize-css/components/_preloader.scss +334 -0
  44. data/_sass/materialize-css/components/_pulse.scss +34 -0
  45. data/_sass/materialize-css/components/_roboto.scss +39 -0
  46. data/_sass/materialize-css/components/_sideNav.scss +214 -0
  47. data/_sass/materialize-css/components/_slider.scss +92 -0
  48. data/_sass/materialize-css/components/_table_of_contents.scss +33 -0
  49. data/_sass/materialize-css/components/_tabs.scss +93 -0
  50. data/_sass/materialize-css/components/_tapTarget.scss +103 -0
  51. data/_sass/materialize-css/components/_toast.scss +59 -0
  52. data/_sass/materialize-css/components/_tooltip.scss +31 -0
  53. data/_sass/materialize-css/components/_transitions.scss +13 -0
  54. data/_sass/materialize-css/components/_typography.scss +61 -0
  55. data/_sass/materialize-css/components/_variables.scss +343 -0
  56. data/_sass/materialize-css/components/_waves.scss +114 -0
  57. data/_sass/materialize-css/components/date_picker/_default.date.scss +456 -0
  58. data/_sass/materialize-css/components/date_picker/_default.scss +212 -0
  59. data/_sass/materialize-css/components/date_picker/_default.time.scss +267 -0
  60. data/_sass/materialize-css/components/forms/_checkboxes.scss +210 -0
  61. data/_sass/materialize-css/components/forms/_file-input.scss +44 -0
  62. data/_sass/materialize-css/components/forms/_forms.scss +22 -0
  63. data/_sass/materialize-css/components/forms/_input-fields.scss +333 -0
  64. data/_sass/materialize-css/components/forms/_radio-buttons.scss +115 -0
  65. data/_sass/materialize-css/components/forms/_range.scss +160 -0
  66. data/_sass/materialize-css/components/forms/_select.scss +182 -0
  67. data/_sass/materialize-css/components/forms/_switches.scss +89 -0
  68. data/_sass/materialize-css/materialize.scss +42 -0
  69. data/_sass/materialize/components/_badges.scss +47 -0
  70. data/_sass/materialize/components/_buttons.scss +291 -0
  71. data/_sass/materialize/components/_cards.scss +196 -0
  72. data/_sass/materialize/components/_carousel.scss +90 -0
  73. data/_sass/materialize/components/_chips.scss +89 -0
  74. data/_sass/materialize/components/_collapsible.scss +84 -0
  75. data/_sass/materialize/components/_color.scss +412 -0
  76. data/_sass/materialize/components/_dropdown.scss +68 -0
  77. data/_sass/materialize/components/_global.scss +734 -0
  78. data/_sass/materialize/components/_grid.scss +156 -0
  79. data/_sass/materialize/components/_icons-material-design.scss +5 -0
  80. data/_sass/materialize/components/_materialbox.scss +43 -0
  81. data/_sass/materialize/components/_modal.scss +90 -0
  82. data/_sass/materialize/components/_navbar.scss +208 -0
  83. data/_sass/materialize/components/_normalize.scss +424 -0
  84. data/_sass/materialize/components/_preloader.scss +334 -0
  85. data/_sass/materialize/components/_pulse.scss +34 -0
  86. data/_sass/materialize/components/_roboto.scss +39 -0
  87. data/_sass/materialize/components/_sideNav.scss +214 -0
  88. data/_sass/materialize/components/_slider.scss +92 -0
  89. data/_sass/materialize/components/_table_of_contents.scss +33 -0
  90. data/_sass/materialize/components/_tabs.scss +93 -0
  91. data/_sass/materialize/components/_tapTarget.scss +103 -0
  92. data/_sass/materialize/components/_toast.scss +59 -0
  93. data/_sass/materialize/components/_tooltip.scss +31 -0
  94. data/_sass/materialize/components/_transitions.scss +13 -0
  95. data/_sass/materialize/components/_typography.scss +61 -0
  96. data/_sass/materialize/components/_variables.scss +343 -0
  97. data/_sass/materialize/components/_waves.scss +114 -0
  98. data/_sass/materialize/components/date_picker/_default.date.scss +456 -0
  99. data/_sass/materialize/components/date_picker/_default.scss +212 -0
  100. data/_sass/materialize/components/date_picker/_default.time.scss +267 -0
  101. data/_sass/materialize/components/forms/_checkboxes.scss +210 -0
  102. data/_sass/materialize/components/forms/_file-input.scss +44 -0
  103. data/_sass/materialize/components/forms/_forms.scss +22 -0
  104. data/_sass/materialize/components/forms/_input-fields.scss +333 -0
  105. data/_sass/materialize/components/forms/_radio-buttons.scss +115 -0
  106. data/_sass/materialize/components/forms/_range.scss +160 -0
  107. data/_sass/materialize/components/forms/_select.scss +182 -0
  108. data/_sass/materialize/components/forms/_switches.scss +89 -0
  109. data/_sass/materialize/materialize.scss +42 -0
  110. data/assets/fonts/FontAwesome.otf +0 -0
  111. data/assets/fonts/fontawesome-webfont.eot +0 -0
  112. data/assets/fonts/fontawesome-webfont.svg +2671 -0
  113. data/assets/fonts/fontawesome-webfont.ttf +0 -0
  114. data/assets/fonts/fontawesome-webfont.woff +0 -0
  115. data/assets/fonts/fontawesome-webfont.woff2 +0 -0
  116. data/assets/fonts/roboto/Roboto-Bold.woff +0 -0
  117. data/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
  118. data/assets/fonts/roboto/Roboto-Light.woff +0 -0
  119. data/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
  120. data/assets/fonts/roboto/Roboto-Medium.woff +0 -0
  121. data/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
  122. data/assets/fonts/roboto/Roboto-Regular.woff +0 -0
  123. data/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
  124. data/assets/fonts/roboto/Roboto-Thin.woff +0 -0
  125. data/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
  126. data/assets/images/close.png +0 -0
  127. data/assets/images/loader.gif +0 -0
  128. data/assets/img/icons/facebook-square.png +0 -0
  129. data/assets/img/icons/github-square.png +0 -0
  130. data/assets/img/icons/twitter-square.png +0 -0
  131. data/assets/img/icons/youtube-square.png +0 -0
  132. data/assets/img/jubayed11.37-16.jpg +0 -0
  133. data/assets/img/parallax1.jpg +0 -0
  134. data/assets/img/sample-1.jpg +0 -0
  135. data/assets/js/custom_script.js +200 -0
  136. data/assets/js/highlight.pack.js +2 -0
  137. data/assets/js/materialize.min.js +6 -0
  138. data/assets/js/mode/apl/apl.js +174 -0
  139. data/assets/js/mode/asciiarmor/asciiarmor.js +74 -0
  140. data/assets/js/mode/asn.1/asn.1.js +204 -0
  141. data/assets/js/mode/asterisk/asterisk.js +196 -0
  142. data/assets/js/mode/brainfuck/brainfuck.js +85 -0
  143. data/assets/js/mode/clike/clike.js +789 -0
  144. data/assets/js/mode/clojure/clojure.js +306 -0
  145. data/assets/js/mode/cmake/cmake.js +97 -0
  146. data/assets/js/mode/cobol/cobol.js +255 -0
  147. data/assets/js/mode/coffeescript/coffeescript.js +359 -0
  148. data/assets/js/mode/commonlisp/commonlisp.js +124 -0
  149. data/assets/js/mode/crystal/crystal.js +433 -0
  150. data/assets/js/mode/css/css.js +831 -0
  151. data/assets/js/mode/cypher/cypher.js +150 -0
  152. data/assets/js/mode/d/d.js +218 -0
  153. data/assets/js/mode/dart/dart.js +157 -0
  154. data/assets/js/mode/diff/diff.js +47 -0
  155. data/assets/js/mode/django/django.js +356 -0
  156. data/assets/js/mode/dockerfile/dockerfile.js +79 -0
  157. data/assets/js/mode/dtd/dtd.js +142 -0
  158. data/assets/js/mode/dylan/dylan.js +352 -0
  159. data/assets/js/mode/ebnf/ebnf.js +195 -0
  160. data/assets/js/mode/ecl/ecl.js +206 -0
  161. data/assets/js/mode/eiffel/eiffel.js +160 -0
  162. data/assets/js/mode/elm/elm.js +205 -0
  163. data/assets/js/mode/erlang/erlang.js +619 -0
  164. data/assets/js/mode/factor/factor.js +85 -0
  165. data/assets/js/mode/fcl/fcl.js +173 -0
  166. data/assets/js/mode/forth/forth.js +180 -0
  167. data/assets/js/mode/fortran/fortran.js +188 -0
  168. data/assets/js/mode/gas/gas.js +345 -0
  169. data/assets/js/mode/gfm/gfm.js +129 -0
  170. data/assets/js/mode/gherkin/gherkin.js +178 -0
  171. data/assets/js/mode/go/go.js +187 -0
  172. data/assets/js/mode/groovy/groovy.js +230 -0
  173. data/assets/js/mode/haml/haml.js +161 -0
  174. data/assets/js/mode/handlebars/handlebars.js +62 -0
  175. data/assets/js/mode/haskell-literate/haskell-literate.js +43 -0
  176. data/assets/js/mode/haskell/haskell.js +267 -0
  177. data/assets/js/mode/haxe/haxe.js +515 -0
  178. data/assets/js/mode/htmlembedded/htmlembedded.js +28 -0
  179. data/assets/js/mode/htmlmixed/htmlmixed.js +152 -0
  180. data/assets/js/mode/http/http.js +113 -0
  181. data/assets/js/mode/idl/idl.js +290 -0
  182. data/assets/js/mode/javascript/javascript.js +838 -0
  183. data/assets/js/mode/jinja2/jinja2.js +142 -0
  184. data/assets/js/mode/jsx/jsx.js +148 -0
  185. data/assets/js/mode/julia/julia.js +418 -0
  186. data/assets/js/mode/livescript/livescript.js +280 -0
  187. data/assets/js/mode/lua/lua.js +159 -0
  188. data/assets/js/mode/markdown/markdown.js +859 -0
  189. data/assets/js/mode/mathematica/mathematica.js +176 -0
  190. data/assets/js/mode/mbox/mbox.js +129 -0
  191. data/assets/js/mode/meta.js +215 -0
  192. data/assets/js/mode/mirc/mirc.js +193 -0
  193. data/assets/js/mode/mllike/mllike.js +208 -0
  194. data/assets/js/mode/modelica/modelica.js +245 -0
  195. data/assets/js/mode/mscgen/mscgen.js +175 -0
  196. data/assets/js/mode/mumps/mumps.js +148 -0
  197. data/assets/js/mode/nginx/nginx.js +178 -0
  198. data/assets/js/mode/nsis/nsis.js +95 -0
  199. data/assets/js/mode/ntriples/ntriples.js +195 -0
  200. data/assets/js/mode/octave/octave.js +139 -0
  201. data/assets/js/mode/oz/oz.js +252 -0
  202. data/assets/js/mode/pascal/pascal.js +109 -0
  203. data/assets/js/mode/pegjs/pegjs.js +114 -0
  204. data/assets/js/mode/perl/perl.js +837 -0
  205. data/assets/js/mode/php/php.js +234 -0
  206. data/assets/js/mode/pig/pig.js +178 -0
  207. data/assets/js/mode/powershell/powershell.js +398 -0
  208. data/assets/js/mode/properties/properties.js +78 -0
  209. data/assets/js/mode/protobuf/protobuf.js +68 -0
  210. data/assets/js/mode/pug/pug.js +591 -0
  211. data/assets/js/mode/puppet/puppet.js +220 -0
  212. data/assets/js/mode/python/python.js +334 -0
  213. data/assets/js/mode/q/q.js +139 -0
  214. data/assets/js/mode/r/r.js +183 -0
  215. data/assets/js/mode/rpm/changes/index.html +66 -0
  216. data/assets/js/mode/rpm/rpm.js +109 -0
  217. data/assets/js/mode/rst/rst.js +557 -0
  218. data/assets/js/mode/ruby/ruby.js +295 -0
  219. data/assets/js/mode/rust/rust.js +72 -0
  220. data/assets/js/mode/sas/sas.js +303 -0
  221. data/assets/js/mode/sass/sass.js +454 -0
  222. data/assets/js/mode/scheme/scheme.js +249 -0
  223. data/assets/js/mode/shell/shell.js +142 -0
  224. data/assets/js/mode/sieve/sieve.js +193 -0
  225. data/assets/js/mode/slim/slim.js +575 -0
  226. data/assets/js/mode/smalltalk/smalltalk.js +168 -0
  227. data/assets/js/mode/smarty/smarty.js +225 -0
  228. data/assets/js/mode/solr/solr.js +104 -0
  229. data/assets/js/mode/soy/soy.js +342 -0
  230. data/assets/js/mode/sparql/sparql.js +180 -0
  231. data/assets/js/mode/spreadsheet/spreadsheet.js +112 -0
  232. data/assets/js/mode/sql/sql.js +475 -0
  233. data/assets/js/mode/stex/stex.js +251 -0
  234. data/assets/js/mode/stylus/stylus.js +771 -0
  235. data/assets/js/mode/swift/swift.js +210 -0
  236. data/assets/js/mode/tcl/tcl.js +139 -0
  237. data/assets/js/mode/textile/textile.js +469 -0
  238. data/assets/js/mode/tiddlywiki/tiddlywiki.css +14 -0
  239. data/assets/js/mode/tiddlywiki/tiddlywiki.js +308 -0
  240. data/assets/js/mode/tiki/tiki.css +26 -0
  241. data/assets/js/mode/tiki/tiki.js +312 -0
  242. data/assets/js/mode/toml/toml.js +88 -0
  243. data/assets/js/mode/tornado/tornado.js +68 -0
  244. data/assets/js/mode/troff/troff.js +84 -0
  245. data/assets/js/mode/ttcn-cfg/ttcn-cfg.js +214 -0
  246. data/assets/js/mode/ttcn/ttcn.js +283 -0
  247. data/assets/js/mode/turtle/turtle.js +162 -0
  248. data/assets/js/mode/twig/twig.js +141 -0
  249. data/assets/js/mode/vb/vb.js +275 -0
  250. data/assets/js/mode/vbscript/vbscript.js +350 -0
  251. data/assets/js/mode/velocity/velocity.js +201 -0
  252. data/assets/js/mode/verilog/verilog.js +675 -0
  253. data/assets/js/mode/vhdl/vhdl.js +189 -0
  254. data/assets/js/mode/vue/vue.js +70 -0
  255. data/assets/js/mode/webidl/webidl.js +195 -0
  256. data/assets/js/mode/xml/xml.js +394 -0
  257. data/assets/js/mode/xquery/xquery.js +448 -0
  258. data/assets/js/mode/yacas/yacas.js +204 -0
  259. data/assets/js/mode/yaml-frontmatter/yaml-frontmatter.js +68 -0
  260. data/assets/js/mode/yaml/yaml.js +118 -0
  261. data/assets/js/mode/z80/z80.js +116 -0
  262. data/assets/main.scss +5 -0
  263. metadata +347 -0
@@ -0,0 +1,306 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ /**
5
+ * Author: Hans Engel
6
+ * Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun)
7
+ */
8
+
9
+ (function(mod) {
10
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
11
+ mod(require("../../lib/codemirror"));
12
+ else if (typeof define == "function" && define.amd) // AMD
13
+ define(["../../lib/codemirror"], mod);
14
+ else // Plain browser env
15
+ mod(CodeMirror);
16
+ })(function(CodeMirror) {
17
+ "use strict";
18
+
19
+ CodeMirror.defineMode("clojure", function (options) {
20
+ var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", CHARACTER = "string-2",
21
+ ATOM = "atom", NUMBER = "number", BRACKET = "bracket", KEYWORD = "keyword", VAR = "variable";
22
+ var INDENT_WORD_SKIP = options.indentUnit || 2;
23
+ var NORMAL_INDENT_UNIT = options.indentUnit || 2;
24
+
25
+ function makeKeywords(str) {
26
+ var obj = {}, words = str.split(" ");
27
+ for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
28
+ return obj;
29
+ }
30
+
31
+ var atoms = makeKeywords("true false nil");
32
+
33
+ var keywords = makeKeywords(
34
+ "defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest " +
35
+ "slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn " +
36
+ "do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync " +
37
+ "doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars " +
38
+ "binding gen-class gen-and-load-class gen-and-save-class handler-case handle");
39
+
40
+ var builtins = makeKeywords(
41
+ "* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* " +
42
+ "*compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* " +
43
+ "*math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* " +
44
+ "*source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> " +
45
+ "->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor " +
46
+ "aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! " +
47
+ "alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double " +
48
+ "aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 " +
49
+ "bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set " +
50
+ "bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast " +
51
+ "byte byte-array bytes case cat cast char char-array char-escape-string char-name-string char? chars chunk chunk-append " +
52
+ "chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors " +
53
+ "clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement completing concat cond condp " +
54
+ "conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? " +
55
+ "declare dedupe default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol " +
56
+ "defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc " +
57
+ "dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last " +
58
+ "drop-while eduction empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info " +
59
+ "extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword " +
60
+ "find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? " +
61
+ "fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? " +
62
+ "gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash " +
63
+ "hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? " +
64
+ "int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep " +
65
+ "keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file " +
66
+ "load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array " +
67
+ "make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods " +
68
+ "min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty " +
69
+ "not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias " +
70
+ "ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all " +
71
+ "partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers " +
72
+ "primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str " +
73
+ "prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues " +
74
+ "quot rand rand-int rand-nth random-sample range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern " +
75
+ "re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history " +
76
+ "ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods " +
77
+ "remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest " +
78
+ "restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? " +
79
+ "seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts " +
80
+ "shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? " +
81
+ "special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol " +
82
+ "symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transduce " +
83
+ "transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec " +
84
+ "unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int " +
85
+ "unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int "+
86
+ "unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote " +
87
+ "unquote-splicing update update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of " +
88
+ "vector? volatile! volatile? vreset! vswap! when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context " +
89
+ "with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap " +
90
+ "*default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! " +
91
+ "set-agent-send-off-executor! some-> some->>");
92
+
93
+ var indentKeys = makeKeywords(
94
+ // Built-ins
95
+ "ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto " +
96
+ "locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type " +
97
+ "try catch " +
98
+
99
+ // Binding forms
100
+ "let letfn binding loop for doseq dotimes when-let if-let " +
101
+
102
+ // Data structures
103
+ "defstruct struct-map assoc " +
104
+
105
+ // clojure.test
106
+ "testing deftest " +
107
+
108
+ // contrib
109
+ "handler-case handle dotrace deftrace");
110
+
111
+ var tests = {
112
+ digit: /\d/,
113
+ digit_or_colon: /[\d:]/,
114
+ hex: /[0-9a-f]/i,
115
+ sign: /[+-]/,
116
+ exponent: /e/i,
117
+ keyword_char: /[^\s\(\[\;\)\]]/,
118
+ symbol: /[\w*+!\-\._?:<>\/\xa1-\uffff]/,
119
+ block_indent: /^(?:def|with)[^\/]+$|\/(?:def|with)/
120
+ };
121
+
122
+ function stateStack(indent, type, prev) { // represents a state stack object
123
+ this.indent = indent;
124
+ this.type = type;
125
+ this.prev = prev;
126
+ }
127
+
128
+ function pushStack(state, indent, type) {
129
+ state.indentStack = new stateStack(indent, type, state.indentStack);
130
+ }
131
+
132
+ function popStack(state) {
133
+ state.indentStack = state.indentStack.prev;
134
+ }
135
+
136
+ function isNumber(ch, stream){
137
+ // hex
138
+ if ( ch === '0' && stream.eat(/x/i) ) {
139
+ stream.eatWhile(tests.hex);
140
+ return true;
141
+ }
142
+
143
+ // leading sign
144
+ if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) {
145
+ stream.eat(tests.sign);
146
+ ch = stream.next();
147
+ }
148
+
149
+ if ( tests.digit.test(ch) ) {
150
+ stream.eat(ch);
151
+ stream.eatWhile(tests.digit);
152
+
153
+ if ( '.' == stream.peek() ) {
154
+ stream.eat('.');
155
+ stream.eatWhile(tests.digit);
156
+ } else if ('/' == stream.peek() ) {
157
+ stream.eat('/');
158
+ stream.eatWhile(tests.digit);
159
+ }
160
+
161
+ if ( stream.eat(tests.exponent) ) {
162
+ stream.eat(tests.sign);
163
+ stream.eatWhile(tests.digit);
164
+ }
165
+
166
+ return true;
167
+ }
168
+
169
+ return false;
170
+ }
171
+
172
+ // Eat character that starts after backslash \
173
+ function eatCharacter(stream) {
174
+ var first = stream.next();
175
+ // Read special literals: backspace, newline, space, return.
176
+ // Just read all lowercase letters.
177
+ if (first && first.match(/[a-z]/) && stream.match(/[a-z]+/, true)) {
178
+ return;
179
+ }
180
+ // Read unicode character: \u1000 \uA0a1
181
+ if (first === "u") {
182
+ stream.match(/[0-9a-z]{4}/i, true);
183
+ }
184
+ }
185
+
186
+ return {
187
+ startState: function () {
188
+ return {
189
+ indentStack: null,
190
+ indentation: 0,
191
+ mode: false
192
+ };
193
+ },
194
+
195
+ token: function (stream, state) {
196
+ if (state.indentStack == null && stream.sol()) {
197
+ // update indentation, but only if indentStack is empty
198
+ state.indentation = stream.indentation();
199
+ }
200
+
201
+ // skip spaces
202
+ if (state.mode != "string" && stream.eatSpace()) {
203
+ return null;
204
+ }
205
+ var returnType = null;
206
+
207
+ switch(state.mode){
208
+ case "string": // multi-line string parsing mode
209
+ var next, escaped = false;
210
+ while ((next = stream.next()) != null) {
211
+ if (next == "\"" && !escaped) {
212
+
213
+ state.mode = false;
214
+ break;
215
+ }
216
+ escaped = !escaped && next == "\\";
217
+ }
218
+ returnType = STRING; // continue on in string mode
219
+ break;
220
+ default: // default parsing mode
221
+ var ch = stream.next();
222
+
223
+ if (ch == "\"") {
224
+ state.mode = "string";
225
+ returnType = STRING;
226
+ } else if (ch == "\\") {
227
+ eatCharacter(stream);
228
+ returnType = CHARACTER;
229
+ } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) {
230
+ returnType = ATOM;
231
+ } else if (ch == ";") { // comment
232
+ stream.skipToEnd(); // rest of the line is a comment
233
+ returnType = COMMENT;
234
+ } else if (isNumber(ch,stream)){
235
+ returnType = NUMBER;
236
+ } else if (ch == "(" || ch == "[" || ch == "{" ) {
237
+ var keyWord = '', indentTemp = stream.column(), letter;
238
+ /**
239
+ Either
240
+ (indent-word ..
241
+ (non-indent-word ..
242
+ (;something else, bracket, etc.
243
+ */
244
+
245
+ if (ch == "(") while ((letter = stream.eat(tests.keyword_char)) != null) {
246
+ keyWord += letter;
247
+ }
248
+
249
+ if (keyWord.length > 0 && (indentKeys.propertyIsEnumerable(keyWord) ||
250
+ tests.block_indent.test(keyWord))) { // indent-word
251
+ pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);
252
+ } else { // non-indent word
253
+ // we continue eating the spaces
254
+ stream.eatSpace();
255
+ if (stream.eol() || stream.peek() == ";") {
256
+ // nothing significant after
257
+ // we restart indentation the user defined spaces after
258
+ pushStack(state, indentTemp + NORMAL_INDENT_UNIT, ch);
259
+ } else {
260
+ pushStack(state, indentTemp + stream.current().length, ch); // else we match
261
+ }
262
+ }
263
+ stream.backUp(stream.current().length - 1); // undo all the eating
264
+
265
+ returnType = BRACKET;
266
+ } else if (ch == ")" || ch == "]" || ch == "}") {
267
+ returnType = BRACKET;
268
+ if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : (ch == "]" ? "[" :"{"))) {
269
+ popStack(state);
270
+ }
271
+ } else if ( ch == ":" ) {
272
+ stream.eatWhile(tests.symbol);
273
+ return ATOM;
274
+ } else {
275
+ stream.eatWhile(tests.symbol);
276
+
277
+ if (keywords && keywords.propertyIsEnumerable(stream.current())) {
278
+ returnType = KEYWORD;
279
+ } else if (builtins && builtins.propertyIsEnumerable(stream.current())) {
280
+ returnType = BUILTIN;
281
+ } else if (atoms && atoms.propertyIsEnumerable(stream.current())) {
282
+ returnType = ATOM;
283
+ } else {
284
+ returnType = VAR;
285
+ }
286
+ }
287
+ }
288
+
289
+ return returnType;
290
+ },
291
+
292
+ indent: function (state) {
293
+ if (state.indentStack == null) return state.indentation;
294
+ return state.indentStack.indent;
295
+ },
296
+
297
+ closeBrackets: {pairs: "()[]{}\"\""},
298
+ lineComment: ";;"
299
+ };
300
+ });
301
+
302
+ CodeMirror.defineMIME("text/x-clojure", "clojure");
303
+ CodeMirror.defineMIME("text/x-clojurescript", "clojure");
304
+ CodeMirror.defineMIME("application/edn", "clojure");
305
+
306
+ });
@@ -0,0 +1,97 @@
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")
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd)
8
+ define(["../../lib/codemirror"], mod);
9
+ else
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ CodeMirror.defineMode("cmake", function () {
15
+ var variable_regex = /({)?[a-zA-Z0-9_]+(})?/;
16
+
17
+ function tokenString(stream, state) {
18
+ var current, prev, found_var = false;
19
+ while (!stream.eol() && (current = stream.next()) != state.pending) {
20
+ if (current === '$' && prev != '\\' && state.pending == '"') {
21
+ found_var = true;
22
+ break;
23
+ }
24
+ prev = current;
25
+ }
26
+ if (found_var) {
27
+ stream.backUp(1);
28
+ }
29
+ if (current == state.pending) {
30
+ state.continueString = false;
31
+ } else {
32
+ state.continueString = true;
33
+ }
34
+ return "string";
35
+ }
36
+
37
+ function tokenize(stream, state) {
38
+ var ch = stream.next();
39
+
40
+ // Have we found a variable?
41
+ if (ch === '$') {
42
+ if (stream.match(variable_regex)) {
43
+ return 'variable-2';
44
+ }
45
+ return 'variable';
46
+ }
47
+ // Should we still be looking for the end of a string?
48
+ if (state.continueString) {
49
+ // If so, go through the loop again
50
+ stream.backUp(1);
51
+ return tokenString(stream, state);
52
+ }
53
+ // Do we just have a function on our hands?
54
+ // In 'cmake_minimum_required (VERSION 2.8.8)', 'cmake_minimum_required' is matched
55
+ if (stream.match(/(\s+)?\w+\(/) || stream.match(/(\s+)?\w+\ \(/)) {
56
+ stream.backUp(1);
57
+ return 'def';
58
+ }
59
+ if (ch == "#") {
60
+ stream.skipToEnd();
61
+ return "comment";
62
+ }
63
+ // Have we found a string?
64
+ if (ch == "'" || ch == '"') {
65
+ // Store the type (single or double)
66
+ state.pending = ch;
67
+ // Perform the looping function to find the end
68
+ return tokenString(stream, state);
69
+ }
70
+ if (ch == '(' || ch == ')') {
71
+ return 'bracket';
72
+ }
73
+ if (ch.match(/[0-9]/)) {
74
+ return 'number';
75
+ }
76
+ stream.eatWhile(/[\w-]/);
77
+ return null;
78
+ }
79
+ return {
80
+ startState: function () {
81
+ var state = {};
82
+ state.inDefinition = false;
83
+ state.inInclude = false;
84
+ state.continueString = false;
85
+ state.pending = false;
86
+ return state;
87
+ },
88
+ token: function (stream, state) {
89
+ if (stream.eatSpace()) return null;
90
+ return tokenize(stream, state);
91
+ }
92
+ };
93
+ });
94
+
95
+ CodeMirror.defineMIME("text/x-cmake", "cmake");
96
+
97
+ });
@@ -0,0 +1,255 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ /**
5
+ * Author: Gautam Mehta
6
+ * Branched from CodeMirror's Scheme mode
7
+ */
8
+ (function(mod) {
9
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
10
+ mod(require("../../lib/codemirror"));
11
+ else if (typeof define == "function" && define.amd) // AMD
12
+ define(["../../lib/codemirror"], mod);
13
+ else // Plain browser env
14
+ mod(CodeMirror);
15
+ })(function(CodeMirror) {
16
+ "use strict";
17
+
18
+ CodeMirror.defineMode("cobol", function () {
19
+ var BUILTIN = "builtin", COMMENT = "comment", STRING = "string",
20
+ ATOM = "atom", NUMBER = "number", KEYWORD = "keyword", MODTAG = "header",
21
+ COBOLLINENUM = "def", PERIOD = "link";
22
+ function makeKeywords(str) {
23
+ var obj = {}, words = str.split(" ");
24
+ for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
25
+ return obj;
26
+ }
27
+ var atoms = makeKeywords("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES ");
28
+ var keywords = makeKeywords(
29
+ "ACCEPT ACCESS ACQUIRE ADD ADDRESS " +
30
+ "ADVANCING AFTER ALIAS ALL ALPHABET " +
31
+ "ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED " +
32
+ "ALSO ALTER ALTERNATE AND ANY " +
33
+ "ARE AREA AREAS ARITHMETIC ASCENDING " +
34
+ "ASSIGN AT ATTRIBUTE AUTHOR AUTO " +
35
+ "AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS " +
36
+ "B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP " +
37
+ "BEFORE BELL BINARY BIT BITS " +
38
+ "BLANK BLINK BLOCK BOOLEAN BOTTOM " +
39
+ "BY CALL CANCEL CD CF " +
40
+ "CH CHARACTER CHARACTERS CLASS CLOCK-UNITS " +
41
+ "CLOSE COBOL CODE CODE-SET COL " +
42
+ "COLLATING COLUMN COMMA COMMIT COMMITMENT " +
43
+ "COMMON COMMUNICATION COMP COMP-0 COMP-1 " +
44
+ "COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 " +
45
+ "COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 " +
46
+ "COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 " +
47
+ "COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE " +
48
+ "CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS " +
49
+ "CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS " +
50
+ "CONVERTING COPY CORR CORRESPONDING COUNT " +
51
+ "CRT CRT-UNDER CURRENCY CURRENT CURSOR " +
52
+ "DATA DATE DATE-COMPILED DATE-WRITTEN DAY " +
53
+ "DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION " +
54
+ "DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS " +
55
+ "DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE " +
56
+ "DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING " +
57
+ "DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED " +
58
+ "DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION " +
59
+ "DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 " +
60
+ "DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 " +
61
+ "DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION " +
62
+ "DOWN DROP DUPLICATE DUPLICATES DYNAMIC " +
63
+ "EBCDIC EGI EJECT ELSE EMI " +
64
+ "EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. " +
65
+ "END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY " +
66
+ "END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY " +
67
+ "END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN " +
68
+ "END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT " +
69
+ "END-UNSTRING END-WRITE END-XML ENTER ENTRY " +
70
+ "ENVIRONMENT EOP EQUAL EQUALS ERASE " +
71
+ "ERROR ESI EVALUATE EVERY EXCEEDS " +
72
+ "EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL " +
73
+ "EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL " +
74
+ "FILE-STREAM FILES FILLER FINAL FIND " +
75
+ "FINISH FIRST FOOTING FOR FOREGROUND-COLOR " +
76
+ "FOREGROUND-COLOUR FORMAT FREE FROM FULL " +
77
+ "FUNCTION GENERATE GET GIVING GLOBAL " +
78
+ "GO GOBACK GREATER GROUP HEADING " +
79
+ "HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL " +
80
+ "ID IDENTIFICATION IF IN INDEX " +
81
+ "INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 " +
82
+ "INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED " +
83
+ "INDIC INDICATE INDICATOR INDICATORS INITIAL " +
84
+ "INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT " +
85
+ "INSTALLATION INTO INVALID INVOKE IS " +
86
+ "JUST JUSTIFIED KANJI KEEP KEY " +
87
+ "LABEL LAST LD LEADING LEFT " +
88
+ "LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY " +
89
+ "LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER " +
90
+ "LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE " +
91
+ "LOCALE LOCALLY LOCK " +
92
+ "MEMBER MEMORY MERGE MESSAGE METACLASS " +
93
+ "MODE MODIFIED MODIFY MODULES MOVE " +
94
+ "MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE " +
95
+ "NEXT NO NO-ECHO NONE NOT " +
96
+ "NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER " +
97
+ "NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS " +
98
+ "OF OFF OMITTED ON ONLY " +
99
+ "OPEN OPTIONAL OR ORDER ORGANIZATION " +
100
+ "OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL " +
101
+ "PADDING PAGE PAGE-COUNTER PARSE PERFORM " +
102
+ "PF PH PIC PICTURE PLUS " +
103
+ "POINTER POSITION POSITIVE PREFIX PRESENT " +
104
+ "PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES " +
105
+ "PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID " +
106
+ "PROMPT PROTECTED PURGE QUEUE QUOTE " +
107
+ "QUOTES RANDOM RD READ READY " +
108
+ "REALM RECEIVE RECONNECT RECORD RECORD-NAME " +
109
+ "RECORDS RECURSIVE REDEFINES REEL REFERENCE " +
110
+ "REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE " +
111
+ "REMAINDER REMOVAL RENAMES REPEATED REPLACE " +
112
+ "REPLACING REPORT REPORTING REPORTS REPOSITORY " +
113
+ "REQUIRED RERUN RESERVE RESET RETAINING " +
114
+ "RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO " +
115
+ "REVERSED REWIND REWRITE RF RH " +
116
+ "RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED " +
117
+ "RUN SAME SCREEN SD SEARCH " +
118
+ "SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT " +
119
+ "SELECT SEND SENTENCE SEPARATE SEQUENCE " +
120
+ "SEQUENTIAL SET SHARED SIGN SIZE " +
121
+ "SKIP1 SKIP2 SKIP3 SORT SORT-MERGE " +
122
+ "SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL " +
123
+ "SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 " +
124
+ "START STARTING STATUS STOP STORE " +
125
+ "STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA " +
126
+ "SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS " +
127
+ "SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT " +
128
+ "TABLE TALLYING TAPE TENANT TERMINAL " +
129
+ "TERMINATE TEST TEXT THAN THEN " +
130
+ "THROUGH THRU TIME TIMES TITLE " +
131
+ "TO TOP TRAILING TRAILING-SIGN TRANSACTION " +
132
+ "TYPE TYPEDEF UNDERLINE UNEQUAL UNIT " +
133
+ "UNSTRING UNTIL UP UPDATE UPON " +
134
+ "USAGE USAGE-MODE USE USING VALID " +
135
+ "VALIDATE VALUE VALUES VARYING VLR " +
136
+ "WAIT WHEN WHEN-COMPILED WITH WITHIN " +
137
+ "WORDS WORKING-STORAGE WRITE XML XML-CODE " +
138
+ "XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL " );
139
+
140
+ var builtins = makeKeywords("- * ** / + < <= = > >= ");
141
+ var tests = {
142
+ digit: /\d/,
143
+ digit_or_colon: /[\d:]/,
144
+ hex: /[0-9a-f]/i,
145
+ sign: /[+-]/,
146
+ exponent: /e/i,
147
+ keyword_char: /[^\s\(\[\;\)\]]/,
148
+ symbol: /[\w*+\-]/
149
+ };
150
+ function isNumber(ch, stream){
151
+ // hex
152
+ if ( ch === '0' && stream.eat(/x/i) ) {
153
+ stream.eatWhile(tests.hex);
154
+ return true;
155
+ }
156
+ // leading sign
157
+ if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) {
158
+ stream.eat(tests.sign);
159
+ ch = stream.next();
160
+ }
161
+ if ( tests.digit.test(ch) ) {
162
+ stream.eat(ch);
163
+ stream.eatWhile(tests.digit);
164
+ if ( '.' == stream.peek()) {
165
+ stream.eat('.');
166
+ stream.eatWhile(tests.digit);
167
+ }
168
+ if ( stream.eat(tests.exponent) ) {
169
+ stream.eat(tests.sign);
170
+ stream.eatWhile(tests.digit);
171
+ }
172
+ return true;
173
+ }
174
+ return false;
175
+ }
176
+ return {
177
+ startState: function () {
178
+ return {
179
+ indentStack: null,
180
+ indentation: 0,
181
+ mode: false
182
+ };
183
+ },
184
+ token: function (stream, state) {
185
+ if (state.indentStack == null && stream.sol()) {
186
+ // update indentation, but only if indentStack is empty
187
+ state.indentation = 6 ; //stream.indentation();
188
+ }
189
+ // skip spaces
190
+ if (stream.eatSpace()) {
191
+ return null;
192
+ }
193
+ var returnType = null;
194
+ switch(state.mode){
195
+ case "string": // multi-line string parsing mode
196
+ var next = false;
197
+ while ((next = stream.next()) != null) {
198
+ if (next == "\"" || next == "\'") {
199
+ state.mode = false;
200
+ break;
201
+ }
202
+ }
203
+ returnType = STRING; // continue on in string mode
204
+ break;
205
+ default: // default parsing mode
206
+ var ch = stream.next();
207
+ var col = stream.column();
208
+ if (col >= 0 && col <= 5) {
209
+ returnType = COBOLLINENUM;
210
+ } else if (col >= 72 && col <= 79) {
211
+ stream.skipToEnd();
212
+ returnType = MODTAG;
213
+ } else if (ch == "*" && col == 6) { // comment
214
+ stream.skipToEnd(); // rest of the line is a comment
215
+ returnType = COMMENT;
216
+ } else if (ch == "\"" || ch == "\'") {
217
+ state.mode = "string";
218
+ returnType = STRING;
219
+ } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) {
220
+ returnType = ATOM;
221
+ } else if (ch == ".") {
222
+ returnType = PERIOD;
223
+ } else if (isNumber(ch,stream)){
224
+ returnType = NUMBER;
225
+ } else {
226
+ if (stream.current().match(tests.symbol)) {
227
+ while (col < 71) {
228
+ if (stream.eat(tests.symbol) === undefined) {
229
+ break;
230
+ } else {
231
+ col++;
232
+ }
233
+ }
234
+ }
235
+ if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) {
236
+ returnType = KEYWORD;
237
+ } else if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase())) {
238
+ returnType = BUILTIN;
239
+ } else if (atoms && atoms.propertyIsEnumerable(stream.current().toUpperCase())) {
240
+ returnType = ATOM;
241
+ } else returnType = null;
242
+ }
243
+ }
244
+ return returnType;
245
+ },
246
+ indent: function (state) {
247
+ if (state.indentStack == null) return state.indentation;
248
+ return state.indentStack.indent;
249
+ }
250
+ };
251
+ });
252
+
253
+ CodeMirror.defineMIME("text/x-cobol", "cobol");
254
+
255
+ });