@ansible/ansible-ui-framework 2.4.2597 → 2.4.2598
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +45612 -148
- package/index.umd.cjs +261 -2173
- package/package.json +7 -6
- package/publish/index.d.ts +337 -148
- package/style.css +1 -1
- package/abap-BgxiW-yv.js +0 -1404
- package/apex-Ci_BavZh.js +0 -332
- package/azcli-dfO4wGjy.js +0 -74
- package/bat-DD810Xk_.js +0 -106
- package/bicep-8OENIIxl.js +0 -108
- package/cameligo-NqPxsDwa.js +0 -180
- package/clojure-DuHkQIc1.js +0 -767
- package/coffee-B3cpF2mL.js +0 -238
- package/cpp-BJvlC8pp.js +0 -395
- package/csharp-B-mepg9G.js +0 -332
- package/csp-CZDIWMVF.js +0 -59
- package/css-CLWUu9O1.js +0 -193
- package/cssMode-BW_EgCuT.js +0 -1577
- package/cypher-DaPSdc0H.js +0 -269
- package/dart-Do9iT_o8.js +0 -287
- package/dockerfile-CbJBIDss.js +0 -136
- package/ecl-BqVPFR32.js +0 -462
- package/elixir-D1QTcrNJ.js +0 -575
- package/flow9-8noNFj4g.js +0 -148
- package/freemarker2-CZroC-2x.js +0 -995
- package/fsharp-C8jetu08.js +0 -223
- package/go-CwkaVtEf.js +0 -224
- package/graphql-CN0L02lB.js +0 -157
- package/handlebars-DdZaSSq2.js +0 -425
- package/hcl-B8DTUjkt.js +0 -189
- package/html-BStYWvMR.js +0 -314
- package/htmlMode-BZ30jslh.js +0 -1587
- package/index-_bG9dmst.js +0 -157805
- package/ini-BAHk9dez.js +0 -77
- package/java-BqU7F-WC.js +0 -238
- package/javascript-R1fkmvzs.js +0 -76
- package/jsonMode-B3D-ZZhn.js +0 -2002
- package/julia-7wzAFYJ_.js +0 -517
- package/kotlin-Ds6t9yxb.js +0 -259
- package/less-BsKXqSGe.js +0 -168
- package/lexon-CxjeM0Fy.js +0 -163
- package/liquid-COCYG7jZ.js +0 -246
- package/lua-CZeocWyu.js +0 -168
- package/m3-DrAa334y.js +0 -216
- package/markdown-BKScSdMX.js +0 -235
- package/mdx-CnriKNQ4.js +0 -171
- package/mips-C2kxK_Lk.js +0 -204
- package/msdax-CV-iM8Y9.js +0 -381
- package/mysql-0UKhlzQO.js +0 -884
- package/objective-c-CbKhSCGr.js +0 -189
- package/pascal-CP-K8RTj.js +0 -257
- package/pascaligo-DNS345Ec.js +0 -170
- package/perl-CU_O2Ux7.js +0 -632
- package/pgsql-CvE830Au.js +0 -857
- package/php-BvwPLbR6.js +0 -506
- package/pla-DJ8gwRb5.js +0 -143
- package/postiats-CGZof9No.js +0 -913
- package/powerquery-C7bI8brw.js +0 -896
- package/powershell-CmptSHHa.js +0 -245
- package/protobuf-CNFSy7mI.js +0 -426
- package/publish/abap-BgxiW-yv.d.ts +0 -63
- package/publish/apex-Ci_BavZh.d.ts +0 -65
- package/publish/azcli-dfO4wGjy.d.ts +0 -47
- package/publish/bat-DD810Xk_.d.ts +0 -57
- package/publish/bicep-8OENIIxl.d.ts +0 -146
- package/publish/cameligo-NqPxsDwa.d.ts +0 -55
- package/publish/clojure-DuHkQIc1.d.ts +0 -50
- package/publish/coffee-B3cpF2mL.d.ts +0 -102
- package/publish/cpp-BJvlC8pp.d.ts +0 -83
- package/publish/csharp-B-mepg9G.d.ts +0 -113
- package/publish/csp-CZDIWMVF.d.ts +0 -17
- package/publish/css-CLWUu9O1.d.ts +0 -144
- package/publish/cssMode-BW_EgCuT.d.ts +0 -130
- package/publish/cypher-DaPSdc0H.d.ts +0 -65
- package/publish/dart-Do9iT_o8.d.ts +0 -83
- package/publish/dockerfile-CbJBIDss.d.ts +0 -73
- package/publish/ecl-BqVPFR32.d.ts +0 -60
- package/publish/elixir-D1QTcrNJ.d.ts +0 -307
- package/publish/flow9-8noNFj4g.d.ts +0 -45
- package/publish/freemarker2-CZroC-2x.d.ts +0 -1543
- package/publish/fsharp-C8jetu08.d.ts +0 -61
- package/publish/go-CwkaVtEf.d.ts +0 -51
- package/publish/graphql-CN0L02lB.d.ts +0 -75
- package/publish/handlebars-DdZaSSq2.d.ts +0 -176
- package/publish/hcl-B8DTUjkt.d.ts +0 -77
- package/publish/html-BStYWvMR.d.ts +0 -129
- package/publish/htmlMode-BZ30jslh.d.ts +0 -131
- package/publish/index-_bG9dmst.d.ts +0 -2914
- package/publish/ini-BAHk9dez.d.ts +0 -35
- package/publish/java-BqU7F-WC.d.ts +0 -57
- package/publish/javascript-R1fkmvzs.d.ts +0 -111
- package/publish/jsonMode-B3D-ZZhn.d.ts +0 -131
- package/publish/julia-7wzAFYJ_.d.ts +0 -92
- package/publish/kotlin-Ds6t9yxb.d.ts +0 -57
- package/publish/less-BsKXqSGe.d.ts +0 -88
- package/publish/lexon-CxjeM0Fy.d.ts +0 -81
- package/publish/liquid-COCYG7jZ.d.ts +0 -73
- package/publish/lua-CZeocWyu.d.ts +0 -66
- package/publish/m3-DrAa334y.d.ts +0 -63
- package/publish/markdown-BKScSdMX.d.ts +0 -129
- package/publish/mdx-CnriKNQ4.d.ts +0 -139
- package/publish/mips-C2kxK_Lk.d.ts +0 -79
- package/publish/msdax-CV-iM8Y9.d.ts +0 -68
- package/publish/mysql-0UKhlzQO.d.ts +0 -76
- package/publish/objective-c-CbKhSCGr.d.ts +0 -46
- package/publish/pascal-CP-K8RTj.d.ts +0 -62
- package/publish/pascaligo-DNS345Ec.d.ts +0 -55
- package/publish/perl-CU_O2Ux7.d.ts +0 -116
- package/publish/pgsql-CvE830Au.d.ts +0 -80
- package/publish/php-BvwPLbR6.d.ts +0 -193
- package/publish/pla-DJ8gwRb5.d.ts +0 -71
- package/publish/postiats-CGZof9No.d.ts +0 -212
- package/publish/powerquery-C7bI8brw.d.ts +0 -63
- package/publish/powershell-CmptSHHa.d.ts +0 -119
- package/publish/protobuf-CNFSy7mI.d.ts +0 -364
- package/publish/pug-CzItlbqs.d.ts +0 -170
- package/publish/python-8vPuu566.d.ts +0 -65
- package/publish/qsharp-C1B8howk.d.ts +0 -75
- package/publish/r-BTwZKg_d.d.ts +0 -77
- package/publish/razor-CtOmeuwi.d.ts +0 -194
- package/publish/redis-BUv7CvJd.d.ts +0 -63
- package/publish/redshift-jrBDFghq.d.ts +0 -80
- package/publish/restructuredtext-BxbR-VyS.d.ts +0 -69
- package/publish/ruby-B0TfnHZH.d.ts +0 -239
- package/publish/rust-D_saCUFK.d.ts +0 -94
- package/publish/sb-DcgiWk7t.d.ts +0 -54
- package/publish/scala-BfLWIEFR.d.ts +0 -135
- package/publish/scheme-CZaOrAgo.d.ts +0 -46
- package/publish/scss-Du10_18v.d.ts +0 -220
- package/publish/shell-D1p7ZuXl.d.ts +0 -53
- package/publish/solidity-DzIDOgno.d.ts +0 -50
- package/publish/sophia-BU-qT3RS.d.ts +0 -50
- package/publish/sparql-DVtIp1VH.d.ts +0 -47
- package/publish/sql-1GwNodTS.d.ts +0 -86
- package/publish/st-DPXgTepQ.d.ts +0 -87
- package/publish/swift-ZhwunzBf.d.ts +0 -80
- package/publish/systemverilog-CVvtzxud.d.ts +0 -109
- package/publish/tcl-CYCJd6bV.d.ts +0 -87
- package/publish/tsMode-BSdN2klD.d.ts +0 -436
- package/publish/twig-JIfYOL6u.d.ts +0 -135
- package/publish/typescript-DWjYWuYm.d.ts +0 -110
- package/publish/typespec-BH4BOGFR.d.ts +0 -146
- package/publish/vb-6Rp6KK9h.d.ts +0 -60
- package/publish/wgsl-kJTvkQmx.d.ts +0 -72
- package/publish/xml-BqVRyB3K.d.ts +0 -72
- package/publish/yaml-DEH8xqyy.d.ts +0 -87
- package/pug-CzItlbqs.js +0 -408
- package/python-8vPuu566.js +0 -307
- package/qsharp-C1B8howk.js +0 -307
- package/r-BTwZKg_d.js +0 -249
- package/razor-CtOmeuwi.js +0 -556
- package/redis-BUv7CvJd.js +0 -308
- package/redshift-jrBDFghq.js +0 -815
- package/restructuredtext-BxbR-VyS.js +0 -180
- package/ruby-B0TfnHZH.js +0 -517
- package/rust-D_saCUFK.js +0 -349
- package/sb-DcgiWk7t.js +0 -121
- package/scala-BfLWIEFR.js +0 -376
- package/scheme-CZaOrAgo.js +0 -114
- package/scss-Du10_18v.js +0 -268
- package/shell-D1p7ZuXl.js +0 -227
- package/solidity-DzIDOgno.js +0 -1373
- package/sophia-BU-qT3RS.js +0 -205
- package/sparql-DVtIp1VH.js +0 -207
- package/sql-1GwNodTS.js +0 -859
- package/st-DPXgTepQ.js +0 -422
- package/swift-ZhwunzBf.js +0 -318
- package/systemverilog-CVvtzxud.js +0 -582
- package/tcl-CYCJd6bV.js +0 -238
- package/tsMode-BSdN2klD.js +0 -895
- package/twig-JIfYOL6u.js +0 -398
- package/typescript-DWjYWuYm.js +0 -349
- package/typespec-BH4BOGFR.js +0 -123
- package/vb-6Rp6KK9h.js +0 -378
- package/wgsl-kJTvkQmx.js +0 -445
- package/xml-BqVRyB3K.js +0 -101
- package/yaml-DEH8xqyy.js +0 -212
package/elixir-D1QTcrNJ.js
DELETED
@@ -1,575 +0,0 @@
|
|
1
|
-
/*!-----------------------------------------------------------------------------
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
-
* Version: 0.52.0(f6dc0eb8fce67e57f6036f4769d92c1666cdf546)
|
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
|
-
},
|
11
|
-
brackets: [
|
12
|
-
["{", "}"],
|
13
|
-
["[", "]"],
|
14
|
-
["(", ")"]
|
15
|
-
],
|
16
|
-
surroundingPairs: [
|
17
|
-
{ open: "{", close: "}" },
|
18
|
-
{ open: "[", close: "]" },
|
19
|
-
{ open: "(", close: ")" },
|
20
|
-
{ open: "'", close: "'" },
|
21
|
-
{ open: '"', close: '"' }
|
22
|
-
],
|
23
|
-
autoClosingPairs: [
|
24
|
-
{ open: "'", close: "'", notIn: ["string", "comment"] },
|
25
|
-
{ open: '"', close: '"', notIn: ["comment"] },
|
26
|
-
{ open: '"""', close: '"""' },
|
27
|
-
{ open: "`", close: "`", notIn: ["string", "comment"] },
|
28
|
-
{ open: "(", close: ")" },
|
29
|
-
{ open: "{", close: "}" },
|
30
|
-
{ open: "[", close: "]" },
|
31
|
-
{ open: "<<", close: ">>" }
|
32
|
-
],
|
33
|
-
indentationRules: {
|
34
|
-
increaseIndentPattern: /^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,
|
35
|
-
decreaseIndentPattern: /^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/
|
36
|
-
}
|
37
|
-
}, t = {
|
38
|
-
defaultToken: "source",
|
39
|
-
tokenPostfix: ".elixir",
|
40
|
-
brackets: [
|
41
|
-
{ open: "[", close: "]", token: "delimiter.square" },
|
42
|
-
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
43
|
-
{ open: "{", close: "}", token: "delimiter.curly" },
|
44
|
-
{ open: "<<", close: ">>", token: "delimiter.angle.special" }
|
45
|
-
],
|
46
|
-
// Below are lists/regexps to which we reference later.
|
47
|
-
declarationKeywords: [
|
48
|
-
"def",
|
49
|
-
"defp",
|
50
|
-
"defn",
|
51
|
-
"defnp",
|
52
|
-
"defguard",
|
53
|
-
"defguardp",
|
54
|
-
"defmacro",
|
55
|
-
"defmacrop",
|
56
|
-
"defdelegate",
|
57
|
-
"defcallback",
|
58
|
-
"defmacrocallback",
|
59
|
-
"defmodule",
|
60
|
-
"defprotocol",
|
61
|
-
"defexception",
|
62
|
-
"defimpl",
|
63
|
-
"defstruct"
|
64
|
-
],
|
65
|
-
operatorKeywords: ["and", "in", "not", "or", "when"],
|
66
|
-
namespaceKeywords: ["alias", "import", "require", "use"],
|
67
|
-
otherKeywords: [
|
68
|
-
"after",
|
69
|
-
"case",
|
70
|
-
"catch",
|
71
|
-
"cond",
|
72
|
-
"do",
|
73
|
-
"else",
|
74
|
-
"end",
|
75
|
-
"fn",
|
76
|
-
"for",
|
77
|
-
"if",
|
78
|
-
"quote",
|
79
|
-
"raise",
|
80
|
-
"receive",
|
81
|
-
"rescue",
|
82
|
-
"super",
|
83
|
-
"throw",
|
84
|
-
"try",
|
85
|
-
"unless",
|
86
|
-
"unquote_splicing",
|
87
|
-
"unquote",
|
88
|
-
"with"
|
89
|
-
],
|
90
|
-
constants: ["true", "false", "nil"],
|
91
|
-
nameBuiltin: ["__MODULE__", "__DIR__", "__ENV__", "__CALLER__", "__STACKTRACE__"],
|
92
|
-
// Matches any of the operator names:
|
93
|
-
// <<< >>> ||| &&& ^^^ ~~~ === !== ~>> <~> |~> <|> == != <= >= && || \\ <> ++ -- |> =~ -> <- ~> <~ :: .. = < > + - * / | . ^ & !
|
94
|
-
operator: /-[->]?|!={0,2}|\*{1,2}|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,
|
95
|
-
// See https://hexdocs.pm/elixir/syntax-reference.html#variables
|
96
|
-
variableName: /[a-z_][a-zA-Z0-9_]*[?!]?/,
|
97
|
-
// See https://hexdocs.pm/elixir/syntax-reference.html#atoms
|
98
|
-
atomName: /[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,
|
99
|
-
specialAtomName: /\.\.\.|<<>>|%\{\}|%|\{\}/,
|
100
|
-
aliasPart: /[A-Z][a-zA-Z0-9_]*/,
|
101
|
-
moduleName: /@aliasPart(?:\.@aliasPart)*/,
|
102
|
-
// Sigil pairs are: """ """, ''' ''', " ", ' ', / /, | |, < >, { }, [ ], ( )
|
103
|
-
sigilSymmetricDelimiter: /"""|'''|"|'|\/|\|/,
|
104
|
-
sigilStartDelimiter: /@sigilSymmetricDelimiter|<|\{|\[|\(/,
|
105
|
-
sigilEndDelimiter: /@sigilSymmetricDelimiter|>|\}|\]|\)/,
|
106
|
-
sigilModifiers: /[a-zA-Z0-9]*/,
|
107
|
-
decimal: /\d(?:_?\d)*/,
|
108
|
-
hex: /[0-9a-fA-F](_?[0-9a-fA-F])*/,
|
109
|
-
octal: /[0-7](_?[0-7])*/,
|
110
|
-
binary: /[01](_?[01])*/,
|
111
|
-
// See https://hexdocs.pm/elixir/master/String.html#module-escape-characters
|
112
|
-
escape: /\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,
|
113
|
-
// The keys below correspond to tokenizer states.
|
114
|
-
// We start from the root state and match against its rules
|
115
|
-
// until we explicitly transition into another state.
|
116
|
-
// The `include` simply brings in all operations from the given state
|
117
|
-
// and is useful for improving readability.
|
118
|
-
tokenizer: {
|
119
|
-
root: [
|
120
|
-
{ include: "@whitespace" },
|
121
|
-
{ include: "@comments" },
|
122
|
-
// Keywords start as either an identifier or a string,
|
123
|
-
// but end with a : so it's important to match this first.
|
124
|
-
{ include: "@keywordsShorthand" },
|
125
|
-
{ include: "@numbers" },
|
126
|
-
{ include: "@identifiers" },
|
127
|
-
{ include: "@strings" },
|
128
|
-
{ include: "@atoms" },
|
129
|
-
{ include: "@sigils" },
|
130
|
-
{ include: "@attributes" },
|
131
|
-
{ include: "@symbols" }
|
132
|
-
],
|
133
|
-
// Whitespace
|
134
|
-
whitespace: [[/\s+/, "white"]],
|
135
|
-
// Comments
|
136
|
-
comments: [[/(#)(.*)/, ["comment.punctuation", "comment"]]],
|
137
|
-
// Keyword list shorthand
|
138
|
-
keywordsShorthand: [
|
139
|
-
[/(@atomName)(:)(\s+)/, ["constant", "constant.punctuation", "white"]],
|
140
|
-
// Use positive look-ahead to ensure the string is followed by :
|
141
|
-
// and should be considered a keyword.
|
142
|
-
[
|
143
|
-
/"(?=([^"]|#\{.*?\}|\\")*":)/,
|
144
|
-
{ token: "constant.delimiter", next: "@doubleQuotedStringKeyword" }
|
145
|
-
],
|
146
|
-
[
|
147
|
-
/'(?=([^']|#\{.*?\}|\\')*':)/,
|
148
|
-
{ token: "constant.delimiter", next: "@singleQuotedStringKeyword" }
|
149
|
-
]
|
150
|
-
],
|
151
|
-
doubleQuotedStringKeyword: [
|
152
|
-
[/":/, { token: "constant.delimiter", next: "@pop" }],
|
153
|
-
{ include: "@stringConstantContentInterpol" }
|
154
|
-
],
|
155
|
-
singleQuotedStringKeyword: [
|
156
|
-
[/':/, { token: "constant.delimiter", next: "@pop" }],
|
157
|
-
{ include: "@stringConstantContentInterpol" }
|
158
|
-
],
|
159
|
-
// Numbers
|
160
|
-
numbers: [
|
161
|
-
[/0b@binary/, "number.binary"],
|
162
|
-
[/0o@octal/, "number.octal"],
|
163
|
-
[/0x@hex/, "number.hex"],
|
164
|
-
[/@decimal\.@decimal([eE]-?@decimal)?/, "number.float"],
|
165
|
-
[/@decimal/, "number"]
|
166
|
-
],
|
167
|
-
// Identifiers
|
168
|
-
identifiers: [
|
169
|
-
// Tokenize identifier name in function-like definitions.
|
170
|
-
// Note: given `def a + b, do: nil`, `a` is not a function name,
|
171
|
-
// so we use negative look-ahead to ensure there's no operator.
|
172
|
-
[
|
173
|
-
/\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,
|
174
|
-
[
|
175
|
-
"keyword.declaration",
|
176
|
-
"white",
|
177
|
-
{
|
178
|
-
cases: {
|
179
|
-
unquote: "keyword",
|
180
|
-
"@default": "function"
|
181
|
-
}
|
182
|
-
}
|
183
|
-
]
|
184
|
-
],
|
185
|
-
// Tokenize function calls
|
186
|
-
[
|
187
|
-
// In-scope call - an identifier followed by ( or .(
|
188
|
-
/(@variableName)(?=\s*\.?\s*\()/,
|
189
|
-
{
|
190
|
-
cases: {
|
191
|
-
// Tokenize as keyword in cases like `if(..., do: ..., else: ...)`
|
192
|
-
"@declarationKeywords": "keyword.declaration",
|
193
|
-
"@namespaceKeywords": "keyword",
|
194
|
-
"@otherKeywords": "keyword",
|
195
|
-
"@default": "function.call"
|
196
|
-
}
|
197
|
-
}
|
198
|
-
],
|
199
|
-
[
|
200
|
-
// Referencing function in a module
|
201
|
-
/(@moduleName)(\s*)(\.)(\s*)(@variableName)/,
|
202
|
-
["type.identifier", "white", "operator", "white", "function.call"]
|
203
|
-
],
|
204
|
-
[
|
205
|
-
// Referencing function in an Erlang module
|
206
|
-
/(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,
|
207
|
-
["constant.punctuation", "constant", "white", "operator", "white", "function.call"]
|
208
|
-
],
|
209
|
-
[
|
210
|
-
// Piping into a function (tokenized separately as it may not have parentheses)
|
211
|
-
/(\|>)(\s*)(@variableName)/,
|
212
|
-
[
|
213
|
-
"operator",
|
214
|
-
"white",
|
215
|
-
{
|
216
|
-
cases: {
|
217
|
-
"@otherKeywords": "keyword",
|
218
|
-
"@default": "function.call"
|
219
|
-
}
|
220
|
-
}
|
221
|
-
]
|
222
|
-
],
|
223
|
-
[
|
224
|
-
// Function reference passed to another function
|
225
|
-
/(&)(\s*)(@variableName)/,
|
226
|
-
["operator", "white", "function.call"]
|
227
|
-
],
|
228
|
-
// Language keywords, builtins, constants and variables
|
229
|
-
[
|
230
|
-
/@variableName/,
|
231
|
-
{
|
232
|
-
cases: {
|
233
|
-
"@declarationKeywords": "keyword.declaration",
|
234
|
-
"@operatorKeywords": "keyword.operator",
|
235
|
-
"@namespaceKeywords": "keyword",
|
236
|
-
"@otherKeywords": "keyword",
|
237
|
-
"@constants": "constant.language",
|
238
|
-
"@nameBuiltin": "variable.language",
|
239
|
-
"_.*": "comment.unused",
|
240
|
-
"@default": "identifier"
|
241
|
-
}
|
242
|
-
}
|
243
|
-
],
|
244
|
-
// Module names
|
245
|
-
[/@moduleName/, "type.identifier"]
|
246
|
-
],
|
247
|
-
// Strings
|
248
|
-
strings: [
|
249
|
-
[/"""/, { token: "string.delimiter", next: "@doubleQuotedHeredoc" }],
|
250
|
-
[/'''/, { token: "string.delimiter", next: "@singleQuotedHeredoc" }],
|
251
|
-
[/"/, { token: "string.delimiter", next: "@doubleQuotedString" }],
|
252
|
-
[/'/, { token: "string.delimiter", next: "@singleQuotedString" }]
|
253
|
-
],
|
254
|
-
doubleQuotedHeredoc: [
|
255
|
-
[/"""/, { token: "string.delimiter", next: "@pop" }],
|
256
|
-
{ include: "@stringContentInterpol" }
|
257
|
-
],
|
258
|
-
singleQuotedHeredoc: [
|
259
|
-
[/'''/, { token: "string.delimiter", next: "@pop" }],
|
260
|
-
{ include: "@stringContentInterpol" }
|
261
|
-
],
|
262
|
-
doubleQuotedString: [
|
263
|
-
[/"/, { token: "string.delimiter", next: "@pop" }],
|
264
|
-
{ include: "@stringContentInterpol" }
|
265
|
-
],
|
266
|
-
singleQuotedString: [
|
267
|
-
[/'/, { token: "string.delimiter", next: "@pop" }],
|
268
|
-
{ include: "@stringContentInterpol" }
|
269
|
-
],
|
270
|
-
// Atoms
|
271
|
-
atoms: [
|
272
|
-
[/(:)(@atomName)/, ["constant.punctuation", "constant"]],
|
273
|
-
[/:"/, { token: "constant.delimiter", next: "@doubleQuotedStringAtom" }],
|
274
|
-
[/:'/, { token: "constant.delimiter", next: "@singleQuotedStringAtom" }]
|
275
|
-
],
|
276
|
-
doubleQuotedStringAtom: [
|
277
|
-
[/"/, { token: "constant.delimiter", next: "@pop" }],
|
278
|
-
{ include: "@stringConstantContentInterpol" }
|
279
|
-
],
|
280
|
-
singleQuotedStringAtom: [
|
281
|
-
[/'/, { token: "constant.delimiter", next: "@pop" }],
|
282
|
-
{ include: "@stringConstantContentInterpol" }
|
283
|
-
],
|
284
|
-
// Sigils
|
285
|
-
// See https://elixir-lang.org/getting-started/sigils.html
|
286
|
-
// Sigils allow for typing values using their textual representation.
|
287
|
-
// All sigils start with ~ followed by a letter or
|
288
|
-
// multi-letter uppercase starting at Elixir v1.15.0, indicating sigil type
|
289
|
-
// and then a delimiter pair enclosing the textual representation.
|
290
|
-
// Optional modifiers are allowed after the closing delimiter.
|
291
|
-
// For instance a regular expressions can be written as:
|
292
|
-
// ~r/foo|bar/ ~r{foo|bar} ~r/foo|bar/g
|
293
|
-
//
|
294
|
-
// In general lowercase sigils allow for interpolation
|
295
|
-
// and escaped characters, whereas uppercase sigils don't
|
296
|
-
//
|
297
|
-
// During tokenization we want to distinguish some
|
298
|
-
// specific sigil types, namely string and regexp,
|
299
|
-
// so that they cen be themed separately.
|
300
|
-
//
|
301
|
-
// To reasonably handle all those combinations we leverage
|
302
|
-
// dot-separated states, so if we transition to @sigilStart.interpol.s.{.}
|
303
|
-
// then "sigilStart.interpol.s" state will match and also all
|
304
|
-
// the individual dot-separated parameters can be accessed.
|
305
|
-
sigils: [
|
306
|
-
[/~[a-z]@sigilStartDelimiter/, { token: "@rematch", next: "@sigil.interpol" }],
|
307
|
-
[/~([A-Z]+)@sigilStartDelimiter/, { token: "@rematch", next: "@sigil.noInterpol" }]
|
308
|
-
],
|
309
|
-
sigil: [
|
310
|
-
[/~([a-z]|[A-Z]+)\{/, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.{.}" }],
|
311
|
-
[/~([a-z]|[A-Z]+)\[/, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.[.]" }],
|
312
|
-
[/~([a-z]|[A-Z]+)\(/, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.(.)" }],
|
313
|
-
[/~([a-z]|[A-Z]+)\</, { token: "@rematch", switchTo: "@sigilStart.$S2.$1.<.>" }],
|
314
|
-
[
|
315
|
-
/~([a-z]|[A-Z]+)(@sigilSymmetricDelimiter)/,
|
316
|
-
{ token: "@rematch", switchTo: "@sigilStart.$S2.$1.$2.$2" }
|
317
|
-
]
|
318
|
-
],
|
319
|
-
// The definitions below expect states to be of the form:
|
320
|
-
//
|
321
|
-
// sigilStart.<interpol-or-noInterpol>.<sigil-letter>.<start-delimiter>.<end-delimiter>
|
322
|
-
// sigilContinue.<interpol-or-noInterpol>.<sigil-letter>.<start-delimiter>.<end-delimiter>
|
323
|
-
//
|
324
|
-
// The sigilStart state is used only to properly classify the token (as string/regex/sigil)
|
325
|
-
// and immediately switches to the sigilContinue sate, which handles the actual content
|
326
|
-
// and waits for the corresponding end delimiter.
|
327
|
-
"sigilStart.interpol.s": [
|
328
|
-
[
|
329
|
-
/~s@sigilStartDelimiter/,
|
330
|
-
{
|
331
|
-
token: "string.delimiter",
|
332
|
-
switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
|
333
|
-
}
|
334
|
-
]
|
335
|
-
],
|
336
|
-
"sigilContinue.interpol.s": [
|
337
|
-
[
|
338
|
-
/(@sigilEndDelimiter)@sigilModifiers/,
|
339
|
-
{
|
340
|
-
cases: {
|
341
|
-
"$1==$S5": { token: "string.delimiter", next: "@pop" },
|
342
|
-
"@default": "string"
|
343
|
-
}
|
344
|
-
}
|
345
|
-
],
|
346
|
-
{ include: "@stringContentInterpol" }
|
347
|
-
],
|
348
|
-
"sigilStart.noInterpol.S": [
|
349
|
-
[
|
350
|
-
/~S@sigilStartDelimiter/,
|
351
|
-
{
|
352
|
-
token: "string.delimiter",
|
353
|
-
switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
|
354
|
-
}
|
355
|
-
]
|
356
|
-
],
|
357
|
-
"sigilContinue.noInterpol.S": [
|
358
|
-
// Ignore escaped sigil end
|
359
|
-
[/(^|[^\\])\\@sigilEndDelimiter/, "string"],
|
360
|
-
[
|
361
|
-
/(@sigilEndDelimiter)@sigilModifiers/,
|
362
|
-
{
|
363
|
-
cases: {
|
364
|
-
"$1==$S5": { token: "string.delimiter", next: "@pop" },
|
365
|
-
"@default": "string"
|
366
|
-
}
|
367
|
-
}
|
368
|
-
],
|
369
|
-
{ include: "@stringContent" }
|
370
|
-
],
|
371
|
-
"sigilStart.interpol.r": [
|
372
|
-
[
|
373
|
-
/~r@sigilStartDelimiter/,
|
374
|
-
{
|
375
|
-
token: "regexp.delimiter",
|
376
|
-
switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
|
377
|
-
}
|
378
|
-
]
|
379
|
-
],
|
380
|
-
"sigilContinue.interpol.r": [
|
381
|
-
[
|
382
|
-
/(@sigilEndDelimiter)@sigilModifiers/,
|
383
|
-
{
|
384
|
-
cases: {
|
385
|
-
"$1==$S5": { token: "regexp.delimiter", next: "@pop" },
|
386
|
-
"@default": "regexp"
|
387
|
-
}
|
388
|
-
}
|
389
|
-
],
|
390
|
-
{ include: "@regexpContentInterpol" }
|
391
|
-
],
|
392
|
-
"sigilStart.noInterpol.R": [
|
393
|
-
[
|
394
|
-
/~R@sigilStartDelimiter/,
|
395
|
-
{
|
396
|
-
token: "regexp.delimiter",
|
397
|
-
switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
|
398
|
-
}
|
399
|
-
]
|
400
|
-
],
|
401
|
-
"sigilContinue.noInterpol.R": [
|
402
|
-
// Ignore escaped sigil end
|
403
|
-
[/(^|[^\\])\\@sigilEndDelimiter/, "regexp"],
|
404
|
-
[
|
405
|
-
/(@sigilEndDelimiter)@sigilModifiers/,
|
406
|
-
{
|
407
|
-
cases: {
|
408
|
-
"$1==$S5": { token: "regexp.delimiter", next: "@pop" },
|
409
|
-
"@default": "regexp"
|
410
|
-
}
|
411
|
-
}
|
412
|
-
],
|
413
|
-
{ include: "@regexpContent" }
|
414
|
-
],
|
415
|
-
// Fallback to the generic sigil by default
|
416
|
-
"sigilStart.interpol": [
|
417
|
-
[
|
418
|
-
/~([a-z]|[A-Z]+)@sigilStartDelimiter/,
|
419
|
-
{
|
420
|
-
token: "sigil.delimiter",
|
421
|
-
switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
|
422
|
-
}
|
423
|
-
]
|
424
|
-
],
|
425
|
-
"sigilContinue.interpol": [
|
426
|
-
[
|
427
|
-
/(@sigilEndDelimiter)@sigilModifiers/,
|
428
|
-
{
|
429
|
-
cases: {
|
430
|
-
"$1==$S5": { token: "sigil.delimiter", next: "@pop" },
|
431
|
-
"@default": "sigil"
|
432
|
-
}
|
433
|
-
}
|
434
|
-
],
|
435
|
-
{ include: "@sigilContentInterpol" }
|
436
|
-
],
|
437
|
-
"sigilStart.noInterpol": [
|
438
|
-
[
|
439
|
-
/~([a-z]|[A-Z]+)@sigilStartDelimiter/,
|
440
|
-
{
|
441
|
-
token: "sigil.delimiter",
|
442
|
-
switchTo: "@sigilContinue.$S2.$S3.$S4.$S5"
|
443
|
-
}
|
444
|
-
]
|
445
|
-
],
|
446
|
-
"sigilContinue.noInterpol": [
|
447
|
-
// Ignore escaped sigil end
|
448
|
-
[/(^|[^\\])\\@sigilEndDelimiter/, "sigil"],
|
449
|
-
[
|
450
|
-
/(@sigilEndDelimiter)@sigilModifiers/,
|
451
|
-
{
|
452
|
-
cases: {
|
453
|
-
"$1==$S5": { token: "sigil.delimiter", next: "@pop" },
|
454
|
-
"@default": "sigil"
|
455
|
-
}
|
456
|
-
}
|
457
|
-
],
|
458
|
-
{ include: "@sigilContent" }
|
459
|
-
],
|
460
|
-
// Attributes
|
461
|
-
attributes: [
|
462
|
-
// Module @doc* attributes - tokenized as comments
|
463
|
-
[
|
464
|
-
/\@(module|type)?doc (~[sS])?"""/,
|
465
|
-
{
|
466
|
-
token: "comment.block.documentation",
|
467
|
-
next: "@doubleQuotedHeredocDocstring"
|
468
|
-
}
|
469
|
-
],
|
470
|
-
[
|
471
|
-
/\@(module|type)?doc (~[sS])?'''/,
|
472
|
-
{
|
473
|
-
token: "comment.block.documentation",
|
474
|
-
next: "@singleQuotedHeredocDocstring"
|
475
|
-
}
|
476
|
-
],
|
477
|
-
[
|
478
|
-
/\@(module|type)?doc (~[sS])?"/,
|
479
|
-
{
|
480
|
-
token: "comment.block.documentation",
|
481
|
-
next: "@doubleQuotedStringDocstring"
|
482
|
-
}
|
483
|
-
],
|
484
|
-
[
|
485
|
-
/\@(module|type)?doc (~[sS])?'/,
|
486
|
-
{
|
487
|
-
token: "comment.block.documentation",
|
488
|
-
next: "@singleQuotedStringDocstring"
|
489
|
-
}
|
490
|
-
],
|
491
|
-
[/\@(module|type)?doc false/, "comment.block.documentation"],
|
492
|
-
// Module attributes
|
493
|
-
[/\@(@variableName)/, "variable"]
|
494
|
-
],
|
495
|
-
doubleQuotedHeredocDocstring: [
|
496
|
-
[/"""/, { token: "comment.block.documentation", next: "@pop" }],
|
497
|
-
{ include: "@docstringContent" }
|
498
|
-
],
|
499
|
-
singleQuotedHeredocDocstring: [
|
500
|
-
[/'''/, { token: "comment.block.documentation", next: "@pop" }],
|
501
|
-
{ include: "@docstringContent" }
|
502
|
-
],
|
503
|
-
doubleQuotedStringDocstring: [
|
504
|
-
[/"/, { token: "comment.block.documentation", next: "@pop" }],
|
505
|
-
{ include: "@docstringContent" }
|
506
|
-
],
|
507
|
-
singleQuotedStringDocstring: [
|
508
|
-
[/'/, { token: "comment.block.documentation", next: "@pop" }],
|
509
|
-
{ include: "@docstringContent" }
|
510
|
-
],
|
511
|
-
// Operators, punctuation, brackets
|
512
|
-
symbols: [
|
513
|
-
// Code point operator (either with regular character ?a or an escaped one ?\n)
|
514
|
-
[/\?(\\.|[^\\\s])/, "number.constant"],
|
515
|
-
// Anonymous function arguments
|
516
|
-
[/&\d+/, "operator"],
|
517
|
-
// Bitshift operators (must go before delimiters, so that << >> don't match first)
|
518
|
-
[/<<<|>>>/, "operator"],
|
519
|
-
// Delimiter pairs
|
520
|
-
[/[()\[\]\{\}]|<<|>>/, "@brackets"],
|
521
|
-
// Triple dot is a valid name (must go before operators, so that .. doesn't match instead)
|
522
|
-
[/\.\.\./, "identifier"],
|
523
|
-
// Punctuation => (must go before operators, so it's not tokenized as = then >)
|
524
|
-
[/=>/, "punctuation"],
|
525
|
-
// Operators
|
526
|
-
[/@operator/, "operator"],
|
527
|
-
// Punctuation
|
528
|
-
[/[:;,.%]/, "punctuation"]
|
529
|
-
],
|
530
|
-
// Generic helpers
|
531
|
-
stringContentInterpol: [
|
532
|
-
{ include: "@interpolation" },
|
533
|
-
{ include: "@escapeChar" },
|
534
|
-
{ include: "@stringContent" }
|
535
|
-
],
|
536
|
-
stringContent: [[/./, "string"]],
|
537
|
-
stringConstantContentInterpol: [
|
538
|
-
{ include: "@interpolation" },
|
539
|
-
{ include: "@escapeChar" },
|
540
|
-
{ include: "@stringConstantContent" }
|
541
|
-
],
|
542
|
-
stringConstantContent: [[/./, "constant"]],
|
543
|
-
regexpContentInterpol: [
|
544
|
-
{ include: "@interpolation" },
|
545
|
-
{ include: "@escapeChar" },
|
546
|
-
{ include: "@regexpContent" }
|
547
|
-
],
|
548
|
-
regexpContent: [
|
549
|
-
// # may be a regular regexp char, so we use a heuristic
|
550
|
-
// assuming a # surrounded by whitespace is actually a comment.
|
551
|
-
[/(\s)(#)(\s.*)$/, ["white", "comment.punctuation", "comment"]],
|
552
|
-
[/./, "regexp"]
|
553
|
-
],
|
554
|
-
sigilContentInterpol: [
|
555
|
-
{ include: "@interpolation" },
|
556
|
-
{ include: "@escapeChar" },
|
557
|
-
{ include: "@sigilContent" }
|
558
|
-
],
|
559
|
-
sigilContent: [[/./, "sigil"]],
|
560
|
-
docstringContent: [[/./, "comment.block.documentation"]],
|
561
|
-
escapeChar: [[/@escape/, "constant.character.escape"]],
|
562
|
-
interpolation: [[/#{/, { token: "delimiter.bracket.embed", next: "@interpolationContinue" }]],
|
563
|
-
interpolationContinue: [
|
564
|
-
[/}/, { token: "delimiter.bracket.embed", next: "@pop" }],
|
565
|
-
// Interpolation brackets may contain arbitrary code,
|
566
|
-
// so we simply match against all the root rules,
|
567
|
-
// until we reach interpolation end (the above matches).
|
568
|
-
{ include: "@root" }
|
569
|
-
]
|
570
|
-
}
|
571
|
-
};
|
572
|
-
export {
|
573
|
-
e as conf,
|
574
|
-
t as language
|
575
|
-
};
|