act-plus 1.1.18 → 1.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/act-plus.js +5 -3
  2. package/act-plus.umd.cjs +1729 -16
  3. package/assets/editor.worker-df55e1ff.js +8 -0
  4. package/assets/ts.worker-e151483b.js +33972 -0
  5. package/lib/abap-1354785f.js +1314 -0
  6. package/lib/apex-279d4f27.js +315 -0
  7. package/lib/azcli-ba812c55.js +74 -0
  8. package/lib/bat-4d77495d.js +95 -0
  9. package/lib/bicep-7b240724.js +108 -0
  10. package/lib/cameligo-5d2daeb8.js +168 -0
  11. package/lib/clojure-b7ea12a3.js +754 -0
  12. package/lib/coffee-1a8cfbf4.js +228 -0
  13. package/lib/{configBtns-58f43801.js → configBtns-3772e689.js} +2 -2
  14. package/lib/{configFileds-b537fd99.js → configFileds-d0911c87.js} +3 -3
  15. package/lib/{configForm-b9e9ca98.js → configForm-ae4b725e.js} +1 -1
  16. package/lib/{configTable-bdb56a9e.js → configTable-879063d4.js} +31 -24
  17. package/lib/cpp-642b10c4.js +387 -0
  18. package/lib/csharp-d987ddad.js +320 -0
  19. package/lib/csp-96407af0.js +57 -0
  20. package/lib/css-5dd354ac.js +186 -0
  21. package/lib/cssMode-6d02ab39.js +1448 -0
  22. package/lib/cypher-11e5a4b6.js +262 -0
  23. package/lib/dart-5d209f63.js +270 -0
  24. package/lib/{dialogAddField-b60d14ab.js → dialogAddField-d6b18048.js} +69 -69
  25. package/lib/{dialogConfigBtn-f5f8703d.js → dialogConfigBtn-75e37dc9.js} +74 -78
  26. package/lib/dockerfile-8739cff7.js +132 -0
  27. package/lib/ecl-a20c5155.js +454 -0
  28. package/lib/elixir-8b028584.js +467 -0
  29. package/lib/{enum-99519ce0.js → enum-cc58b8fe.js} +25 -22
  30. package/lib/flow9-0dea2e73.js +141 -0
  31. package/lib/freemarker2-205877bf.js +646 -0
  32. package/lib/fsharp-49a70fad.js +210 -0
  33. package/lib/go-46e3b371.js +208 -0
  34. package/lib/graphql-51a577e5.js +141 -0
  35. package/lib/handlebars-2d920faa.js +394 -0
  36. package/lib/hcl-56b85754.js +177 -0
  37. package/lib/html-6b99359b.js +284 -0
  38. package/lib/htmlMode-498c17d9.js +1458 -0
  39. package/lib/index-68063c4c.js +96 -0
  40. package/lib/index-7c264775.js +192 -0
  41. package/lib/index-a36b2284.js +304 -0
  42. package/lib/index-aff95ab9.js +63 -0
  43. package/lib/index-da0a0bfe.js +162173 -0
  44. package/lib/index-e2f2023d.js +35 -0
  45. package/lib/{index-9e3ed108.js → index-fb2754ee.js} +1 -1
  46. package/lib/ini-1d58d82f.js +68 -0
  47. package/lib/java-cd017f60.js +221 -0
  48. package/lib/javascript-5e40fe11.js +78 -0
  49. package/lib/jsonMode-2a821e9e.js +1869 -0
  50. package/lib/julia-a0caf483.js +496 -0
  51. package/lib/kotlin-c6e52a56.js +245 -0
  52. package/lib/less-718543b4.js +168 -0
  53. package/lib/lexon-5e6e7a44.js +151 -0
  54. package/lib/liquid-dc78aaf7.js +241 -0
  55. package/lib/lua-f159160b.js +157 -0
  56. package/lib/m3-aadaf771.js +210 -0
  57. package/lib/markdown-9b448c46.js +202 -0
  58. package/lib/mips-161e49ce.js +194 -0
  59. package/lib/msdax-f65cb1e6.js +377 -0
  60. package/lib/mysql-24549dd1.js +875 -0
  61. package/lib/objective-c-e129a5ca.js +188 -0
  62. package/lib/pascal-4ccdf5ce.js +245 -0
  63. package/lib/pascaligo-a9603dcd.js +158 -0
  64. package/lib/perl-ba1fb97a.js +599 -0
  65. package/lib/pgsql-89978310.js +843 -0
  66. package/lib/php-987b9d87.js +471 -0
  67. package/lib/pla-96c2695d.js +131 -0
  68. package/lib/postiats-7b52ebac.js +544 -0
  69. package/lib/powerquery-8954ec26.js +890 -0
  70. package/lib/powershell-f00d0274.js +233 -0
  71. package/lib/protobuf-3eb85f80.js +422 -0
  72. package/lib/pug-6fab415a.js +393 -0
  73. package/lib/python-e55144b2.js +262 -0
  74. package/lib/qsharp-4792f872.js +282 -0
  75. package/lib/r-630f5d6b.js +245 -0
  76. package/lib/razor-1fb88f53.js +515 -0
  77. package/lib/redis-276b8288.js +298 -0
  78. package/lib/redshift-520a7359.js +806 -0
  79. package/lib/restructuredtext-4676a3fc.js +162 -0
  80. package/lib/ruby-764137cd.js +444 -0
  81. package/lib/rust-97f8f6e1.js +337 -0
  82. package/lib/sb-8c22f14c.js +110 -0
  83. package/lib/scala-c68c650c.js +353 -0
  84. package/lib/scheme-e6a52cb0.js +114 -0
  85. package/lib/scss-45104c77.js +244 -0
  86. package/lib/shell-09452d42.js +224 -0
  87. package/lib/solidity-d4979008.js +1351 -0
  88. package/lib/sophia-21995caf.js +190 -0
  89. package/lib/sparql-5088743c.js +193 -0
  90. package/lib/sql-63ec8e76.js +818 -0
  91. package/lib/st-fa9ab362.js +414 -0
  92. package/lib/swift-abdf1835.js +315 -0
  93. package/lib/systemverilog-a4f858ed.js +556 -0
  94. package/lib/tcl-8adf937f.js +232 -0
  95. package/lib/tsMode-8d12d976.js +792 -0
  96. package/lib/twig-404eb73e.js +323 -0
  97. package/lib/typescript-97ed77ae.js +330 -0
  98. package/lib/vb-e21e8153.js +364 -0
  99. package/lib/xml-e843c667.js +98 -0
  100. package/lib/yaml-62bcf3fa.js +187 -0
  101. package/package.json +1 -1
  102. package/style.css +1 -1
  103. package/lib/index-14f7a543.js +0 -165
  104. package/lib/index-1f8ed34b.js +0 -11178
  105. package/lib/index-56217e0e.js +0 -96
  106. package/lib/index-8cb975d8.js +0 -297
  107. package/lib/index-9a1abd6b.js +0 -139
