@univerjs/uniscript 0.4.0-alpha.0 → 0.4.0-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/abap-BZS-1p12.js +6 -0
- package/lib/abap-D8H3nII2.mjs +1404 -0
- package/lib/apex-B2xdRF0k.js +6 -0
- package/lib/apex-BVHYDV51.mjs +334 -0
- package/lib/azcli-BwJ4gbR1.mjs +74 -0
- package/lib/azcli-CKk2q0zF.js +6 -0
- package/lib/bat-BDmMqWXx.mjs +106 -0
- package/lib/bat-Ehz5Z_mk.js +6 -0
- package/lib/bicep-B5L2IbSj.mjs +110 -0
- package/lib/bicep-WbLMPUMj.js +7 -0
- package/lib/cameligo-B_ldnAvM.js +6 -0
- package/lib/cameligo-CmyOPZUd.mjs +180 -0
- package/lib/cjs/index.js +1 -9
- package/lib/clojure-Dg-qgg-1.js +6 -0
- package/lib/clojure-iSXHsTlR.mjs +767 -0
- package/lib/coffee-BCg0pb49.js +6 -0
- package/lib/coffee-BUCk2FHC.mjs +238 -0
- package/lib/cpp-CJWZ7Zo7.js +6 -0
- package/lib/cpp-MUyeqRt5.mjs +395 -0
- package/lib/csharp-B9vyMfVU.mjs +332 -0
- package/lib/csharp-BZypj8XG.js +6 -0
- package/lib/csp-BfXxGnNN.js +6 -0
- package/lib/csp-CbylPXe5.mjs +59 -0
- package/lib/css-BPDnvT2s.js +8 -0
- package/lib/css-BQSMT8k7.mjs +193 -0
- package/lib/cssMode-B_of5tVd.js +9 -0
- package/lib/cssMode-BuX-eUHc.mjs +1604 -0
- package/lib/cypher-3bNWMNCJ.js +6 -0
- package/lib/cypher-D7IWy_82.mjs +269 -0
- package/lib/dart-BCVbUKaH.mjs +287 -0
- package/lib/dart-C9Glm5m-.js +6 -0
- package/lib/dockerfile-CjnlcV5o.js +6 -0
- package/lib/dockerfile-D2-hSnDX.mjs +136 -0
- package/lib/ecl-DRJlPmOb.mjs +462 -0
- package/lib/ecl-UyoSfv7F.js +6 -0
- package/lib/elixir-Bol0p0Ia.js +6 -0
- package/lib/elixir-D8NBXKCb.mjs +575 -0
- package/lib/es/index.js +5 -262
- package/lib/flow9-Be1OUdJl.js +6 -0
- package/lib/flow9-Dp7h8rKW.mjs +148 -0
- package/lib/freemarker2-D8-fH4uC.mjs +1001 -0
- package/lib/freemarker2-S5ay_GEf.js +8 -0
- package/lib/fsharp-CJxdVP7r.mjs +223 -0
- package/lib/fsharp-CKIYWNYJ.js +6 -0
- package/lib/go-DWj6zslQ.js +6 -0
- package/lib/go-IPaMO3Uz.mjs +224 -0
- package/lib/graphql-BzJpwfxN.js +6 -0
- package/lib/graphql-CMoDK5uf.mjs +157 -0
- package/lib/handlebars-CEMNnGaU.mjs +427 -0
- package/lib/handlebars-CM3PRDRO.js +6 -0
- package/lib/hcl-BCY6T0iq.js +6 -0
- package/lib/hcl-BTAYK4pT.mjs +189 -0
- package/lib/html-BSUn7oJR.mjs +316 -0
- package/lib/html-Df-Osxjs.js +6 -0
- package/lib/htmlMode-Bj4CfAzA.js +9 -0
- package/lib/htmlMode-xJPwX0cD.mjs +1615 -0
- package/lib/index-D6nY5NdF.mjs +116821 -0
- package/lib/index-rYV4VmC2.js +1163 -0
- package/lib/index.css +1 -1
- package/lib/ini-CC3_THb4.js +6 -0
- package/lib/ini-CiaphB6F.mjs +77 -0
- package/lib/java-CwRV8Dsg.js +6 -0
- package/lib/java-DxksziCw.mjs +238 -0
- package/lib/javascript-D1eKEotE.js +6 -0
- package/lib/javascript-c8D1_K05.mjs +76 -0
- package/lib/jsonMode-8-L3-E9k.mjs +2042 -0
- package/lib/jsonMode-BdBVsN9_.js +15 -0
- package/lib/julia-7Z1jwT4W.js +6 -0
- package/lib/julia-TTty8och.mjs +517 -0
- package/lib/kotlin-BAXgl2QX.js +6 -0
- package/lib/kotlin-Dzand-bM.mjs +259 -0
- package/lib/less-CSG9Zdoy.js +7 -0
- package/lib/less-CWDFQI_i.mjs +168 -0
- package/lib/lexon-BiTtMD9F.js +6 -0
- package/lib/lexon-bZpjZioh.mjs +163 -0
- package/lib/liquid-BmlJOXgY.js +6 -0
- package/lib/liquid-Bs7DM5cg.mjs +248 -0
- package/lib/lua-CoWYKXUu.mjs +168 -0
- package/lib/lua-o7UTFJ05.js +6 -0
- package/lib/m3-DIJY3uEe.mjs +216 -0
- package/lib/m3-DOYTRLxi.js +6 -0
- package/lib/markdown-CDlkMTMZ.mjs +235 -0
- package/lib/markdown-Di5faXtP.js +6 -0
- package/lib/mdx-BEI71kqO.mjs +173 -0
- package/lib/mdx-DJV2KJ98.js +6 -0
- package/lib/mips-CIiuS33B.mjs +204 -0
- package/lib/mips-CjGjcf9D.js +6 -0
- package/lib/msdax-4_jBeazN.mjs +381 -0
- package/lib/msdax-DZFpIwAH.js +6 -0
- package/lib/mysql-6Y0DL_eO.js +6 -0
- package/lib/mysql-D_KZRjSR.mjs +884 -0
- package/lib/objective-c-7nsY1fc1.mjs +189 -0
- package/lib/objective-c-BtrzMwBz.js +6 -0
- package/lib/pascal-BF06Dt9I.js +6 -0
- package/lib/pascal-BHpF9PW1.mjs +257 -0
- package/lib/pascaligo-BDrxVOcH.js +6 -0
- package/lib/pascaligo-C3mRbxmU.mjs +170 -0
- package/lib/perl-BMlqAyyD.js +6 -0
- package/lib/perl-F3tWDMLI.mjs +632 -0
- package/lib/pgsql-D62t1RD_.mjs +857 -0
- package/lib/pgsql-DXYBcnYD.js +6 -0
- package/lib/php-C8GGPjjI.mjs +506 -0
- package/lib/php-DmDmMNs3.js +6 -0
- package/lib/pla-2A6q3K8_.js +6 -0
- package/lib/pla-C_W_x2fV.mjs +143 -0
- package/lib/postiats-CMS8WwLg.mjs +913 -0
- package/lib/postiats-DQ-6iLGI.js +6 -0
- package/lib/powerquery-CuZPk7NC.js +6 -0
- package/lib/powerquery-Dcs0XplE.mjs +896 -0
- package/lib/powershell-Brx1N_3T.mjs +245 -0
- package/lib/powershell-D7BqJxnS.js +6 -0
- package/lib/protobuf-CkqkhuUG.js +7 -0
- package/lib/protobuf-UEJDuX6l.mjs +426 -0
- package/lib/pug-65DF18O8.js +6 -0
- package/lib/pug-LDwDmrMc.mjs +408 -0
- package/lib/python-BOeTitp9.mjs +309 -0
- package/lib/python-DRyE-VQQ.js +6 -0
- package/lib/qsharp-Cb7hPwnM.mjs +307 -0
- package/lib/qsharp-Dw07PXbd.js +6 -0
- package/lib/r-BHuY0po5.js +6 -0
- package/lib/r-BiFgSgcs.mjs +249 -0
- package/lib/razor-D0RPXCAO.mjs +558 -0
- package/lib/razor-DtDOotKq.js +6 -0
- package/lib/redis-BdzqoKC2.mjs +308 -0
- package/lib/redis-_Q4kv9ug.js +6 -0
- package/lib/redshift-DNNCHCLR.js +6 -0
- package/lib/redshift-Df6PoiEL.mjs +815 -0
- package/lib/restructuredtext-C9FM3r80.js +6 -0
- package/lib/restructuredtext-CW0ZtQ2l.mjs +180 -0
- package/lib/ruby-DyIFepcy.mjs +517 -0
- package/lib/ruby-DyJmXCYh.js +6 -0
- package/lib/rust-BiRHKB0S.mjs +349 -0
- package/lib/rust-DVvzZ_uH.js +6 -0
- package/lib/sb-CFwmZh3c.js +6 -0
- package/lib/sb-CahkGwPC.mjs +121 -0
- package/lib/scala-Cg9Wfw6B.mjs +376 -0
- package/lib/scala-DjaRe0PR.js +6 -0
- package/lib/scheme-Bqb0wlMX.mjs +114 -0
- package/lib/scheme-ZdeLzG0d.js +6 -0
- package/lib/scss-3qd2syug.mjs +268 -0
- package/lib/scss-Dqv1RljX.js +8 -0
- package/lib/shell-B5iW6U-v.mjs +227 -0
- package/lib/shell-BJ5zD_-e.js +6 -0
- package/lib/solidity-8Ys0iSgd.mjs +1373 -0
- package/lib/solidity-CagYWQAe.js +6 -0
- package/lib/sophia-PnZfErC3.mjs +205 -0
- package/lib/sophia-szuux90p.js +6 -0
- package/lib/sparql-CXz1-gkd.js +6 -0
- package/lib/sparql-CgWX-KRM.mjs +207 -0
- package/lib/sql-CN3Vg4Sm.mjs +859 -0
- package/lib/sql-CWZ5x4mg.js +6 -0
- package/lib/st-CcWMPoh3.js +6 -0
- package/lib/st-DKDuarOh.mjs +422 -0
- package/lib/swift-DUBoAkDR.js +8 -0
- package/lib/swift-DnXH6Con.mjs +318 -0
- package/lib/systemverilog-5hQzl-99.js +6 -0
- package/lib/systemverilog-pJOgZU46.mjs +582 -0
- package/lib/tcl-Bls9iNXn.mjs +238 -0
- package/lib/tcl-CiK0GhJi.js +6 -0
- package/lib/tsMode-BB2mDc5d.mjs +906 -0
- package/lib/tsMode-N-LS5RKx.js +16 -0
- package/lib/twig-B14HEeE0.mjs +398 -0
- package/lib/twig-Cbq-Ua-E.js +6 -0
- package/lib/typescript-CZplv8KD.js +6 -0
- package/lib/typescript-f9PHTVoW.mjs +351 -0
- package/lib/typespec-Br_LC070.js +6 -0
- package/lib/typespec-dAaIdBal.mjs +125 -0
- package/lib/umd/index.js +1914 -2
- package/lib/vb-B1HzwoGL.js +6 -0
- package/lib/vb-CPBujGrP.mjs +378 -0
- package/lib/wgsl-BNAUPMiJ.js +303 -0
- package/lib/wgsl-CqCqdnZC.mjs +448 -0
- package/lib/xml-BSe-ETnG.js +6 -0
- package/lib/xml-Dv0cmUxw.mjs +103 -0
- package/lib/yaml-O_DoXtBP.js +6 -0
- package/lib/yaml-eXS7QSgG.mjs +214 -0
- package/package.json +10 -17
@@ -0,0 +1,426 @@
|
|
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 namedLiterals = ["true", "false"], conf = {
|
8
|
+
comments: {
|
9
|
+
lineComment: "//",
|
10
|
+
blockComment: ["/*", "*/"]
|
11
|
+
},
|
12
|
+
brackets: [
|
13
|
+
["{", "}"],
|
14
|
+
["[", "]"],
|
15
|
+
["(", ")"],
|
16
|
+
["<", ">"]
|
17
|
+
],
|
18
|
+
surroundingPairs: [
|
19
|
+
{ open: "{", close: "}" },
|
20
|
+
{ open: "[", close: "]" },
|
21
|
+
{ open: "(", close: ")" },
|
22
|
+
{ open: "<", close: ">" },
|
23
|
+
{ open: '"', close: '"' },
|
24
|
+
{ open: "'", close: "'" }
|
25
|
+
],
|
26
|
+
autoClosingPairs: [
|
27
|
+
{ open: "{", close: "}" },
|
28
|
+
{ open: "[", close: "]" },
|
29
|
+
{ open: "(", close: ")" },
|
30
|
+
{ open: "<", close: ">" },
|
31
|
+
{ open: '"', close: '"', notIn: ["string"] },
|
32
|
+
{ open: "'", close: "'", notIn: ["string"] }
|
33
|
+
],
|
34
|
+
autoCloseBefore: `.,=}])>'
|
35
|
+
`,
|
36
|
+
indentationRules: {
|
37
|
+
increaseIndentPattern: new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),
|
38
|
+
decreaseIndentPattern: new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")
|
39
|
+
}
|
40
|
+
}, language = {
|
41
|
+
defaultToken: "",
|
42
|
+
tokenPostfix: ".proto",
|
43
|
+
brackets: [
|
44
|
+
{ open: "{", close: "}", token: "delimiter.curly" },
|
45
|
+
{ open: "[", close: "]", token: "delimiter.square" },
|
46
|
+
{ open: "(", close: ")", token: "delimiter.parenthesis" },
|
47
|
+
{ open: "<", close: ">", token: "delimiter.angle" }
|
48
|
+
],
|
49
|
+
symbols: /[=><!~?:&|+\-*/^%]+/,
|
50
|
+
keywords: [
|
51
|
+
"syntax",
|
52
|
+
"import",
|
53
|
+
"weak",
|
54
|
+
"public",
|
55
|
+
"package",
|
56
|
+
"option",
|
57
|
+
"repeated",
|
58
|
+
"oneof",
|
59
|
+
"map",
|
60
|
+
"reserved",
|
61
|
+
"to",
|
62
|
+
"max",
|
63
|
+
"enum",
|
64
|
+
"message",
|
65
|
+
"service",
|
66
|
+
"rpc",
|
67
|
+
"stream",
|
68
|
+
"returns",
|
69
|
+
"package",
|
70
|
+
"optional",
|
71
|
+
"true",
|
72
|
+
"false"
|
73
|
+
],
|
74
|
+
builtinTypes: [
|
75
|
+
"double",
|
76
|
+
"float",
|
77
|
+
"int32",
|
78
|
+
"int64",
|
79
|
+
"uint32",
|
80
|
+
"uint64",
|
81
|
+
"sint32",
|
82
|
+
"sint64",
|
83
|
+
"fixed32",
|
84
|
+
"fixed64",
|
85
|
+
"sfixed32",
|
86
|
+
"sfixed64",
|
87
|
+
"bool",
|
88
|
+
"string",
|
89
|
+
"bytes"
|
90
|
+
],
|
91
|
+
operators: ["=", "+", "-"],
|
92
|
+
namedLiterals,
|
93
|
+
escapes: "\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)",
|
94
|
+
identifier: /[a-zA-Z]\w*/,
|
95
|
+
fullIdentifier: /@identifier(?:\s*\.\s*@identifier)*/,
|
96
|
+
optionName: /(?:@identifier|\(\s*@fullIdentifier\s*\))(?:\s*\.\s*@identifier)*/,
|
97
|
+
messageName: /@identifier/,
|
98
|
+
enumName: /@identifier/,
|
99
|
+
messageType: /\.?\s*(?:@identifier\s*\.\s*)*@messageName/,
|
100
|
+
enumType: /\.?\s*(?:@identifier\s*\.\s*)*@enumName/,
|
101
|
+
floatLit: /[0-9]+\s*\.\s*[0-9]*(?:@exponent)?|[0-9]+@exponent|\.[0-9]+(?:@exponent)?/,
|
102
|
+
exponent: /[eE]\s*[+-]?\s*[0-9]+/,
|
103
|
+
boolLit: /true\b|false\b/,
|
104
|
+
decimalLit: /[1-9][0-9]*/,
|
105
|
+
octalLit: /0[0-7]*/,
|
106
|
+
hexLit: /0[xX][0-9a-fA-F]+/,
|
107
|
+
type: /double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes|@messageType|@enumType/,
|
108
|
+
keyType: /int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string/,
|
109
|
+
tokenizer: {
|
110
|
+
root: [
|
111
|
+
{ include: "@whitespace" },
|
112
|
+
[/syntax/, "keyword"],
|
113
|
+
[/=/, "operators"],
|
114
|
+
[/;/, "delimiter"],
|
115
|
+
[
|
116
|
+
/(")(proto3)(")/,
|
117
|
+
["string.quote", "string", { token: "string.quote", switchTo: "@topLevel.proto3" }]
|
118
|
+
],
|
119
|
+
[
|
120
|
+
/(")(proto2)(")/,
|
121
|
+
["string.quote", "string", { token: "string.quote", switchTo: "@topLevel.proto2" }]
|
122
|
+
],
|
123
|
+
[
|
124
|
+
// If no `syntax` provided, regarded as proto2
|
125
|
+
/.*?/,
|
126
|
+
{ token: "", switchTo: "@topLevel.proto2" }
|
127
|
+
]
|
128
|
+
],
|
129
|
+
topLevel: [
|
130
|
+
// whitespace
|
131
|
+
{ include: "@whitespace" },
|
132
|
+
{ include: "@constant" },
|
133
|
+
[/=/, "operators"],
|
134
|
+
[/[;.]/, "delimiter"],
|
135
|
+
[
|
136
|
+
/@fullIdentifier/,
|
137
|
+
{
|
138
|
+
cases: {
|
139
|
+
option: { token: "keyword", next: "@option.$S2" },
|
140
|
+
enum: { token: "keyword", next: "@enumDecl.$S2" },
|
141
|
+
message: { token: "keyword", next: "@messageDecl.$S2" },
|
142
|
+
service: { token: "keyword", next: "@serviceDecl.$S2" },
|
143
|
+
extend: {
|
144
|
+
cases: {
|
145
|
+
"$S2==proto2": { token: "keyword", next: "@extendDecl.$S2" }
|
146
|
+
}
|
147
|
+
},
|
148
|
+
"@keywords": "keyword",
|
149
|
+
"@default": "identifier"
|
150
|
+
}
|
151
|
+
}
|
152
|
+
]
|
153
|
+
],
|
154
|
+
enumDecl: [
|
155
|
+
{ include: "@whitespace" },
|
156
|
+
[/@identifier/, "type.identifier"],
|
157
|
+
[/{/, { token: "@brackets", bracket: "@open", switchTo: "@enumBody.$S2" }]
|
158
|
+
],
|
159
|
+
enumBody: [
|
160
|
+
{ include: "@whitespace" },
|
161
|
+
{ include: "@constant" },
|
162
|
+
[/=/, "operators"],
|
163
|
+
[/;/, "delimiter"],
|
164
|
+
[/option\b/, "keyword", "@option.$S2"],
|
165
|
+
[/@identifier/, "identifier"],
|
166
|
+
[/\[/, { token: "@brackets", bracket: "@open", next: "@options.$S2" }],
|
167
|
+
[/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
|
168
|
+
],
|
169
|
+
messageDecl: [
|
170
|
+
{ include: "@whitespace" },
|
171
|
+
[/@identifier/, "type.identifier"],
|
172
|
+
[/{/, { token: "@brackets", bracket: "@open", switchTo: "@messageBody.$S2" }]
|
173
|
+
],
|
174
|
+
messageBody: [
|
175
|
+
{ include: "@whitespace" },
|
176
|
+
{ include: "@constant" },
|
177
|
+
[/=/, "operators"],
|
178
|
+
[/;/, "delimiter"],
|
179
|
+
[
|
180
|
+
"(map)(s*)(<)",
|
181
|
+
["keyword", "white", { token: "@brackets", bracket: "@open", next: "@map.$S2" }]
|
182
|
+
],
|
183
|
+
[
|
184
|
+
/@identifier/,
|
185
|
+
{
|
186
|
+
cases: {
|
187
|
+
option: { token: "keyword", next: "@option.$S2" },
|
188
|
+
enum: { token: "keyword", next: "@enumDecl.$S2" },
|
189
|
+
message: { token: "keyword", next: "@messageDecl.$S2" },
|
190
|
+
oneof: { token: "keyword", next: "@oneofDecl.$S2" },
|
191
|
+
extensions: {
|
192
|
+
cases: {
|
193
|
+
"$S2==proto2": { token: "keyword", next: "@reserved.$S2" }
|
194
|
+
}
|
195
|
+
},
|
196
|
+
reserved: { token: "keyword", next: "@reserved.$S2" },
|
197
|
+
"(?:repeated|optional)": { token: "keyword", next: "@field.$S2" },
|
198
|
+
required: {
|
199
|
+
cases: {
|
200
|
+
"$S2==proto2": { token: "keyword", next: "@field.$S2" }
|
201
|
+
}
|
202
|
+
},
|
203
|
+
"$S2==proto3": { token: "@rematch", next: "@field.$S2" }
|
204
|
+
}
|
205
|
+
}
|
206
|
+
],
|
207
|
+
[/\[/, { token: "@brackets", bracket: "@open", next: "@options.$S2" }],
|
208
|
+
[/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
|
209
|
+
],
|
210
|
+
extendDecl: [
|
211
|
+
{ include: "@whitespace" },
|
212
|
+
[/@identifier/, "type.identifier"],
|
213
|
+
[/{/, { token: "@brackets", bracket: "@open", switchTo: "@extendBody.$S2" }]
|
214
|
+
],
|
215
|
+
extendBody: [
|
216
|
+
{ include: "@whitespace" },
|
217
|
+
{ include: "@constant" },
|
218
|
+
[/;/, "delimiter"],
|
219
|
+
[/(?:repeated|optional|required)/, "keyword", "@field.$S2"],
|
220
|
+
[/\[/, { token: "@brackets", bracket: "@open", next: "@options.$S2" }],
|
221
|
+
[/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
|
222
|
+
],
|
223
|
+
options: [
|
224
|
+
{ include: "@whitespace" },
|
225
|
+
{ include: "@constant" },
|
226
|
+
[/;/, "delimiter"],
|
227
|
+
[/@optionName/, "annotation"],
|
228
|
+
[/[()]/, "annotation.brackets"],
|
229
|
+
[/=/, "operator"],
|
230
|
+
[/\]/, { token: "@brackets", bracket: "@close", next: "@pop" }]
|
231
|
+
],
|
232
|
+
option: [
|
233
|
+
{ include: "@whitespace" },
|
234
|
+
[/@optionName/, "annotation"],
|
235
|
+
[/[()]/, "annotation.brackets"],
|
236
|
+
[/=/, "operator", "@pop"]
|
237
|
+
],
|
238
|
+
oneofDecl: [
|
239
|
+
{ include: "@whitespace" },
|
240
|
+
[/@identifier/, "identifier"],
|
241
|
+
[/{/, { token: "@brackets", bracket: "@open", switchTo: "@oneofBody.$S2" }]
|
242
|
+
],
|
243
|
+
oneofBody: [
|
244
|
+
{ include: "@whitespace" },
|
245
|
+
{ include: "@constant" },
|
246
|
+
[/;/, "delimiter"],
|
247
|
+
[/(@identifier)(\s*)(=)/, ["identifier", "white", "delimiter"]],
|
248
|
+
[
|
249
|
+
/@fullIdentifier|\./,
|
250
|
+
{
|
251
|
+
cases: {
|
252
|
+
"@builtinTypes": "keyword",
|
253
|
+
"@default": "type.identifier"
|
254
|
+
}
|
255
|
+
}
|
256
|
+
],
|
257
|
+
[/\[/, { token: "@brackets", bracket: "@open", next: "@options.$S2" }],
|
258
|
+
[/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
|
259
|
+
],
|
260
|
+
reserved: [
|
261
|
+
{ include: "@whitespace" },
|
262
|
+
[/,/, "delimiter"],
|
263
|
+
[/;/, "delimiter", "@pop"],
|
264
|
+
{ include: "@constant" },
|
265
|
+
[/to\b|max\b/, "keyword"]
|
266
|
+
],
|
267
|
+
map: [
|
268
|
+
{ include: "@whitespace" },
|
269
|
+
[
|
270
|
+
/@fullIdentifier|\./,
|
271
|
+
{
|
272
|
+
cases: {
|
273
|
+
"@builtinTypes": "keyword",
|
274
|
+
"@default": "type.identifier"
|
275
|
+
}
|
276
|
+
}
|
277
|
+
],
|
278
|
+
[/,/, "delimiter"],
|
279
|
+
[/>/, { token: "@brackets", bracket: "@close", switchTo: "identifier" }]
|
280
|
+
],
|
281
|
+
field: [
|
282
|
+
{ include: "@whitespace" },
|
283
|
+
[
|
284
|
+
"group",
|
285
|
+
{
|
286
|
+
cases: {
|
287
|
+
"$S2==proto2": { token: "keyword", switchTo: "@groupDecl.$S2" }
|
288
|
+
}
|
289
|
+
}
|
290
|
+
],
|
291
|
+
[/(@identifier)(\s*)(=)/, ["identifier", "white", { token: "delimiter", next: "@pop" }]],
|
292
|
+
[
|
293
|
+
/@fullIdentifier|\./,
|
294
|
+
{
|
295
|
+
cases: {
|
296
|
+
"@builtinTypes": "keyword",
|
297
|
+
"@default": "type.identifier"
|
298
|
+
}
|
299
|
+
}
|
300
|
+
]
|
301
|
+
],
|
302
|
+
groupDecl: [
|
303
|
+
{ include: "@whitespace" },
|
304
|
+
[/@identifier/, "identifier"],
|
305
|
+
["=", "operator"],
|
306
|
+
[/{/, { token: "@brackets", bracket: "@open", switchTo: "@messageBody.$S2" }],
|
307
|
+
{ include: "@constant" }
|
308
|
+
],
|
309
|
+
type: [
|
310
|
+
{ include: "@whitespace" },
|
311
|
+
[/@identifier/, "type.identifier", "@pop"],
|
312
|
+
[/./, "delimiter"]
|
313
|
+
],
|
314
|
+
identifier: [{ include: "@whitespace" }, [/@identifier/, "identifier", "@pop"]],
|
315
|
+
serviceDecl: [
|
316
|
+
{ include: "@whitespace" },
|
317
|
+
[/@identifier/, "identifier"],
|
318
|
+
[/{/, { token: "@brackets", bracket: "@open", switchTo: "@serviceBody.$S2" }]
|
319
|
+
],
|
320
|
+
serviceBody: [
|
321
|
+
{ include: "@whitespace" },
|
322
|
+
{ include: "@constant" },
|
323
|
+
[/;/, "delimiter"],
|
324
|
+
[/option\b/, "keyword", "@option.$S2"],
|
325
|
+
[/rpc\b/, "keyword", "@rpc.$S2"],
|
326
|
+
[/\[/, { token: "@brackets", bracket: "@open", next: "@options.$S2" }],
|
327
|
+
[/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
|
328
|
+
],
|
329
|
+
rpc: [
|
330
|
+
{ include: "@whitespace" },
|
331
|
+
[/@identifier/, "identifier"],
|
332
|
+
[/\(/, { token: "@brackets", bracket: "@open", switchTo: "@request.$S2" }],
|
333
|
+
[/{/, { token: "@brackets", bracket: "@open", next: "@methodOptions.$S2" }],
|
334
|
+
[/;/, "delimiter", "@pop"]
|
335
|
+
],
|
336
|
+
request: [
|
337
|
+
{ include: "@whitespace" },
|
338
|
+
[
|
339
|
+
/@messageType/,
|
340
|
+
{
|
341
|
+
cases: {
|
342
|
+
stream: { token: "keyword", next: "@type.$S2" },
|
343
|
+
"@default": "type.identifier"
|
344
|
+
}
|
345
|
+
}
|
346
|
+
],
|
347
|
+
[/\)/, { token: "@brackets", bracket: "@close", switchTo: "@returns.$S2" }]
|
348
|
+
],
|
349
|
+
returns: [
|
350
|
+
{ include: "@whitespace" },
|
351
|
+
[/returns\b/, "keyword"],
|
352
|
+
[/\(/, { token: "@brackets", bracket: "@open", switchTo: "@response.$S2" }]
|
353
|
+
],
|
354
|
+
response: [
|
355
|
+
{ include: "@whitespace" },
|
356
|
+
[
|
357
|
+
/@messageType/,
|
358
|
+
{
|
359
|
+
cases: {
|
360
|
+
stream: { token: "keyword", next: "@type.$S2" },
|
361
|
+
"@default": "type.identifier"
|
362
|
+
}
|
363
|
+
}
|
364
|
+
],
|
365
|
+
[/\)/, { token: "@brackets", bracket: "@close", switchTo: "@rpc.$S2" }]
|
366
|
+
],
|
367
|
+
methodOptions: [
|
368
|
+
{ include: "@whitespace" },
|
369
|
+
{ include: "@constant" },
|
370
|
+
[/;/, "delimiter"],
|
371
|
+
["option", "keyword"],
|
372
|
+
[/@optionName/, "annotation"],
|
373
|
+
[/[()]/, "annotation.brackets"],
|
374
|
+
[/=/, "operator"],
|
375
|
+
[/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
|
376
|
+
],
|
377
|
+
comment: [
|
378
|
+
[/[^\/*]+/, "comment"],
|
379
|
+
[/\/\*/, "comment", "@push"],
|
380
|
+
// nested comment
|
381
|
+
["\\*/", "comment", "@pop"],
|
382
|
+
[/[\/*]/, "comment"]
|
383
|
+
],
|
384
|
+
string: [
|
385
|
+
[/[^\\"]+/, "string"],
|
386
|
+
[/@escapes/, "string.escape"],
|
387
|
+
[/\\./, "string.escape.invalid"],
|
388
|
+
[/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
|
389
|
+
],
|
390
|
+
stringSingle: [
|
391
|
+
[/[^\\']+/, "string"],
|
392
|
+
[/@escapes/, "string.escape"],
|
393
|
+
[/\\./, "string.escape.invalid"],
|
394
|
+
[/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
|
395
|
+
],
|
396
|
+
constant: [
|
397
|
+
["@boolLit", "keyword.constant"],
|
398
|
+
["@hexLit", "number.hex"],
|
399
|
+
["@octalLit", "number.octal"],
|
400
|
+
["@decimalLit", "number"],
|
401
|
+
["@floatLit", "number.float"],
|
402
|
+
[/("([^"\\]|\\.)*|'([^'\\]|\\.)*)$/, "string.invalid"],
|
403
|
+
// non-terminated string
|
404
|
+
[/"/, { token: "string.quote", bracket: "@open", next: "@string" }],
|
405
|
+
[/'/, { token: "string.quote", bracket: "@open", next: "@stringSingle" }],
|
406
|
+
[/{/, { token: "@brackets", bracket: "@open", next: "@prototext" }],
|
407
|
+
[/identifier/, "identifier"]
|
408
|
+
],
|
409
|
+
whitespace: [
|
410
|
+
[/[ \t\r\n]+/, "white"],
|
411
|
+
[/\/\*/, "comment", "@comment"],
|
412
|
+
[/\/\/.*$/, "comment"]
|
413
|
+
],
|
414
|
+
prototext: [
|
415
|
+
{ include: "@whitespace" },
|
416
|
+
{ include: "@constant" },
|
417
|
+
[/@identifier/, "identifier"],
|
418
|
+
[/[:;]/, "delimiter"],
|
419
|
+
[/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
|
420
|
+
]
|
421
|
+
}
|
422
|
+
};
|
423
|
+
export {
|
424
|
+
conf,
|
425
|
+
language
|
426
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*!-----------------------------------------------------------------------------
|
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
|
+
*-----------------------------------------------------------------------------*/var conf={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},language={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],blockText:[[/^\s+.*$/,{cases:{"($S2\\s+.*$)":{token:"$S3"},"@default":{token:"@rematch",next:"@popall"}}}],[/./,{token:"@rematch",next:"@popall"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]],string:[[/[^\\"'#]+/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/@escapes/,{cases:{"@eos":{token:"string.escape",next:"@popall"},"@default":"string.escape"}}],[/\\./,{cases:{"@eos":{token:"string.escape.invalid",next:"@popall"},"@default":"string.escape.invalid"}}],[/(#{)([^}]*)(})/,["interpolation.delimiter","interpolation","interpolation.delimiter"]],[/#/,"string"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":{token:"string"}}}]],value:[[/[^\\"']+/,{cases:{"@eos":{token:"attribute.value",next:"@popall"},"@default":"attribute.value"}}],[/\\./,{cases:{"@eos":{token:"attribute.value",next:"@popall"},"@default":"attribute.value"}}],[/["']/,{cases:{"$#==$S2":{token:"attribute.value",next:"@pop"},"@default":{token:"attribute.value"}}}]]}};exports.conf=conf;exports.language=language;
|