-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode_modules_monaco-editor_esm_vs_basic-languages_hcl_hcl_js.bundle.js
210 lines (202 loc) · 6.34 KB
/
node_modules_monaco-editor_esm_vs_basic-languages_hcl_hcl_js.bundle.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
"use strict";
(self["webpackChunkweb"] = self["webpackChunkweb"] || []).push([["node_modules_monaco-editor_esm_vs_basic-languages_hcl_hcl_js"],{
/***/ "./node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.js":
/*!**********************************************************************!*\
!*** ./node_modules/monaco-editor/esm/vs/basic-languages/hcl/hcl.js ***!
\**********************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ conf: () => (/* binding */ conf),
/* harmony export */ language: () => (/* binding */ language)
/* harmony export */ });
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
// src/basic-languages/hcl/hcl.ts
var conf = {
comments: {
lineComment: "#",
blockComment: ["/*", "*/"]
},
brackets: [
["{", "}"],
["[", "]"],
["(", ")"]
],
autoClosingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: '"', close: '"', notIn: ["string"] }
],
surroundingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: '"', close: '"' }
]
};
var language = {
defaultToken: "",
tokenPostfix: ".hcl",
keywords: [
"var",
"local",
"path",
"for_each",
"any",
"string",
"number",
"bool",
"true",
"false",
"null",
"if ",
"else ",
"endif ",
"for ",
"in",
"endfor"
],
operators: [
"=",
">=",
"<=",
"==",
"!=",
"+",
"-",
"*",
"/",
"%",
"&&",
"||",
"!",
"<",
">",
"?",
"...",
":"
],
symbols: /[=><!~?:&|+\-*\/\^%]+/,
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
terraformFunctions: /(abs|ceil|floor|log|max|min|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trimspace|upper|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|range|reverse|setintersection|setproduct|setunion|slice|sort|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filemd1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|tobool|tolist|tomap|tonumber|toset|tostring)/,
terraformMainBlocks: /(module|data|terraform|resource|provider|variable|output|locals)/,
tokenizer: {
root: [
// highlight main blocks
[
/^@terraformMainBlocks([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,
["type", "", "string", "", "string", "", "@brackets"]
],
// highlight all the remaining blocks
[
/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,
["identifier", "", "string", "", "string", "", "@brackets"]
],
// highlight block
[
/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)(=)(\{)/,
["identifier", "", "string", "", "operator", "", "@brackets"]
],
// terraform general highlight - shared with expressions
{ include: "@terraform" }
],
terraform: [
// highlight terraform functions
[/@terraformFunctions(\()/, ["type", "@brackets"]],
// all other words are variables or keywords
[
/[a-zA-Z_]\w*-*/,
// must work with variables such as foo-bar and also with negative numbers
{
cases: {
"@keywords": { token: "keyword.$0" },
"@default": "variable"
}
}
],
{ include: "@whitespace" },
{ include: "@heredoc" },
// delimiters and operators
[/[{}()\[\]]/, "@brackets"],
[/[<>](?!@symbols)/, "@brackets"],
[
/@symbols/,
{
cases: {
"@operators": "operator",
"@default": ""
}
}
],
// numbers
[/\d*\d+[eE]([\-+]?\d+)?/, "number.float"],
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
[/\d[\d']*/, "number"],
[/\d/, "number"],
[/[;,.]/, "delimiter"],
// delimiter: after number because of .\d floats
// strings
[/"/, "string", "@string"],
// this will include expressions
[/'/, "invalid"]
],
heredoc: [
[/<<[-]*\s*["]?([\w\-]+)["]?/, { token: "string.heredoc.delimiter", next: "@heredocBody.$1" }]
],
heredocBody: [
[
/([\w\-]+)$/,
{
cases: {
"$1==$S2": [
{
token: "string.heredoc.delimiter",
next: "@popall"
}
],
"@default": "string.heredoc"
}
}
],
[/./, "string.heredoc"]
],
whitespace: [
[/[ \t\r\n]+/, ""],
[/\/\*/, "comment", "@comment"],
[/\/\/.*$/, "comment"],
[/#.*$/, "comment"]
],
comment: [
[/[^\/*]+/, "comment"],
[/\*\//, "comment", "@pop"],
[/[\/*]/, "comment"]
],
string: [
[/\$\{/, { token: "delimiter", next: "@stringExpression" }],
[/[^\\"\$]+/, "string"],
[/@escapes/, "string.escape"],
[/\\./, "string.escape.invalid"],
[/"/, "string", "@popall"]
],
stringInsideExpression: [
[/[^\\"]+/, "string"],
[/@escapes/, "string.escape"],
[/\\./, "string.escape.invalid"],
[/"/, "string", "@pop"]
],
stringExpression: [
[/\}/, { token: "delimiter", next: "@pop" }],
[/"/, "string", "@stringInsideExpression"],
{ include: "@terraform" }
]
}
};
/***/ })
}]);
//# sourceMappingURL=node_modules_monaco-editor_esm_vs_basic-languages_hcl_hcl_js.bundle.js.map