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,178 @@
1
+ // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
+ // Distributed under an MIT license: http://codemirror.net/LICENSE
3
+
4
+ /*
5
+ Gherkin mode - http://www.cukes.info/
6
+ Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues
7
+ */
8
+
9
+ // Following Objs from Brackets implementation: https://github.com/tregusti/brackets-gherkin/blob/master/main.js
10
+ //var Quotes = {
11
+ // SINGLE: 1,
12
+ // DOUBLE: 2
13
+ //};
14
+
15
+ //var regex = {
16
+ // keywords: /(Feature| {2}(Scenario|In order to|As|I)| {4}(Given|When|Then|And))/
17
+ //};
18
+
19
+ (function(mod) {
20
+ if (typeof exports == "object" && typeof module == "object") // CommonJS
21
+ mod(require("../../lib/codemirror"));
22
+ else if (typeof define == "function" && define.amd) // AMD
23
+ define(["../../lib/codemirror"], mod);
24
+ else // Plain browser env
25
+ mod(CodeMirror);
26
+ })(function(CodeMirror) {
27
+ "use strict";
28
+
29
+ CodeMirror.defineMode("gherkin", function () {
30
+ return {
31
+ startState: function () {
32
+ return {
33
+ lineNumber: 0,
34
+ tableHeaderLine: false,
35
+ allowFeature: true,
36
+ allowBackground: false,
37
+ allowScenario: false,
38
+ allowSteps: false,
39
+ allowPlaceholders: false,
40
+ allowMultilineArgument: false,
41
+ inMultilineString: false,
42
+ inMultilineTable: false,
43
+ inKeywordLine: false
44
+ };
45
+ },
46
+ token: function (stream, state) {
47
+ if (stream.sol()) {
48
+ state.lineNumber++;
49
+ state.inKeywordLine = false;
50
+ if (state.inMultilineTable) {
51
+ state.tableHeaderLine = false;
52
+ if (!stream.match(/\s*\|/, false)) {
53
+ state.allowMultilineArgument = false;
54
+ state.inMultilineTable = false;
55
+ }
56
+ }
57
+ }
58
+
59
+ stream.eatSpace();
60
+
61
+ if (state.allowMultilineArgument) {
62
+
63
+ // STRING
64
+ if (state.inMultilineString) {
65
+ if (stream.match('"""')) {
66
+ state.inMultilineString = false;
67
+ state.allowMultilineArgument = false;
68
+ } else {
69
+ stream.match(/.*/);
70
+ }
71
+ return "string";
72
+ }
73
+
74
+ // TABLE
75
+ if (state.inMultilineTable) {
76
+ if (stream.match(/\|\s*/)) {
77
+ return "bracket";
78
+ } else {
79
+ stream.match(/[^\|]*/);
80
+ return state.tableHeaderLine ? "header" : "string";
81
+ }
82
+ }
83
+
84
+ // DETECT START
85
+ if (stream.match('"""')) {
86
+ // String
87
+ state.inMultilineString = true;
88
+ return "string";
89
+ } else if (stream.match("|")) {
90
+ // Table
91
+ state.inMultilineTable = true;
92
+ state.tableHeaderLine = true;
93
+ return "bracket";
94
+ }
95
+
96
+ }
97
+
98
+ // LINE COMMENT
99
+ if (stream.match(/#.*/)) {
100
+ return "comment";
101
+
102
+ // TAG
103
+ } else if (!state.inKeywordLine && stream.match(/@\S+/)) {
104
+ return "tag";
105
+
106
+ // FEATURE
107
+ } else if (!state.inKeywordLine && state.allowFeature && stream.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)) {
108
+ state.allowScenario = true;
109
+ state.allowBackground = true;
110
+ state.allowPlaceholders = false;
111
+ state.allowSteps = false;
112
+ state.allowMultilineArgument = false;
113
+ state.inKeywordLine = true;
114
+ return "keyword";
115
+
116
+ // BACKGROUND
117
+ } else if (!state.inKeywordLine && state.allowBackground && stream.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)) {
118
+ state.allowPlaceholders = false;
119
+ state.allowSteps = true;
120
+ state.allowBackground = false;
121
+ state.allowMultilineArgument = false;
122
+ state.inKeywordLine = true;
123
+ return "keyword";
124
+
125
+ // SCENARIO OUTLINE
126
+ } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)) {
127
+ state.allowPlaceholders = true;
128
+ state.allowSteps = true;
129
+ state.allowMultilineArgument = false;
130
+ state.inKeywordLine = true;
131
+ return "keyword";
132
+
133
+ // EXAMPLES
134
+ } else if (state.allowScenario && stream.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)) {
135
+ state.allowPlaceholders = false;
136
+ state.allowSteps = true;
137
+ state.allowBackground = false;
138
+ state.allowMultilineArgument = true;
139
+ return "keyword";
140
+
141
+ // SCENARIO
142
+ } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)) {
143
+ state.allowPlaceholders = false;
144
+ state.allowSteps = true;
145
+ state.allowBackground = false;
146
+ state.allowMultilineArgument = false;
147
+ state.inKeywordLine = true;
148
+ return "keyword";
149
+
150
+ // STEPS
151
+ } else if (!state.inKeywordLine && state.allowSteps && stream.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)) {
152
+ state.inStep = true;
153
+ state.allowPlaceholders = true;
154
+ state.allowMultilineArgument = true;
155
+ state.inKeywordLine = true;
156
+ return "keyword";
157
+
158
+ // INLINE STRING
159
+ } else if (stream.match(/"[^"]*"?/)) {
160
+ return "string";
161
+
162
+ // PLACEHOLDER
163
+ } else if (state.allowPlaceholders && stream.match(/<[^>]*>?/)) {
164
+ return "variable";
165
+
166
+ // Fall through
167
+ } else {
168
+ stream.next();
169
+ stream.eatWhile(/[^@"<#]/);
170
+ return null;
171
+ }
172
+ }
173
+ };
174
+ });
175
+
176
+ CodeMirror.defineMIME("text/x-feature", "gherkin");
177
+
178
+ });
@@ -0,0 +1,187 @@
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("go", function(config) {
15
+ var indentUnit = config.indentUnit;
16
+
17
+ var keywords = {
18
+ "break":true, "case":true, "chan":true, "const":true, "continue":true,
19
+ "default":true, "defer":true, "else":true, "fallthrough":true, "for":true,
20
+ "func":true, "go":true, "goto":true, "if":true, "import":true,
21
+ "interface":true, "map":true, "package":true, "range":true, "return":true,
22
+ "select":true, "struct":true, "switch":true, "type":true, "var":true,
23
+ "bool":true, "byte":true, "complex64":true, "complex128":true,
24
+ "float32":true, "float64":true, "int8":true, "int16":true, "int32":true,
25
+ "int64":true, "string":true, "uint8":true, "uint16":true, "uint32":true,
26
+ "uint64":true, "int":true, "uint":true, "uintptr":true, "error": true,
27
+ "rune":true
28
+ };
29
+
30
+ var atoms = {
31
+ "true":true, "false":true, "iota":true, "nil":true, "append":true,
32
+ "cap":true, "close":true, "complex":true, "copy":true, "delete":true, "imag":true,
33
+ "len":true, "make":true, "new":true, "panic":true, "print":true,
34
+ "println":true, "real":true, "recover":true
35
+ };
36
+
37
+ var isOperatorChar = /[+\-*&^%:=<>!|\/]/;
38
+
39
+ var curPunc;
40
+
41
+ function tokenBase(stream, state) {
42
+ var ch = stream.next();
43
+ if (ch == '"' || ch == "'" || ch == "`") {
44
+ state.tokenize = tokenString(ch);
45
+ return state.tokenize(stream, state);
46
+ }
47
+ if (/[\d\.]/.test(ch)) {
48
+ if (ch == ".") {
49
+ stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/);
50
+ } else if (ch == "0") {
51
+ stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/);
52
+ } else {
53
+ stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/);
54
+ }
55
+ return "number";
56
+ }
57
+ if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
58
+ curPunc = ch;
59
+ return null;
60
+ }
61
+ if (ch == "/") {
62
+ if (stream.eat("*")) {
63
+ state.tokenize = tokenComment;
64
+ return tokenComment(stream, state);
65
+ }
66
+ if (stream.eat("/")) {
67
+ stream.skipToEnd();
68
+ return "comment";
69
+ }
70
+ }
71
+ if (isOperatorChar.test(ch)) {
72
+ stream.eatWhile(isOperatorChar);
73
+ return "operator";
74
+ }
75
+ stream.eatWhile(/[\w\$_\xa1-\uffff]/);
76
+ var cur = stream.current();
77
+ if (keywords.propertyIsEnumerable(cur)) {
78
+ if (cur == "case" || cur == "default") curPunc = "case";
79
+ return "keyword";
80
+ }
81
+ if (atoms.propertyIsEnumerable(cur)) return "atom";
82
+ return "variable";
83
+ }
84
+
85
+ function tokenString(quote) {
86
+ return function(stream, state) {
87
+ var escaped = false, next, end = false;
88
+ while ((next = stream.next()) != null) {
89
+ if (next == quote && !escaped) {end = true; break;}
90
+ escaped = !escaped && quote != "`" && next == "\\";
91
+ }
92
+ if (end || !(escaped || quote == "`"))
93
+ state.tokenize = tokenBase;
94
+ return "string";
95
+ };
96
+ }
97
+
98
+ function tokenComment(stream, state) {
99
+ var maybeEnd = false, ch;
100
+ while (ch = stream.next()) {
101
+ if (ch == "/" && maybeEnd) {
102
+ state.tokenize = tokenBase;
103
+ break;
104
+ }
105
+ maybeEnd = (ch == "*");
106
+ }
107
+ return "comment";
108
+ }
109
+
110
+ function Context(indented, column, type, align, prev) {
111
+ this.indented = indented;
112
+ this.column = column;
113
+ this.type = type;
114
+ this.align = align;
115
+ this.prev = prev;
116
+ }
117
+ function pushContext(state, col, type) {
118
+ return state.context = new Context(state.indented, col, type, null, state.context);
119
+ }
120
+ function popContext(state) {
121
+ if (!state.context.prev) return;
122
+ var t = state.context.type;
123
+ if (t == ")" || t == "]" || t == "}")
124
+ state.indented = state.context.indented;
125
+ return state.context = state.context.prev;
126
+ }
127
+
128
+ // Interface
129
+
130
+ return {
131
+ startState: function(basecolumn) {
132
+ return {
133
+ tokenize: null,
134
+ context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
135
+ indented: 0,
136
+ startOfLine: true
137
+ };
138
+ },
139
+
140
+ token: function(stream, state) {
141
+ var ctx = state.context;
142
+ if (stream.sol()) {
143
+ if (ctx.align == null) ctx.align = false;
144
+ state.indented = stream.indentation();
145
+ state.startOfLine = true;
146
+ if (ctx.type == "case") ctx.type = "}";
147
+ }
148
+ if (stream.eatSpace()) return null;
149
+ curPunc = null;
150
+ var style = (state.tokenize || tokenBase)(stream, state);
151
+ if (style == "comment") return style;
152
+ if (ctx.align == null) ctx.align = true;
153
+
154
+ if (curPunc == "{") pushContext(state, stream.column(), "}");
155
+ else if (curPunc == "[") pushContext(state, stream.column(), "]");
156
+ else if (curPunc == "(") pushContext(state, stream.column(), ")");
157
+ else if (curPunc == "case") ctx.type = "case";
158
+ else if (curPunc == "}" && ctx.type == "}") popContext(state);
159
+ else if (curPunc == ctx.type) popContext(state);
160
+ state.startOfLine = false;
161
+ return style;
162
+ },
163
+
164
+ indent: function(state, textAfter) {
165
+ if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;
166
+ var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
167
+ if (ctx.type == "case" && /^(?:case|default)\b/.test(textAfter)) {
168
+ state.context.type = "}";
169
+ return ctx.indented;
170
+ }
171
+ var closing = firstChar == ctx.type;
172
+ if (ctx.align) return ctx.column + (closing ? 0 : 1);
173
+ else return ctx.indented + (closing ? 0 : indentUnit);
174
+ },
175
+
176
+ electricChars: "{}):",
177
+ closeBrackets: "()[]{}''\"\"``",
178
+ fold: "brace",
179
+ blockCommentStart: "/*",
180
+ blockCommentEnd: "*/",
181
+ lineComment: "//"
182
+ };
183
+ });
184
+
185
+ CodeMirror.defineMIME("text/x-go", "go");
186
+
187
+ });
@@ -0,0 +1,230 @@
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("groovy", function(config) {
15
+ function words(str) {
16
+ var obj = {}, words = str.split(" ");
17
+ for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
18
+ return obj;
19
+ }
20
+ var keywords = words(
21
+ "abstract as assert boolean break byte case catch char class const continue def default " +
22
+ "do double else enum extends final finally float for goto if implements import in " +
23
+ "instanceof int interface long native new package private protected public return " +
24
+ "short static strictfp super switch synchronized threadsafe throw throws trait transient " +
25
+ "try void volatile while");
26
+ var blockKeywords = words("catch class def do else enum finally for if interface switch trait try while");
27
+ var standaloneKeywords = words("return break continue");
28
+ var atoms = words("null true false this");
29
+
30
+ var curPunc;
31
+ function tokenBase(stream, state) {
32
+ var ch = stream.next();
33
+ if (ch == '"' || ch == "'") {
34
+ return startString(ch, stream, state);
35
+ }
36
+ if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
37
+ curPunc = ch;
38
+ return null;
39
+ }
40
+ if (/\d/.test(ch)) {
41
+ stream.eatWhile(/[\w\.]/);
42
+ if (stream.eat(/eE/)) { stream.eat(/\+\-/); stream.eatWhile(/\d/); }
43
+ return "number";
44
+ }
45
+ if (ch == "/") {
46
+ if (stream.eat("*")) {
47
+ state.tokenize.push(tokenComment);
48
+ return tokenComment(stream, state);
49
+ }
50
+ if (stream.eat("/")) {
51
+ stream.skipToEnd();
52
+ return "comment";
53
+ }
54
+ if (expectExpression(state.lastToken, false)) {
55
+ return startString(ch, stream, state);
56
+ }
57
+ }
58
+ if (ch == "-" && stream.eat(">")) {
59
+ curPunc = "->";
60
+ return null;
61
+ }
62
+ if (/[+\-*&%=<>!?|\/~]/.test(ch)) {
63
+ stream.eatWhile(/[+\-*&%=<>|~]/);
64
+ return "operator";
65
+ }
66
+ stream.eatWhile(/[\w\$_]/);
67
+ if (ch == "@") { stream.eatWhile(/[\w\$_\.]/); return "meta"; }
68
+ if (state.lastToken == ".") return "property";
69
+ if (stream.eat(":")) { curPunc = "proplabel"; return "property"; }
70
+ var cur = stream.current();
71
+ if (atoms.propertyIsEnumerable(cur)) { return "atom"; }
72
+ if (keywords.propertyIsEnumerable(cur)) {
73
+ if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
74
+ else if (standaloneKeywords.propertyIsEnumerable(cur)) curPunc = "standalone";
75
+ return "keyword";
76
+ }
77
+ return "variable";
78
+ }
79
+ tokenBase.isBase = true;
80
+
81
+ function startString(quote, stream, state) {
82
+ var tripleQuoted = false;
83
+ if (quote != "/" && stream.eat(quote)) {
84
+ if (stream.eat(quote)) tripleQuoted = true;
85
+ else return "string";
86
+ }
87
+ function t(stream, state) {
88
+ var escaped = false, next, end = !tripleQuoted;
89
+ while ((next = stream.next()) != null) {
90
+ if (next == quote && !escaped) {
91
+ if (!tripleQuoted) { break; }
92
+ if (stream.match(quote + quote)) { end = true; break; }
93
+ }
94
+ if (quote == '"' && next == "$" && !escaped && stream.eat("{")) {
95
+ state.tokenize.push(tokenBaseUntilBrace());
96
+ return "string";
97
+ }
98
+ escaped = !escaped && next == "\\";
99
+ }
100
+ if (end) state.tokenize.pop();
101
+ return "string";
102
+ }
103
+ state.tokenize.push(t);
104
+ return t(stream, state);
105
+ }
106
+
107
+ function tokenBaseUntilBrace() {
108
+ var depth = 1;
109
+ function t(stream, state) {
110
+ if (stream.peek() == "}") {
111
+ depth--;
112
+ if (depth == 0) {
113
+ state.tokenize.pop();
114
+ return state.tokenize[state.tokenize.length-1](stream, state);
115
+ }
116
+ } else if (stream.peek() == "{") {
117
+ depth++;
118
+ }
119
+ return tokenBase(stream, state);
120
+ }
121
+ t.isBase = true;
122
+ return t;
123
+ }
124
+
125
+ function tokenComment(stream, state) {
126
+ var maybeEnd = false, ch;
127
+ while (ch = stream.next()) {
128
+ if (ch == "/" && maybeEnd) {
129
+ state.tokenize.pop();
130
+ break;
131
+ }
132
+ maybeEnd = (ch == "*");
133
+ }
134
+ return "comment";
135
+ }
136
+
137
+ function expectExpression(last, newline) {
138
+ return !last || last == "operator" || last == "->" || /[\.\[\{\(,;:]/.test(last) ||
139
+ last == "newstatement" || last == "keyword" || last == "proplabel" ||
140
+ (last == "standalone" && !newline);
141
+ }
142
+
143
+ function Context(indented, column, type, align, prev) {
144
+ this.indented = indented;
145
+ this.column = column;
146
+ this.type = type;
147
+ this.align = align;
148
+ this.prev = prev;
149
+ }
150
+ function pushContext(state, col, type) {
151
+ return state.context = new Context(state.indented, col, type, null, state.context);
152
+ }
153
+ function popContext(state) {
154
+ var t = state.context.type;
155
+ if (t == ")" || t == "]" || t == "}")
156
+ state.indented = state.context.indented;
157
+ return state.context = state.context.prev;
158
+ }
159
+
160
+ // Interface
161
+
162
+ return {
163
+ startState: function(basecolumn) {
164
+ return {
165
+ tokenize: [tokenBase],
166
+ context: new Context((basecolumn || 0) - config.indentUnit, 0, "top", false),
167
+ indented: 0,
168
+ startOfLine: true,
169
+ lastToken: null
170
+ };
171
+ },
172
+
173
+ token: function(stream, state) {
174
+ var ctx = state.context;
175
+ if (stream.sol()) {
176
+ if (ctx.align == null) ctx.align = false;
177
+ state.indented = stream.indentation();
178
+ state.startOfLine = true;
179
+ // Automatic semicolon insertion
180
+ if (ctx.type == "statement" && !expectExpression(state.lastToken, true)) {
181
+ popContext(state); ctx = state.context;
182
+ }
183
+ }
184
+ if (stream.eatSpace()) return null;
185
+ curPunc = null;
186
+ var style = state.tokenize[state.tokenize.length-1](stream, state);
187
+ if (style == "comment") return style;
188
+ if (ctx.align == null) ctx.align = true;
189
+
190
+ if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
191
+ // Handle indentation for {x -> \n ... }
192
+ else if (curPunc == "->" && ctx.type == "statement" && ctx.prev.type == "}") {
193
+ popContext(state);
194
+ state.context.align = false;
195
+ }
196
+ else if (curPunc == "{") pushContext(state, stream.column(), "}");
197
+ else if (curPunc == "[") pushContext(state, stream.column(), "]");
198
+ else if (curPunc == "(") pushContext(state, stream.column(), ")");
199
+ else if (curPunc == "}") {
200
+ while (ctx.type == "statement") ctx = popContext(state);
201
+ if (ctx.type == "}") ctx = popContext(state);
202
+ while (ctx.type == "statement") ctx = popContext(state);
203
+ }
204
+ else if (curPunc == ctx.type) popContext(state);
205
+ else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
206
+ pushContext(state, stream.column(), "statement");
207
+ state.startOfLine = false;
208
+ state.lastToken = curPunc || style;
209
+ return style;
210
+ },
211
+
212
+ indent: function(state, textAfter) {
213
+ if (!state.tokenize[state.tokenize.length-1].isBase) return CodeMirror.Pass;
214
+ var firstChar = textAfter && textAfter.charAt(0), ctx = state.context;
215
+ if (ctx.type == "statement" && !expectExpression(state.lastToken, true)) ctx = ctx.prev;
216
+ var closing = firstChar == ctx.type;
217
+ if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : config.indentUnit);
218
+ else if (ctx.align) return ctx.column + (closing ? 0 : 1);
219
+ else return ctx.indented + (closing ? 0 : config.indentUnit);
220
+ },
221
+
222
+ electricChars: "{}",
223
+ closeBrackets: {triples: "'\""},
224
+ fold: "brace"
225
+ };
226
+ });
227
+
228
+ CodeMirror.defineMIME("text/x-groovy", "groovy");
229
+
230
+ });