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,193 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ //mIRC mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara
5
+
6
+ (function(mod) {
7
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
8
+ mod(require("../../lib/codemirror"));
9
+ else if (typeof define == "function" && define.amd) // AMD
10
+ define(["../../lib/codemirror"], mod);
11
+ else // Plain browser env
12
+ mod(CodeMirror);
13
+ })(function(CodeMirror) {
14
+ "use strict";
15
+
16
+ CodeMirror.defineMIME("text/mirc", "mirc");
17
+ CodeMirror.defineMode("mirc", function() {
18
+ function parseWords(str) {
19
+ var obj = {}, words = str.split(" ");
20
+ for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
21
+ return obj;
22
+ }
23
+ var specials = parseWords("$! $$ $& $? $+ $abook $abs $active $activecid " +
24
+ "$activewid $address $addtok $agent $agentname $agentstat $agentver " +
25
+ "$alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime " +
26
+ "$asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind " +
27
+ "$binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes " +
28
+ "$chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color " +
29
+ "$com $comcall $comchan $comerr $compact $compress $comval $cos $count " +
30
+ "$cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight " +
31
+ "$dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress " +
32
+ "$deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll " +
33
+ "$dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error " +
34
+ "$eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir " +
35
+ "$finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve " +
36
+ "$fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt " +
37
+ "$group $halted $hash $height $hfind $hget $highlight $hnick $hotline " +
38
+ "$hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil " +
39
+ "$inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect " +
40
+ "$insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile " +
41
+ "$isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive " +
42
+ "$lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock " +
43
+ "$lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer " +
44
+ "$maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext " +
45
+ "$menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode " +
46
+ "$modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile " +
47
+ "$nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly " +
48
+ "$opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree " +
49
+ "$pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo " +
50
+ "$readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex " +
51
+ "$reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline " +
52
+ "$sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin " +
53
+ "$site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname " +
54
+ "$sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped " +
55
+ "$syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp " +
56
+ "$timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel " +
57
+ "$ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver " +
58
+ "$version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor");
59
+ var keywords = parseWords("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice " +
60
+ "away background ban bcopy beep bread break breplace bset btrunc bunset bwrite " +
61
+ "channel clear clearall cline clipboard close cnick color comclose comopen " +
62
+ "comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver " +
63
+ "debug dec describe dialog did didtok disable disconnect dlevel dline dll " +
64
+ "dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace " +
65
+ "drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable " +
66
+ "events exit fclose filter findtext finger firewall flash flist flood flush " +
67
+ "flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove " +
68
+ "gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd " +
69
+ "halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear " +
70
+ "ialmark identd if ignore iline inc invite iuser join kick linesep links list " +
71
+ "load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice " +
72
+ "notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice " +
73
+ "qme qmsg query queryn quit raw reload remini remote remove rename renwin " +
74
+ "reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini " +
75
+ "say scid scon server set showmirc signam sline sockaccept sockclose socklist " +
76
+ "socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite " +
77
+ "sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize " +
78
+ "toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho " +
79
+ "var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum " +
80
+ "isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower " +
81
+ "isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs " +
82
+ "elseif else goto menu nicklist status title icon size option text edit " +
83
+ "button check radio box scroll list combo link tab item");
84
+ var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch");
85
+ var isOperatorChar = /[+\-*&%=<>!?^\/\|]/;
86
+ function chain(stream, state, f) {
87
+ state.tokenize = f;
88
+ return f(stream, state);
89
+ }
90
+ function tokenBase(stream, state) {
91
+ var beforeParams = state.beforeParams;
92
+ state.beforeParams = false;
93
+ var ch = stream.next();
94
+ if (/[\[\]{}\(\),\.]/.test(ch)) {
95
+ if (ch == "(" && beforeParams) state.inParams = true;
96
+ else if (ch == ")") state.inParams = false;
97
+ return null;
98
+ }
99
+ else if (/\d/.test(ch)) {
100
+ stream.eatWhile(/[\w\.]/);
101
+ return "number";
102
+ }
103
+ else if (ch == "\\") {
104
+ stream.eat("\\");
105
+ stream.eat(/./);
106
+ return "number";
107
+ }
108
+ else if (ch == "/" && stream.eat("*")) {
109
+ return chain(stream, state, tokenComment);
110
+ }
111
+ else if (ch == ";" && stream.match(/ *\( *\(/)) {
112
+ return chain(stream, state, tokenUnparsed);
113
+ }
114
+ else if (ch == ";" && !state.inParams) {
115
+ stream.skipToEnd();
116
+ return "comment";
117
+ }
118
+ else if (ch == '"') {
119
+ stream.eat(/"/);
120
+ return "keyword";
121
+ }
122
+ else if (ch == "$") {
123
+ stream.eatWhile(/[$_a-z0-9A-Z\.:]/);
124
+ if (specials && specials.propertyIsEnumerable(stream.current().toLowerCase())) {
125
+ return "keyword";
126
+ }
127
+ else {
128
+ state.beforeParams = true;
129
+ return "builtin";
130
+ }
131
+ }
132
+ else if (ch == "%") {
133
+ stream.eatWhile(/[^,\s()]/);
134
+ state.beforeParams = true;
135
+ return "string";
136
+ }
137
+ else if (isOperatorChar.test(ch)) {
138
+ stream.eatWhile(isOperatorChar);
139
+ return "operator";
140
+ }
141
+ else {
142
+ stream.eatWhile(/[\w\$_{}]/);
143
+ var word = stream.current().toLowerCase();
144
+ if (keywords && keywords.propertyIsEnumerable(word))
145
+ return "keyword";
146
+ if (functions && functions.propertyIsEnumerable(word)) {
147
+ state.beforeParams = true;
148
+ return "keyword";
149
+ }
150
+ return null;
151
+ }
152
+ }
153
+ function tokenComment(stream, state) {
154
+ var maybeEnd = false, ch;
155
+ while (ch = stream.next()) {
156
+ if (ch == "/" && maybeEnd) {
157
+ state.tokenize = tokenBase;
158
+ break;
159
+ }
160
+ maybeEnd = (ch == "*");
161
+ }
162
+ return "comment";
163
+ }
164
+ function tokenUnparsed(stream, state) {
165
+ var maybeEnd = 0, ch;
166
+ while (ch = stream.next()) {
167
+ if (ch == ";" && maybeEnd == 2) {
168
+ state.tokenize = tokenBase;
169
+ break;
170
+ }
171
+ if (ch == ")")
172
+ maybeEnd++;
173
+ else if (ch != " ")
174
+ maybeEnd = 0;
175
+ }
176
+ return "meta";
177
+ }
178
+ return {
179
+ startState: function() {
180
+ return {
181
+ tokenize: tokenBase,
182
+ beforeParams: false,
183
+ inParams: false
184
+ };
185
+ },
186
+ token: function(stream, state) {
187
+ if (stream.eatSpace()) return null;
188
+ return state.tokenize(stream, state);
189
+ }
190
+ };
191
+ });
192
+
193
+ });
@@ -0,0 +1,208 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ (function(mod) {
5
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
6
+ mod(require("../../lib/codemirror"));
7
+ else if (typeof define == "function" && define.amd) // AMD
8
+ define(["../../lib/codemirror"], mod);
9
+ else // Plain browser env
10
+ mod(CodeMirror);
11
+ })(function(CodeMirror) {
12
+ "use strict";
13
+
14
+ CodeMirror.defineMode('mllike', function(_config, parserConfig) {
15
+ var words = {
16
+ 'let': 'keyword',
17
+ 'rec': 'keyword',
18
+ 'in': 'keyword',
19
+ 'of': 'keyword',
20
+ 'and': 'keyword',
21
+ 'if': 'keyword',
22
+ 'then': 'keyword',
23
+ 'else': 'keyword',
24
+ 'for': 'keyword',
25
+ 'to': 'keyword',
26
+ 'while': 'keyword',
27
+ 'do': 'keyword',
28
+ 'done': 'keyword',
29
+ 'fun': 'keyword',
30
+ 'function': 'keyword',
31
+ 'val': 'keyword',
32
+ 'type': 'keyword',
33
+ 'mutable': 'keyword',
34
+ 'match': 'keyword',
35
+ 'with': 'keyword',
36
+ 'try': 'keyword',
37
+ 'open': 'builtin',
38
+ 'ignore': 'builtin',
39
+ 'begin': 'keyword',
40
+ 'end': 'keyword'
41
+ };
42
+
43
+ var extraWords = parserConfig.extraWords || {};
44
+ for (var prop in extraWords) {
45
+ if (extraWords.hasOwnProperty(prop)) {
46
+ words[prop] = parserConfig.extraWords[prop];
47
+ }
48
+ }
49
+
50
+ function tokenBase(stream, state) {
51
+ var ch = stream.next();
52
+
53
+ if (ch === '"') {
54
+ state.tokenize = tokenString;
55
+ return state.tokenize(stream, state);
56
+ }
57
+ if (ch === '(') {
58
+ if (stream.eat('*')) {
59
+ state.commentLevel++;
60
+ state.tokenize = tokenComment;
61
+ return state.tokenize(stream, state);
62
+ }
63
+ }
64
+ if (ch === '~') {
65
+ stream.eatWhile(/\w/);
66
+ return 'variable-2';
67
+ }
68
+ if (ch === '`') {
69
+ stream.eatWhile(/\w/);
70
+ return 'quote';
71
+ }
72
+ if (ch === '/' && parserConfig.slashComments && stream.eat('/')) {
73
+ stream.skipToEnd();
74
+ return 'comment';
75
+ }
76
+ if (/\d/.test(ch)) {
77
+ stream.eatWhile(/[\d]/);
78
+ if (stream.eat('.')) {
79
+ stream.eatWhile(/[\d]/);
80
+ }
81
+ return 'number';
82
+ }
83
+ if ( /[+\-*&%=<>!?|]/.test(ch)) {
84
+ return 'operator';
85
+ }
86
+ if (/[\w\xa1-\uffff]/.test(ch)) {
87
+ stream.eatWhile(/[\w\xa1-\uffff]/);
88
+ var cur = stream.current();
89
+ return words.hasOwnProperty(cur) ? words[cur] : 'variable';
90
+ }
91
+ return null
92
+ }
93
+
94
+ function tokenString(stream, state) {
95
+ var next, end = false, escaped = false;
96
+ while ((next = stream.next()) != null) {
97
+ if (next === '"' && !escaped) {
98
+ end = true;
99
+ break;
100
+ }
101
+ escaped = !escaped && next === '\\';
102
+ }
103
+ if (end && !escaped) {
104
+ state.tokenize = tokenBase;
105
+ }
106
+ return 'string';
107
+ };
108
+
109
+ function tokenComment(stream, state) {
110
+ var prev, next;
111
+ while(state.commentLevel > 0 && (next = stream.next()) != null) {
112
+ if (prev === '(' && next === '*') state.commentLevel++;
113
+ if (prev === '*' && next === ')') state.commentLevel--;
114
+ prev = next;
115
+ }
116
+ if (state.commentLevel <= 0) {
117
+ state.tokenize = tokenBase;
118
+ }
119
+ return 'comment';
120
+ }
121
+
122
+ return {
123
+ startState: function() {return {tokenize: tokenBase, commentLevel: 0};},
124
+ token: function(stream, state) {
125
+ if (stream.eatSpace()) return null;
126
+ return state.tokenize(stream, state);
127
+ },
128
+
129
+ blockCommentStart: "(*",
130
+ blockCommentEnd: "*)",
131
+ lineComment: parserConfig.slashComments ? "//" : null
132
+ };
133
+ });
134
+
135
+ CodeMirror.defineMIME('text/x-ocaml', {
136
+ name: 'mllike',
137
+ extraWords: {
138
+ 'succ': 'keyword',
139
+ 'trace': 'builtin',
140
+ 'exit': 'builtin',
141
+ 'print_string': 'builtin',
142
+ 'print_endline': 'builtin',
143
+ 'true': 'atom',
144
+ 'false': 'atom',
145
+ 'raise': 'keyword'
146
+ }
147
+ });
148
+
149
+ CodeMirror.defineMIME('text/x-fsharp', {
150
+ name: 'mllike',
151
+ extraWords: {
152
+ 'abstract': 'keyword',
153
+ 'as': 'keyword',
154
+ 'assert': 'keyword',
155
+ 'base': 'keyword',
156
+ 'class': 'keyword',
157
+ 'default': 'keyword',
158
+ 'delegate': 'keyword',
159
+ 'downcast': 'keyword',
160
+ 'downto': 'keyword',
161
+ 'elif': 'keyword',
162
+ 'exception': 'keyword',
163
+ 'extern': 'keyword',
164
+ 'finally': 'keyword',
165
+ 'global': 'keyword',
166
+ 'inherit': 'keyword',
167
+ 'inline': 'keyword',
168
+ 'interface': 'keyword',
169
+ 'internal': 'keyword',
170
+ 'lazy': 'keyword',
171
+ 'let!': 'keyword',
172
+ 'member' : 'keyword',
173
+ 'module': 'keyword',
174
+ 'namespace': 'keyword',
175
+ 'new': 'keyword',
176
+ 'null': 'keyword',
177
+ 'override': 'keyword',
178
+ 'private': 'keyword',
179
+ 'public': 'keyword',
180
+ 'return': 'keyword',
181
+ 'return!': 'keyword',
182
+ 'select': 'keyword',
183
+ 'static': 'keyword',
184
+ 'struct': 'keyword',
185
+ 'upcast': 'keyword',
186
+ 'use': 'keyword',
187
+ 'use!': 'keyword',
188
+ 'val': 'keyword',
189
+ 'when': 'keyword',
190
+ 'yield': 'keyword',
191
+ 'yield!': 'keyword',
192
+
193
+ 'List': 'builtin',
194
+ 'Seq': 'builtin',
195
+ 'Map': 'builtin',
196
+ 'Set': 'builtin',
197
+ 'int': 'builtin',
198
+ 'string': 'builtin',
199
+ 'raise': 'builtin',
200
+ 'failwith': 'builtin',
201
+ 'not': 'builtin',
202
+ 'true': 'builtin',
203
+ 'false': 'builtin'
204
+ },
205
+ slashComments: true
206
+ });
207
+
208
+ });
@@ -0,0 +1,245 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ // Modelica support for CodeMirror, copyright (c) by Lennart Ochel
5
+
6
+ (function(mod) {
7
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
8
+ mod(require("../../lib/codemirror"));
9
+ else if (typeof define == "function" && define.amd) // AMD
10
+ define(["../../lib/codemirror"], mod);
11
+ else // Plain browser env
12
+ mod(CodeMirror);
13
+ })
14
+
15
+ (function(CodeMirror) {
16
+ "use strict";
17
+
18
+ CodeMirror.defineMode("modelica", function(config, parserConfig) {
19
+
20
+ var indentUnit = config.indentUnit;
21
+ var keywords = parserConfig.keywords || {};
22
+ var builtin = parserConfig.builtin || {};
23
+ var atoms = parserConfig.atoms || {};
24
+
25
+ var isSingleOperatorChar = /[;=\(:\),{}.*<>+\-\/^\[\]]/;
26
+ var isDoubleOperatorChar = /(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/;
27
+ var isDigit = /[0-9]/;
28
+ var isNonDigit = /[_a-zA-Z]/;
29
+
30
+ function tokenLineComment(stream, state) {
31
+ stream.skipToEnd();
32
+ state.tokenize = null;
33
+ return "comment";
34
+ }
35
+
36
+ function tokenBlockComment(stream, state) {
37
+ var maybeEnd = false, ch;
38
+ while (ch = stream.next()) {
39
+ if (maybeEnd && ch == "/") {
40
+ state.tokenize = null;
41
+ break;
42
+ }
43
+ maybeEnd = (ch == "*");
44
+ }
45
+ return "comment";
46
+ }
47
+
48
+ function tokenString(stream, state) {
49
+ var escaped = false, ch;
50
+ while ((ch = stream.next()) != null) {
51
+ if (ch == '"' && !escaped) {
52
+ state.tokenize = null;
53
+ state.sol = false;
54
+ break;
55
+ }
56
+ escaped = !escaped && ch == "\\";
57
+ }
58
+
59
+ return "string";
60
+ }
61
+
62
+ function tokenIdent(stream, state) {
63
+ stream.eatWhile(isDigit);
64
+ while (stream.eat(isDigit) || stream.eat(isNonDigit)) { }
65
+
66
+
67
+ var cur = stream.current();
68
+
69
+ if(state.sol && (cur == "package" || cur == "model" || cur == "when" || cur == "connector")) state.level++;
70
+ else if(state.sol && cur == "end" && state.level > 0) state.level--;
71
+
72
+ state.tokenize = null;
73
+ state.sol = false;
74
+
75
+ if (keywords.propertyIsEnumerable(cur)) return "keyword";
76
+ else if (builtin.propertyIsEnumerable(cur)) return "builtin";
77
+ else if (atoms.propertyIsEnumerable(cur)) return "atom";
78
+ else return "variable";
79
+ }
80
+
81
+ function tokenQIdent(stream, state) {
82
+ while (stream.eat(/[^']/)) { }
83
+
84
+ state.tokenize = null;
85
+ state.sol = false;
86
+
87
+ if(stream.eat("'"))
88
+ return "variable";
89
+ else
90
+ return "error";
91
+ }
92
+
93
+ function tokenUnsignedNuber(stream, state) {
94
+ stream.eatWhile(isDigit);
95
+ if (stream.eat('.')) {
96
+ stream.eatWhile(isDigit);
97
+ }
98
+ if (stream.eat('e') || stream.eat('E')) {
99
+ if (!stream.eat('-'))
100
+ stream.eat('+');
101
+ stream.eatWhile(isDigit);
102
+ }
103
+
104
+ state.tokenize = null;
105
+ state.sol = false;
106
+ return "number";
107
+ }
108
+
109
+ // Interface
110
+ return {
111
+ startState: function() {
112
+ return {
113
+ tokenize: null,
114
+ level: 0,
115
+ sol: true
116
+ };
117
+ },
118
+
119
+ token: function(stream, state) {
120
+ if(state.tokenize != null) {
121
+ return state.tokenize(stream, state);
122
+ }
123
+
124
+ if(stream.sol()) {
125
+ state.sol = true;
126
+ }
127
+
128
+ // WHITESPACE
129
+ if(stream.eatSpace()) {
130
+ state.tokenize = null;
131
+ return null;
132
+ }
133
+
134
+ var ch = stream.next();
135
+
136
+ // LINECOMMENT
137
+ if(ch == '/' && stream.eat('/')) {
138
+ state.tokenize = tokenLineComment;
139
+ }
140
+ // BLOCKCOMMENT
141
+ else if(ch == '/' && stream.eat('*')) {
142
+ state.tokenize = tokenBlockComment;
143
+ }
144
+ // TWO SYMBOL TOKENS
145
+ else if(isDoubleOperatorChar.test(ch+stream.peek())) {
146
+ stream.next();
147
+ state.tokenize = null;
148
+ return "operator";
149
+ }
150
+ // SINGLE SYMBOL TOKENS
151
+ else if(isSingleOperatorChar.test(ch)) {
152
+ state.tokenize = null;
153
+ return "operator";
154
+ }
155
+ // IDENT
156
+ else if(isNonDigit.test(ch)) {
157
+ state.tokenize = tokenIdent;
158
+ }
159
+ // Q-IDENT
160
+ else if(ch == "'" && stream.peek() && stream.peek() != "'") {
161
+ state.tokenize = tokenQIdent;
162
+ }
163
+ // STRING
164
+ else if(ch == '"') {
165
+ state.tokenize = tokenString;
166
+ }
167
+ // UNSIGNED_NUBER
168
+ else if(isDigit.test(ch)) {
169
+ state.tokenize = tokenUnsignedNuber;
170
+ }
171
+ // ERROR
172
+ else {
173
+ state.tokenize = null;
174
+ return "error";
175
+ }
176
+
177
+ return state.tokenize(stream, state);
178
+ },
179
+
180
+ indent: function(state, textAfter) {
181
+ if (state.tokenize != null) return CodeMirror.Pass;
182
+
183
+ var level = state.level;
184
+ if(/(algorithm)/.test(textAfter)) level--;
185
+ if(/(equation)/.test(textAfter)) level--;
186
+ if(/(initial algorithm)/.test(textAfter)) level--;
187
+ if(/(initial equation)/.test(textAfter)) level--;
188
+ if(/(end)/.test(textAfter)) level--;
189
+
190
+ if(level > 0)
191
+ return indentUnit*level;
192
+ else
193
+ return 0;
194
+ },
195
+
196
+ blockCommentStart: "/*",
197
+ blockCommentEnd: "*/",
198
+ lineComment: "//"
199
+ };
200
+ });
201
+
202
+ function words(str) {
203
+ var obj = {}, words = str.split(" ");
204
+ for (var i=0; i<words.length; ++i)
205
+ obj[words[i]] = true;
206
+ return obj;
207
+ }
208
+
209
+ var modelicaKeywords = "algorithm and annotation assert block break class connect connector constant constrainedby der discrete each else elseif elsewhen encapsulated end enumeration equation expandable extends external false final flow for function if import impure in initial inner input loop model not operator or outer output package parameter partial protected public pure record redeclare replaceable return stream then true type when while within";
210
+ var modelicaBuiltin = "abs acos actualStream asin atan atan2 cardinality ceil cos cosh delay div edge exp floor getInstanceName homotopy inStream integer log log10 mod pre reinit rem semiLinear sign sin sinh spatialDistribution sqrt tan tanh";
211
+ var modelicaAtoms = "Real Boolean Integer String";
212
+
213
+ function def(mimes, mode) {
214
+ if (typeof mimes == "string")
215
+ mimes = [mimes];
216
+
217
+ var words = [];
218
+
219
+ function add(obj) {
220
+ if (obj)
221
+ for (var prop in obj)
222
+ if (obj.hasOwnProperty(prop))
223
+ words.push(prop);
224
+ }
225
+
226
+ add(mode.keywords);
227
+ add(mode.builtin);
228
+ add(mode.atoms);
229
+
230
+ if (words.length) {
231
+ mode.helperType = mimes[0];
232
+ CodeMirror.registerHelper("hintWords", mimes[0], words);
233
+ }
234
+
235
+ for (var i=0; i<mimes.length; ++i)
236
+ CodeMirror.defineMIME(mimes[i], mode);
237
+ }
238
+
239
+ def(["text/x-modelica"], {
240
+ name: "modelica",
241
+ keywords: words(modelicaKeywords),
242
+ builtin: words(modelicaBuiltin),
243
+ atoms: words(modelicaAtoms)
244
+ });
245
+ });