@@ -0,0 +1,162 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f)
4
+ * Released under the MIT license
5
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
6
+ *-----------------------------------------------------------------------------*/
7
+ var e = {
8
+ brackets: [
9
+ ["{", "}"],
10
+ ["[", "]"],
11
+ ["(", ")"]
12
+ ],
13
+ autoClosingPairs: [
14
+ { open: "{", close: "}" },
15
+ { open: "[", close: "]" },
16
+ { open: "(", close: ")" },
17
+ { open: "<", close: ">", notIn: ["string"] }
18
+ ],
19
+ surroundingPairs: [
20
+ { open: "(", close: ")" },
21
+ { open: "[", close: "]" },
22
+ { open: "`", close: "`" }
23
+ ],
24
+ folding: {
25
+ markers: {
26
+ start: new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),
27
+ end: new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")
28
+ }
29
+ }
30
+ }, n = {
31
+ defaultToken: "",
32
+ tokenPostfix: ".rst",
33
+ control: /[\\`*_\[\]{}()#+\-\.!]/,
34
+ escapes: /\\(?:@control)/,
35
+ empty: [
36
+ "area",
37
+ "base",
38
+ "basefont",
39
+ "br",
40
+ "col",
41
+ "frame",
42
+ "hr",
43
+ "img",
44
+ "input",
45
+ "isindex",
46
+ "link",
47
+ "meta",
48
+ "param"
49
+ ],
50
+ alphanumerics: /[A-Za-z0-9]/,
51
+ simpleRefNameWithoutBq: /(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/,
52
+ simpleRefName: /(?:`@phrase`|@simpleRefNameWithoutBq)/,
53
+ phrase: /@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/,
54
+ citationName: /[A-Za-z][A-Za-z0-9-_.]*/,
55
+ blockLiteralStart: /(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,
56
+ precedingChars: /(?:[ -:/'"<([{])/,
57
+ followingChars: /(?:[ -.,:;!?/'")\]}>]|$)/,
58
+ punctuation: /(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,
59
+ tokenizer: {
60
+ root: [
61
+ [/^(@punctuation{3,}$){1,1}?/, "keyword"],
62
+ [/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/, "keyword"],
63
+ [/([ ]::)\s*$/, "keyword", "@blankLineOfLiteralBlocks"],
64
+ [/(::)\s*$/, "keyword", "@blankLineOfLiteralBlocks"],
65
+ { include: "@tables" },
66
+ { include: "@explicitMarkupBlocks" },
67
+ { include: "@inlineMarkup" }
68
+ ],
69
+ explicitMarkupBlocks: [
70
+ { include: "@citations" },
71
+ { include: "@footnotes" },
72
+ [
73
+ /^(\.\.\s)(@simpleRefName)(::\s)(.*)$/,
74
+ [{ token: "", next: "subsequentLines" }, "keyword", "", ""]
75
+ ],
76
+ [
77
+ /^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/,
78
+ [{ token: "", next: "hyperlinks" }, "", "", "string.link", "", "", "string.link"]
79
+ ],
80
+ [
81
+ /^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/,
82
+ [{ token: "", next: "subsequentLines" }, "", "", "", "string.link"]
83
+ ],
84
+ [/^(__\s+)(.+)/, ["", "string.link"]],
85
+ [
86
+ /^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/,
87
+ [{ token: "", next: "subsequentLines" }, "", "string.link", "", "keyword", ""],
88
+ "@rawBlocks"
89
+ ],
90
+ [/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/, ["", "string.link", ""]],
91
+ [/^(\.\.)([ ].*)$/, [{ token: "", next: "@comments" }, "comment"]]
92
+ ],
93
+ inlineMarkup: [
94
+ { include: "@citationsReference" },
95
+ { include: "@footnotesReference" },
96
+ [/(@simpleRefName)(_{1,2})/, ["string.link", ""]],
97
+ [/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/, ["", "string.link", "", "string.link", "", "", ""]],
98
+ [/\*\*([^\\*]|\*(?!\*))+\*\*/, "strong"],
99
+ [/\*[^*]+\*/, "emphasis"],
100
+ [/(``)((?:[^`]|\`(?!`))+)(``)/, ["", "keyword", ""]],
101
+ [/(__\s+)(.+)/, ["", "keyword"]],
102
+ [/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/, ["", "keyword", "", "", ""]],
103
+ [/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/, ["", "", "", "keyword", ""]],
104
+ [/(`)([^`]+)(`)/, ""],
105
+ [/(_`)(@phrase)(`)/, ["", "string.link", ""]]
106
+ ],
107
+ citations: [
108
+ [
109
+ /^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/,
110
+ [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
111
+ ]
112
+ ],
113
+ citationsReference: [[/(\[)(@citationName)(\]_)/, ["", "string.link", ""]]],
114
+ footnotes: [
115
+ [
116
+ /^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/,
117
+ [{ token: "", next: "@subsequentLines" }, "string.link", ""]
118
+ ],
119
+ [
120
+ /^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/,
121
+ [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
122
+ ],
123
+ [
124
+ /^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/,
125
+ [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
126
+ ]
127
+ ],
128
+ footnotesReference: [
129
+ [/(\[)([0-9]+)(\])(_)/, ["", "string.link", "", ""]],
130
+ [/(\[)(#@simpleRefName?)(\])(_)/, ["", "string.link", "", ""]],
131
+ [/(\[)(\*)(\])(_)/, ["", "string.link", "", ""]]
132
+ ],
133
+ blankLineOfLiteralBlocks: [
134
+ [/^$/, "", "@subsequentLinesOfLiteralBlocks"],
135
+ [/^.*$/, "", "@pop"]
136
+ ],
137
+ subsequentLinesOfLiteralBlocks: [
138
+ [/(@blockLiteralStart+)(.*)/, ["keyword", ""]],
139
+ [/^(?!blockLiteralStart)/, "", "@popall"]
140
+ ],
141
+ subsequentLines: [
142
+ [/^[\s]+.*/, ""],
143
+ [/^(?!\s)/, "", "@pop"]
144
+ ],
145
+ hyperlinks: [
146
+ [/^[\s]+.*/, "string.link"],
147
+ [/^(?!\s)/, "", "@pop"]
148
+ ],
149
+ comments: [
150
+ [/^[\s]+.*/, "comment"],
151
+ [/^(?!\s)/, "", "@pop"]
152
+ ],
153
+ tables: [
154
+ [/\+-[+-]+/, "keyword"],
155
+ [/\+=[+=]+/, "keyword"]
156
+ ]
157
+ }
158
+ };
159
+ export {
160
+ e as conf,
161
+ n as language
162
+ };
@@ -0,0 +1,444 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f)
4
+ * Released under the MIT license
5
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
6
+ *-----------------------------------------------------------------------------*/
7
+ var e = {
8
+ comments: {
9
+ lineComment: "#",
10
+ blockComment: ["=begin", "=end"]
11
+ },
12
+ brackets: [
13
+ ["(", ")"],
14
+ ["{", "}"],
15
+ ["[", "]"]
16
+ ],
17
+ autoClosingPairs: [
18
+ { open: "{", close: "}" },
19
+ { open: "[", close: "]" },
20
+ { open: "(", close: ")" },
21
+ { open: '"', close: '"' },
22
+ { open: "'", close: "'" }
23
+ ],
24
+ surroundingPairs: [
25
+ { open: "{", close: "}" },
26
+ { open: "[", close: "]" },
27
+ { open: "(", close: ")" },
28
+ { open: '"', close: '"' },
29
+ { open: "'", close: "'" }
30
+ ],
31
+ indentationRules: {
32
+ increaseIndentPattern: new RegExp(`^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|'|/).*\\4)*(#.*)?$`),
33
+ decreaseIndentPattern: new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")
34
+ }
35
+ }, t = {
36
+ tokenPostfix: ".ruby",
37
+ keywords: [
38
+ "__LINE__",
39
+ "__ENCODING__",
40
+ "__FILE__",
41
+ "BEGIN",
42
+ "END",
43
+ "alias",
44
+ "and",
45
+ "begin",
46
+ "break",
47
+ "case",
48
+ "class",
49
+ "def",
50
+ "defined?",
51
+ "do",
52
+ "else",
53
+ "elsif",
54
+ "end",
55
+ "ensure",
56
+ "for",
57
+ "false",
58
+ "if",
59
+ "in",
60
+ "module",
61
+ "next",
62
+ "nil",
63
+ "not",
64
+ "or",
65
+ "redo",
66
+ "rescue",
67
+ "retry",
68
+ "return",
69
+ "self",
70
+ "super",
71
+ "then",
72
+ "true",
73
+ "undef",
74
+ "unless",
75
+ "until",
76
+ "when",
77
+ "while",
78
+ "yield"
79
+ ],
80
+ keywordops: ["::", "..", "...", "?", ":", "=>"],
81
+ builtins: [
82
+ "require",
83
+ "public",
84
+ "private",
85
+ "include",
86
+ "extend",
87
+ "attr_reader",
88
+ "protected",
89
+ "private_class_method",
90
+ "protected_class_method",
91
+ "new"
92
+ ],
93
+ declarations: [
94
+ "module",
95
+ "class",
96
+ "def",
97
+ "case",
98
+ "do",
99
+ "begin",
100
+ "for",
101
+ "if",
102
+ "while",
103
+ "until",
104
+ "unless"
105
+ ],
106
+ linedecls: ["def", "case", "do", "begin", "for", "if", "while", "until", "unless"],
107
+ operators: [
108
+ "^",
109
+ "&",
110
+ "|",
111
+ "<=>",
112
+ "==",
113
+ "===",
114
+ "!~",
115
+ "=~",
116
+ ">",
117
+ ">=",
118
+ "<",
119
+ "<=",
120
+ "<<",
121
+ ">>",
122
+ "+",
123
+ "-",
124
+ "*",
125
+ "/",
126
+ "%",
127
+ "**",
128
+ "~",
129
+ "+@",
130
+ "-@",
131
+ "[]",
132
+ "[]=",
133
+ "`",
134
+ "+=",
135
+ "-=",
136
+ "*=",
137
+ "**=",
138
+ "/=",
139
+ "^=",
140
+ "%=",
141
+ "<<=",
142
+ ">>=",
143
+ "&=",
144
+ "&&=",
145
+ "||=",
146
+ "|="
147
+ ],
148
+ brackets: [
149
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
150
+ { open: "{", close: "}", token: "delimiter.curly" },
151
+ { open: "[", close: "]", token: "delimiter.square" }
152
+ ],
153
+ symbols: /[=><!~?:&|+\-*\/\^%\.]+/,
154
+ escape: /(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,
155
+ escapes: /\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,
156
+ decpart: /\d(_?\d)*/,
157
+ decimal: /0|@decpart/,
158
+ delim: /[^a-zA-Z0-9\s\n\r]/,
159
+ heredelim: /(?:\w+|'[^']*'|"[^"]*"|`[^`]*`)/,
160
+ regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
161
+ regexpesc: /\\(?:[AzZbBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})?/,
162
+ tokenizer: {
163
+ root: [
164
+ [
165
+ /^(\s*)([a-z_]\w*[!?=]?)/,
166
+ [
167
+ "white",
168
+ {
169
+ cases: {
170
+ "for|until|while": {
171
+ token: "keyword.$2",
172
+ next: "@dodecl.$2"
173
+ },
174
+ "@declarations": {
175
+ token: "keyword.$2",
176
+ next: "@root.$2"
177
+ },
178
+ end: { token: "keyword.$S2", next: "@pop" },
179
+ "@keywords": "keyword",
180
+ "@builtins": "predefined",
181
+ "@default": "identifier"
182
+ }
183
+ }
184
+ ]
185
+ ],
186
+ [
187
+ /[a-z_]\w*[!?=]?/,
188
+ {
189
+ cases: {
190
+ "if|unless|while|until": {
191
+ token: "keyword.$0x",
192
+ next: "@modifier.$0x"
193
+ },
194
+ for: { token: "keyword.$2", next: "@dodecl.$2" },
195
+ "@linedecls": { token: "keyword.$0", next: "@root.$0" },
196
+ end: { token: "keyword.$S2", next: "@pop" },
197
+ "@keywords": "keyword",
198
+ "@builtins": "predefined",
199
+ "@default": "identifier"
200
+ }
201
+ }
202
+ ],
203
+ [/[A-Z][\w]*[!?=]?/, "constructor.identifier"],
204
+ [/\$[\w]*/, "global.constant"],
205
+ [/@[\w]*/, "namespace.instance.identifier"],
206
+ [/@@@[\w]*/, "namespace.class.identifier"],
207
+ [/<<[-~](@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
208
+ [/[ \t\r\n]+<<(@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
209
+ [/^<<(@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
210
+ { include: "@whitespace" },
211
+ [/"/, { token: "string.d.delim", next: '@dstring.d."' }],
212
+ [/'/, { token: "string.sq.delim", next: "@sstring.sq" }],
213
+ [/%([rsqxwW]|Q?)/, { token: "@rematch", next: "pstring" }],
214
+ [/`/, { token: "string.x.delim", next: "@dstring.x.`" }],
215
+ [/:(\w|[$@])\w*[!?=]?/, "string.s"],
216
+ [/:"/, { token: "string.s.delim", next: '@dstring.s."' }],
217
+ [/:'/, { token: "string.s.delim", next: "@sstring.s" }],
218
+ [/\/(?=(\\\/|[^\/\n])+\/)/, { token: "regexp.delim", next: "@regexp" }],
219
+ [/[{}()\[\]]/, "@brackets"],
220
+ [
221
+ /@symbols/,
222
+ {
223
+ cases: {
224
+ "@keywordops": "keyword",
225
+ "@operators": "operator",
226
+ "@default": ""
227
+ }
228
+ }
229
+ ],
230
+ [/[;,]/, "delimiter"],
231
+ [/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/, "number.hex"],
232
+ [/0[_oO][0-7](_?[0-7])*/, "number.octal"],
233
+ [/0[bB][01](_?[01])*/, "number.binary"],
234
+ [/0[dD]@decpart/, "number"],
235
+ [
236
+ /@decimal((\.@decpart)?([eE][\-+]?@decpart)?)/,
237
+ {
238
+ cases: {
239
+ $1: "number.float",
240
+ "@default": "number"
241
+ }
242
+ }
243
+ ]
244
+ ],
245
+ dodecl: [
246
+ [/^/, { token: "", switchTo: "@root.$S2" }],
247
+ [
248
+ /[a-z_]\w*[!?=]?/,
249
+ {
250
+ cases: {
251
+ end: { token: "keyword.$S2", next: "@pop" },
252
+ do: { token: "keyword", switchTo: "@root.$S2" },
253
+ "@linedecls": {
254
+ token: "@rematch",
255
+ switchTo: "@root.$S2"
256
+ },
257
+ "@keywords": "keyword",
258
+ "@builtins": "predefined",
259
+ "@default": "identifier"
260
+ }
261
+ }
262
+ ],
263
+ { include: "@root" }
264
+ ],
265
+ modifier: [
266
+ [/^/, "", "@pop"],
267
+ [
268
+ /[a-z_]\w*[!?=]?/,
269
+ {
270
+ cases: {
271
+ end: { token: "keyword.$S2", next: "@pop" },
272
+ "then|else|elsif|do": {
273
+ token: "keyword",
274
+ switchTo: "@root.$S2"
275
+ },
276
+ "@linedecls": {
277
+ token: "@rematch",
278
+ switchTo: "@root.$S2"
279
+ },
280
+ "@keywords": "keyword",
281
+ "@builtins": "predefined",
282
+ "@default": "identifier"
283
+ }
284
+ }
285
+ ],
286
+ { include: "@root" }
287
+ ],
288
+ sstring: [
289
+ [/[^\\']+/, "string.$S2"],
290
+ [/\\\\|\\'|\\$/, "string.$S2.escape"],
291
+ [/\\./, "string.$S2.invalid"],
292
+ [/'/, { token: "string.$S2.delim", next: "@pop" }]
293
+ ],
294
+ dstring: [
295
+ [/[^\\`"#]+/, "string.$S2"],
296
+ [/#/, "string.$S2.escape", "@interpolated"],
297
+ [/\\$/, "string.$S2.escape"],
298
+ [/@escapes/, "string.$S2.escape"],
299
+ [/\\./, "string.$S2.escape.invalid"],
300
+ [
301
+ /[`"]/,
302
+ {
303
+ cases: {
304
+ "$#==$S3": { token: "string.$S2.delim", next: "@pop" },
305
+ "@default": "string.$S2"
306
+ }
307
+ }
308
+ ]
309
+ ],
310
+ heredoc: [
311
+ [
312
+ /^(\s*)(@heredelim)$/,
313
+ {
314
+ cases: {
315
+ "$2==$S2": ["string.heredoc", { token: "string.heredoc.delimiter", next: "@pop" }],
316
+ "@default": ["string.heredoc", "string.heredoc"]
317
+ }
318
+ }
319
+ ],
320
+ [/.*/, "string.heredoc"]
321
+ ],
322
+ interpolated: [
323
+ [/\$\w*/, "global.constant", "@pop"],
324
+ [/@\w*/, "namespace.class.identifier", "@pop"],
325
+ [/@@@\w*/, "namespace.instance.identifier", "@pop"],
326
+ [
327
+ /[{]/,
328
+ {
329
+ token: "string.escape.curly",
330
+ switchTo: "@interpolated_compound"
331
+ }
332
+ ],
333
+ ["", "", "@pop"]
334
+ ],
335
+ interpolated_compound: [
336
+ [/[}]/, { token: "string.escape.curly", next: "@pop" }],
337
+ { include: "@root" }
338
+ ],
339
+ pregexp: [
340
+ { include: "@whitespace" },
341
+ [
342
+ /[^\(\{\[\\]/,
343
+ {
344
+ cases: {
345
+ "$#==$S3": { token: "regexp.delim", next: "@pop" },
346
+ "$#==$S2": { token: "regexp.delim", next: "@push" },
347
+ "~[)}\\]]": "@brackets.regexp.escape.control",
348
+ "~@regexpctl": "regexp.escape.control",
349
+ "@default": "regexp"
350
+ }
351
+ }
352
+ ],
353
+ { include: "@regexcontrol" }
354
+ ],
355
+ regexp: [
356
+ { include: "@regexcontrol" },
357
+ [/[^\\\/]/, "regexp"],
358
+ ["/[ixmp]*", { token: "regexp.delim" }, "@pop"]
359
+ ],
360
+ regexcontrol: [
361
+ [
362
+ /(\{)(\d+(?:,\d*)?)(\})/,
363
+ [
364
+ "@brackets.regexp.escape.control",
365
+ "regexp.escape.control",
366
+ "@brackets.regexp.escape.control"
367
+ ]
368
+ ],
369
+ [
370
+ /(\[)(\^?)/,
371
+ ["@brackets.regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
372
+ ],
373
+ [/(\()(\?[:=!])/, ["@brackets.regexp.escape.control", "regexp.escape.control"]],
374
+ [/\(\?#/, { token: "regexp.escape.control", next: "@regexpcomment" }],
375
+ [/[()]/, "@brackets.regexp.escape.control"],
376
+ [/@regexpctl/, "regexp.escape.control"],
377
+ [/\\$/, "regexp.escape"],
378
+ [/@regexpesc/, "regexp.escape"],
379
+ [/\\\./, "regexp.invalid"],
380
+ [/#/, "regexp.escape", "@interpolated"]
381
+ ],
382
+ regexrange: [
383
+ [/-/, "regexp.escape.control"],
384
+ [/\^/, "regexp.invalid"],
385
+ [/\\$/, "regexp.escape"],
386
+ [/@regexpesc/, "regexp.escape"],
387
+ [/[^\]]/, "regexp"],
388
+ [/\]/, "@brackets.regexp.escape.control", "@pop"]
389
+ ],
390
+ regexpcomment: [
391
+ [/[^)]+/, "comment"],
392
+ [/\)/, { token: "regexp.escape.control", next: "@pop" }]
393
+ ],
394
+ pstring: [
395
+ [/%([qws])\(/, { token: "string.$1.delim", switchTo: "@qstring.$1.(.)" }],
396
+ [/%([qws])\[/, { token: "string.$1.delim", switchTo: "@qstring.$1.[.]" }],
397
+ [/%([qws])\{/, { token: "string.$1.delim", switchTo: "@qstring.$1.{.}" }],
398
+ [/%([qws])</, { token: "string.$1.delim", switchTo: "@qstring.$1.<.>" }],
399
+ [/%([qws])(@delim)/, { token: "string.$1.delim", switchTo: "@qstring.$1.$2.$2" }],
400
+ [/%r\(/, { token: "regexp.delim", switchTo: "@pregexp.(.)" }],
401
+ [/%r\[/, { token: "regexp.delim", switchTo: "@pregexp.[.]" }],
402
+ [/%r\{/, { token: "regexp.delim", switchTo: "@pregexp.{.}" }],
403
+ [/%r</, { token: "regexp.delim", switchTo: "@pregexp.<.>" }],
404
+ [/%r(@delim)/, { token: "regexp.delim", switchTo: "@pregexp.$1.$1" }],
405
+ [/%(x|W|Q?)\(/, { token: "string.$1.delim", switchTo: "@qqstring.$1.(.)" }],
406
+ [/%(x|W|Q?)\[/, { token: "string.$1.delim", switchTo: "@qqstring.$1.[.]" }],
407
+ [/%(x|W|Q?)\{/, { token: "string.$1.delim", switchTo: "@qqstring.$1.{.}" }],
408
+ [/%(x|W|Q?)</, { token: "string.$1.delim", switchTo: "@qqstring.$1.<.>" }],
409
+ [/%(x|W|Q?)(@delim)/, { token: "string.$1.delim", switchTo: "@qqstring.$1.$2.$2" }],
410
+ [/%([rqwsxW]|Q?)./, { token: "invalid", next: "@pop" }],
411
+ [/./, { token: "invalid", next: "@pop" }]
412
+ ],
413
+ qstring: [
414
+ [/\\$/, "string.$S2.escape"],
415
+ [/\\./, "string.$S2.escape"],
416
+ [
417
+ /./,
418
+ {
419
+ cases: {
420
+ "$#==$S4": { token: "string.$S2.delim", next: "@pop" },
421
+ "$#==$S3": { token: "string.$S2.delim", next: "@push" },
422
+ "@default": "string.$S2"
423
+ }
424
+ }
425
+ ]
426
+ ],
427
+ qqstring: [[/#/, "string.$S2.escape", "@interpolated"], { include: "@qstring" }],
428
+ whitespace: [
429
+ [/[ \t\r\n]+/, ""],
430
+ [/^\s*=begin\b/, "comment", "@comment"],
431
+ [/#.*$/, "comment"]
432
+ ],
433
+ comment: [
434
+ [/[^=]+/, "comment"],
435
+ [/^\s*=begin\b/, "comment.invalid"],
436
+ [/^\s*=end\b.*/, "comment", "@pop"],
437
+ [/[=]/, "comment"]
438
+ ]
439
+ }
440
+ };
441
+ export {
442
+ e as conf,
443
+ t as language
444
+ };