@nsis/codemirror 0.13.0

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.
package/dist/index.mjs ADDED
@@ -0,0 +1,770 @@
1
+ import { completeFromList } from "@codemirror/autocomplete";
2
+ import { LRLanguage, LanguageSupport, foldInside, foldNodeProp, indentNodeProp } from "@codemirror/language";
3
+ import { styleTags, tags } from "@lezer/highlight";
4
+ import { ExternalTokenizer, LRParser } from "@lezer/lr";
5
+ //#region src/highlight.ts
6
+ const nsisHighlighting = styleTags({
7
+ CommandName: tags.keyword,
8
+ "Function FunctionEnd Section SectionEnd SectionGroup SectionGroupEnd PageEx PageExEnd Var": tags.keyword,
9
+ PreprocKeyword: tags.processingInstruction,
10
+ PreprocIf: tags.processingInstruction,
11
+ PreprocElse: tags.processingInstruction,
12
+ PreprocEndif: tags.processingInstruction,
13
+ PreprocMacro: tags.processingInstruction,
14
+ PreprocMacroEnd: tags.processingInstruction,
15
+ Constant: tags.constant(tags.name),
16
+ ArgumentValue: tags.atom,
17
+ Variable: tags.variableName,
18
+ DefineReference: tags.special(tags.variableName),
19
+ LangStringReference: tags.special(tags.string),
20
+ Flag: tags.attributeName,
21
+ Number: tags.number,
22
+ String: tags.string,
23
+ RawString: tags.string,
24
+ BacktickString: tags.string,
25
+ "DQEscape SQEscape BTEscape": tags.escape,
26
+ "DQVariable SQVariable BTVariable": tags.variableName,
27
+ "DQDefineRef SQDefineRef BTDefineRef": tags.special(tags.variableName),
28
+ "DQLangRef SQLangRef BTLangRef": tags.special(tags.string),
29
+ LineComment: tags.lineComment,
30
+ BlockComment: tags.blockComment,
31
+ Label: tags.labelName,
32
+ LabelReference: tags.labelName,
33
+ "PluginCall/Identifier": tags.className,
34
+ "::": tags.punctuation
35
+ });
36
+ //#endregion
37
+ //#region src/string-tokens.ts
38
+ function makeTokenizer(endChar, content, escapeToken, variable, defineRef, langRef) {
39
+ return new ExternalTokenizer((input) => {
40
+ const ch = input.next;
41
+ if (ch < 0 || ch === endChar) return;
42
+ if (ch === 36) {
43
+ const next = input.peek(1);
44
+ if (next === 92) {
45
+ if (input.peek(2) >= 0) {
46
+ input.advance(3);
47
+ input.acceptToken(escapeToken);
48
+ return;
49
+ }
50
+ }
51
+ if (next === 36) {
52
+ input.advance(2);
53
+ input.acceptToken(escapeToken);
54
+ return;
55
+ }
56
+ if (next === 123) {
57
+ input.advance(2);
58
+ while (input.next >= 0 && input.next !== 125) input.advance();
59
+ if (input.next === 125) input.advance();
60
+ input.acceptToken(defineRef);
61
+ return;
62
+ }
63
+ if (next === 40) {
64
+ input.advance(2);
65
+ while (input.next >= 0 && input.next !== 41) input.advance();
66
+ if (input.next === 41) input.advance();
67
+ input.acceptToken(langRef);
68
+ return;
69
+ }
70
+ if (next >= 65 && next <= 90 || next >= 97 && next <= 122 || next === 95) {
71
+ input.advance(2);
72
+ while (true) {
73
+ const c = input.next;
74
+ if (c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 48 && c <= 57 || c === 95 || c === 46) input.advance();
75
+ else break;
76
+ }
77
+ input.acceptToken(variable);
78
+ return;
79
+ }
80
+ if (next >= 48 && next <= 57) {
81
+ input.advance(2);
82
+ input.acceptToken(variable);
83
+ return;
84
+ }
85
+ }
86
+ do
87
+ input.advance();
88
+ while (input.next >= 0 && input.next !== endChar && input.next !== 36);
89
+ input.acceptToken(content);
90
+ });
91
+ }
92
+ const dqTokenizer = makeTokenizer(34, 81, 1, 2, 3, 4);
93
+ const sqTokenizer = makeTokenizer(39, 82, 5, 6, 7, 8);
94
+ const btTokenizer = makeTokenizer(96, 83, 9, 10, 11, 12);
95
+ //#endregion
96
+ //#region src/parser.js
97
+ const spec_Identifier = {
98
+ __proto__: null,
99
+ "!addincludedir": 40,
100
+ "!addplugindir": 40,
101
+ "!appendfile": 40,
102
+ "!appendmemfile": 40,
103
+ "!assert": 40,
104
+ "!cd": 40,
105
+ "!define": 40,
106
+ "!delfile": 40,
107
+ "!echo": 40,
108
+ "!error": 40,
109
+ "!execute": 40,
110
+ "!finalize": 40,
111
+ "!getdllversion": 40,
112
+ "!gettlbversion": 40,
113
+ "!include": 40,
114
+ "!insertmacro": 40,
115
+ "!macroundef": 40,
116
+ "!makensis": 40,
117
+ "!packhdr": 40,
118
+ "!pragma": 40,
119
+ "!searchparse": 40,
120
+ "!searchreplace": 40,
121
+ "!system": 40,
122
+ "!tempfile": 40,
123
+ "!undef": 40,
124
+ "!uninstfinalize": 40,
125
+ "!verbose": 40,
126
+ "!warning": 40,
127
+ admin: 70,
128
+ all: 70,
129
+ "amd64-unicode": 70,
130
+ auto: 70,
131
+ both: 70,
132
+ bottom: 70,
133
+ bzip2: 70,
134
+ components: 70,
135
+ current: 70,
136
+ custom: 70,
137
+ default: 70,
138
+ directory: 70,
139
+ false: 70,
140
+ force: 70,
141
+ hide: 70,
142
+ highest: 70,
143
+ ifdiff: 70,
144
+ ifnewer: 70,
145
+ instfiles: 70,
146
+ lastused: 70,
147
+ leave: 70,
148
+ left: 70,
149
+ license: 70,
150
+ listonly: 70,
151
+ lzma: 70,
152
+ nevershow: 70,
153
+ none: 70,
154
+ normal: 70,
155
+ notset: 70,
156
+ off: 70,
157
+ on: 70,
158
+ right: 70,
159
+ show: 70,
160
+ silent: 70,
161
+ silentlog: 70,
162
+ textonly: 70,
163
+ top: 70,
164
+ true: 70,
165
+ try: 70,
166
+ "un.components": 70,
167
+ "un.custom": 70,
168
+ "un.directory": 70,
169
+ "un.instfiles": 70,
170
+ "un.license": 70,
171
+ uninstConfirm: 70,
172
+ user: 70,
173
+ zlib: 70,
174
+ Var: 78,
175
+ Abort: 84,
176
+ AddBrandingImage: 84,
177
+ AddSize: 84,
178
+ AllowRootDirInstall: 84,
179
+ AllowSkipFiles: 84,
180
+ AutoCloseWindow: 84,
181
+ BGFont: 84,
182
+ BGGradient: 84,
183
+ BrandingText: 84,
184
+ BringToFront: 84,
185
+ Call: 84,
186
+ CallInstDLL: 84,
187
+ Caption: 84,
188
+ ChangeUI: 84,
189
+ CheckBitmap: 84,
190
+ ClearErrors: 84,
191
+ CompletedText: 84,
192
+ ComponentText: 84,
193
+ CopyFiles: 84,
194
+ CPU: 84,
195
+ CRCCheck: 84,
196
+ CreateDirectory: 84,
197
+ CreateFont: 84,
198
+ CreateShortCut: 84,
199
+ Delete: 84,
200
+ DeleteINISec: 84,
201
+ DeleteINIStr: 84,
202
+ DeleteRegKey: 84,
203
+ DeleteRegValue: 84,
204
+ DetailPrint: 84,
205
+ DetailsButtonText: 84,
206
+ DirText: 84,
207
+ DirVar: 84,
208
+ DirVerify: 84,
209
+ EnableWindow: 84,
210
+ EnumRegKey: 84,
211
+ EnumRegValue: 84,
212
+ Exch: 84,
213
+ Exec: 84,
214
+ ExecShell: 84,
215
+ ExecShellWait: 84,
216
+ ExecWait: 84,
217
+ ExpandEnvStrings: 84,
218
+ File: 84,
219
+ FileBufSize: 84,
220
+ FileClose: 84,
221
+ FileErrorText: 84,
222
+ FileOpen: 84,
223
+ FileRead: 84,
224
+ FileReadByte: 84,
225
+ FileReadUTF16LE: 84,
226
+ FileReadWord: 84,
227
+ FileSeek: 84,
228
+ FileWrite: 84,
229
+ FileWriteByte: 84,
230
+ FileWriteUTF16LE: 84,
231
+ FileWriteWord: 84,
232
+ FindClose: 84,
233
+ FindFirst: 84,
234
+ FindNext: 84,
235
+ FindWindow: 84,
236
+ FlushINI: 84,
237
+ GetCurInstType: 84,
238
+ GetCurrentAddress: 84,
239
+ GetDlgItem: 84,
240
+ GetDLLVersion: 84,
241
+ GetDLLVersionLocal: 84,
242
+ GetErrorLevel: 84,
243
+ GetFileTime: 84,
244
+ GetFileTimeLocal: 84,
245
+ GetFullPathName: 84,
246
+ GetFunctionAddress: 84,
247
+ GetInstDirError: 84,
248
+ GetKnownFolderPath: 84,
249
+ GetLabelAddress: 84,
250
+ GetRegView: 84,
251
+ GetShellVarContext: 84,
252
+ GetTempFileName: 84,
253
+ GetWinVer: 84,
254
+ Goto: 84,
255
+ HideWindow: 84,
256
+ Icon: 84,
257
+ IfAbort: 84,
258
+ IfAltRegView: 84,
259
+ IfErrors: 84,
260
+ IfFileExists: 84,
261
+ IfRebootFlag: 84,
262
+ IfRtlLanguage: 84,
263
+ IfShellVarContextAll: 84,
264
+ IfSilent: 84,
265
+ InitPluginsDir: 84,
266
+ InstallButtonText: 84,
267
+ InstallColors: 84,
268
+ InstallDir: 84,
269
+ InstallDirRegKey: 84,
270
+ InstProgressFlags: 84,
271
+ InstType: 84,
272
+ InstTypeGetText: 84,
273
+ InstTypeSetText: 84,
274
+ Int64Cmp: 84,
275
+ Int64CmpU: 84,
276
+ Int64Fmt: 84,
277
+ IntCmp: 84,
278
+ IntCmpU: 84,
279
+ IntFmt: 84,
280
+ IntOp: 84,
281
+ IntPtrCmp: 84,
282
+ IntPtrCmpU: 84,
283
+ IntPtrOp: 84,
284
+ IsWindow: 84,
285
+ LangString: 84,
286
+ LicenseBkColor: 84,
287
+ LicenseData: 84,
288
+ LicenseForceSelection: 84,
289
+ LicenseLangString: 84,
290
+ LicenseText: 84,
291
+ LoadAndSetImage: 84,
292
+ LoadLanguageFile: 84,
293
+ LockWindow: 84,
294
+ LogSet: 84,
295
+ LogText: 84,
296
+ ManifestAppendCustomString: 84,
297
+ ManifestDisableWindowFiltering: 84,
298
+ ManifestDPIAware: 84,
299
+ ManifestDPIAwareness: 84,
300
+ ManifestGdiScaling: 84,
301
+ ManifestLongPathAware: 84,
302
+ ManifestMaxVersionTested: 84,
303
+ ManifestSupportedOS: 84,
304
+ MessageBox: 84,
305
+ MiscButtonText: 84,
306
+ Name: 84,
307
+ Nop: 84,
308
+ OutFile: 84,
309
+ Page: 84,
310
+ PageCallbacks: 84,
311
+ PEAddResource: 84,
312
+ PEDllCharacteristics: 84,
313
+ PERemoveResource: 84,
314
+ PESubsysVer: 84,
315
+ Pop: 84,
316
+ Push: 84,
317
+ Quit: 84,
318
+ ReadEnvStr: 84,
319
+ ReadINIStr: 84,
320
+ ReadMemory: 84,
321
+ ReadRegDWORD: 84,
322
+ ReadRegStr: 84,
323
+ Reboot: 84,
324
+ RegDLL: 84,
325
+ Rename: 84,
326
+ RequestExecutionLevel: 84,
327
+ ReserveFile: 84,
328
+ Return: 84,
329
+ RMDir: 84,
330
+ SearchPath: 84,
331
+ SectionGetFlags: 84,
332
+ SectionGetInstTypes: 84,
333
+ SectionGetSize: 84,
334
+ SectionGetText: 84,
335
+ SectionIn: 84,
336
+ SectionInstType: 84,
337
+ SectionSetFlags: 84,
338
+ SectionSetInstTypes: 84,
339
+ SectionSetSize: 84,
340
+ SectionSetText: 84,
341
+ SendMessage: 84,
342
+ SetAutoClose: 84,
343
+ SetBrandingImage: 84,
344
+ SetCompress: 84,
345
+ SetCompressionLevel: 84,
346
+ SetCompressor: 84,
347
+ SetCompressorDictSize: 84,
348
+ SetCtlColors: 84,
349
+ SetCurInstType: 84,
350
+ SetDatablockOptimize: 84,
351
+ SetDateSave: 84,
352
+ SetDetailsPrint: 84,
353
+ SetDetailsView: 84,
354
+ SetErrorLevel: 84,
355
+ SetErrors: 84,
356
+ SetFileAttributes: 84,
357
+ SetFont: 84,
358
+ SetOutPath: 84,
359
+ SetOverwrite: 84,
360
+ SetRebootFlag: 84,
361
+ SetRegView: 84,
362
+ SetShellVarContext: 84,
363
+ SetSilent: 84,
364
+ ShowInstDetails: 84,
365
+ ShowUninstDetails: 84,
366
+ ShowWindow: 84,
367
+ SilentInstall: 84,
368
+ SilentUnInstall: 84,
369
+ Sleep: 84,
370
+ SpaceTexts: 84,
371
+ StrCmp: 84,
372
+ StrCmpS: 84,
373
+ StrCpy: 84,
374
+ StrLen: 84,
375
+ SubCaption: 84,
376
+ Target: 84,
377
+ Unicode: 84,
378
+ UnsafeStrCpy: 84,
379
+ UninstallButtonText: 84,
380
+ UninstallCaption: 84,
381
+ UninstallIcon: 84,
382
+ UninstallSubCaption: 84,
383
+ UninstallText: 84,
384
+ UninstPage: 84,
385
+ UnRegDLL: 84,
386
+ VIAddVersionKey: 84,
387
+ VIFileVersion: 84,
388
+ VIProductVersion: 84,
389
+ WindowIcon: 84,
390
+ WriteINIStr: 84,
391
+ WriteRegBin: 84,
392
+ WriteRegDWORD: 84,
393
+ WriteRegExpandStr: 84,
394
+ WriteRegMultiStr: 84,
395
+ WriteRegNone: 84,
396
+ WriteRegStr: 84,
397
+ WriteUninstaller: 84,
398
+ XPStyle: 84,
399
+ Function: 90,
400
+ "!macro": 96,
401
+ Section: 100,
402
+ SectionEnd: 102,
403
+ SectionGroup: 106,
404
+ "!if": 112,
405
+ "!ifdef": 112,
406
+ "!ifndef": 112,
407
+ "!ifmacrodef": 112,
408
+ "!ifmacrondef": 112,
409
+ "!else": 116,
410
+ "!endif": 120,
411
+ SectionGroupEnd: 122,
412
+ PageEx: 126,
413
+ PageExEnd: 128,
414
+ "!macroend": 136,
415
+ FunctionEnd: 138
416
+ };
417
+ const parser = LRParser.deserialize({
418
+ version: 14,
419
+ states: "0zQ`QWOOOOQO'#Cn'#CnO!{QWO'#CmO#VQWO'#DQOOQO'#DV'#DVO#[QWO'#DUO#fQWO'#EZOOQO'#D]'#D]OOQO'#De'#DeO#nQWO'#DdO#uQWO'#D[OOQO'#DX'#DXOOQO'#Dt'#DtQ`QWOOQOQWOOO#zQWO'#DSO$SQWO'#D_O$ZQWO'#DbO$bQWO'#DlO$iQWO'#DYO%RQXO'#CrO%kQYO'#CtO&TQ[O'#CvOOQO'#DO'#DOOOQO'#EV'#EVOOQO'#Du'#DuO&[QWO,59XO&fQWO,59lO&kQWO,59pOOQO,5:p,5:pO&uQWO,5:OO&|QWO,5:OO'kQWO,59vOOQO-E7r-E7rOOQO,59n,59nO'sQWO,59nO'xQWO,59yO(PQWO,59yO(kQWO,59|O)^QWO,59|O)eQWO,5:WO)lQWO,5:WO*WQWO,59tO*_QWO,59tOOQP'#Dv'#DvO*yQXO,59^OOQO,59^,59^OOQQ'#Dw'#DwO+QQYO,59`OOQO,59`,59`OOQS'#Dx'#DxO+XQ[O,59bOOQO,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jSZO]W!fw!e!g#TV#O!a!}#PS[O]f!]ouy{!X!^!c!i!k#_#jW!fw!e!g#TV#O!a!}#PyXO]ouwy{!X!^!a!c!e!g!i!k!}#P#T#_#jX!w![!t!x#[Q!z![S#]!t!xR#i#[Q#d#QR#l#aQ]ORq]QjQQlTQnXQt`QvaQxbQzcb!Vjlntvxz!s#^Q!s!WR#^!wQ}dR!m}Q!QeR!o!QQ!TfR!q!Td!^ouy{!X!c!i!k#_#jR!{!^Q!`pR!|!`S#P!a!}R#b#PQ!gwQ#T!eT#V!g#TQ!x![Q#[!tT#`!x#[uiQTX`abcjlntvxz!W!s!w#^Q![oQ!duQ!jyQ!l{Q!t!XQ#R!cQ#W!iQ#Y!kQ#k#_R#m#jQ#Q!aR#a!}T^O]",
422
+ nodeNames: "⚠ DQEscape DQVariable DQDefineRef DQLangRef SQEscape SQVariable SQDefineRef SQLangRef BTEscape BTVariable BTDefineRef BTLangRef LineComment BlockComment LineContinuation Script PreprocDirective PreprocKeyword Identifier PreprocKeyword \" String ' RawString ` BacktickString Variable DefineReference LangStringReference Number Flag LabelReference Constant ArgumentValue ArgumentValue PluginCall ColonColon VariableDeclaration Var Command CommandName CommandName Block FunctionBlock Function MacroBlock PreprocMacro PreprocMacro SectionBlock Section SectionEnd SectionGroupBlock SectionGroup PreprocConditional PreprocIf PreprocIf PreprocElse PreprocElse PreprocEndif PreprocEndif SectionGroupEnd PageExBlock PageEx PageExEnd : Label PreprocMacroEnd PreprocMacroEnd FunctionEnd",
423
+ maxTerm: 91,
424
+ skippedNodes: [
425
+ 0,
426
+ 13,
427
+ 14,
428
+ 15
429
+ ],
430
+ repeatNodeCount: 10,
431
+ tokenData: "-{~RfXY!gYZ!u]^!gpq!gqr!zrs#ist#ntu$Vwx'R{|'W}!O'W!O!P(w!P!Q)]!Q!R'a!R![(Q![!]+p!]!^#n!c!},o#O#P-k#R#S(w#S#T-v#T#o(w~!lR!w~XY!g]^!gpq!g~!zO!z~~!}R!c!}#W#R#S#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tokenPrec: 710
444
+ });
445
+ //#endregion
446
+ //#region src/index.ts
447
+ const nsisLanguage = LRLanguage.define({
448
+ name: "nsis",
449
+ parser: parser.configure({ props: [
450
+ nsisHighlighting,
451
+ indentNodeProp.add({
452
+ FunctionBlock: (cx) => cx.baseIndent + cx.unit,
453
+ SectionBlock: (cx) => cx.baseIndent + cx.unit,
454
+ SectionGroupBlock: (cx) => cx.baseIndent + cx.unit,
455
+ PageExBlock: (cx) => cx.baseIndent + cx.unit,
456
+ MacroBlock: (cx) => cx.baseIndent + cx.unit,
457
+ PreprocConditional: (cx) => cx.baseIndent + cx.unit
458
+ }),
459
+ foldNodeProp.add({
460
+ FunctionBlock: foldInside,
461
+ SectionBlock: foldInside,
462
+ SectionGroupBlock: foldInside,
463
+ PageExBlock: foldInside,
464
+ MacroBlock: foldInside,
465
+ PreprocConditional: foldInside,
466
+ BlockComment: foldInside
467
+ })
468
+ ] }),
469
+ languageData: {
470
+ commentTokens: {
471
+ line: "#",
472
+ block: {
473
+ open: "/*",
474
+ close: "*/"
475
+ }
476
+ },
477
+ closeBrackets: { brackets: [
478
+ "(",
479
+ "[",
480
+ "{",
481
+ "\"",
482
+ "'",
483
+ "`"
484
+ ] }
485
+ }
486
+ });
487
+ const nsisCompletion = completeFromList([
488
+ "Abort",
489
+ "AddBrandingImage",
490
+ "AddSize",
491
+ "AllowRootDirInstall",
492
+ "AllowSkipFiles",
493
+ "AutoCloseWindow",
494
+ "BGFont",
495
+ "BGGradient",
496
+ "BrandingText",
497
+ "BringToFront",
498
+ "Call",
499
+ "CallInstDLL",
500
+ "Caption",
501
+ "ChangeUI",
502
+ "CheckBitmap",
503
+ "ClearErrors",
504
+ "CompletedText",
505
+ "ComponentText",
506
+ "CopyFiles",
507
+ "CPU",
508
+ "CRCCheck",
509
+ "CreateDirectory",
510
+ "CreateFont",
511
+ "CreateShortCut",
512
+ "Delete",
513
+ "DeleteINISec",
514
+ "DeleteINIStr",
515
+ "DeleteRegKey",
516
+ "DeleteRegValue",
517
+ "DetailPrint",
518
+ "DetailsButtonText",
519
+ "DirText",
520
+ "DirVar",
521
+ "DirVerify",
522
+ "EnableWindow",
523
+ "EnumRegKey",
524
+ "EnumRegValue",
525
+ "Exch",
526
+ "Exec",
527
+ "ExecShell",
528
+ "ExecShellWait",
529
+ "ExecWait",
530
+ "ExpandEnvStrings",
531
+ "File",
532
+ "FileBufSize",
533
+ "FileClose",
534
+ "FileErrorText",
535
+ "FileOpen",
536
+ "FileRead",
537
+ "FileReadByte",
538
+ "FileReadUTF16LE",
539
+ "FileReadWord",
540
+ "FileSeek",
541
+ "FileWrite",
542
+ "FileWriteByte",
543
+ "FileWriteUTF16LE",
544
+ "FileWriteWord",
545
+ "FindClose",
546
+ "FindFirst",
547
+ "FindNext",
548
+ "FindWindow",
549
+ "FlushINI",
550
+ "Function",
551
+ "FunctionEnd",
552
+ "GetCurInstType",
553
+ "GetCurrentAddress",
554
+ "GetDlgItem",
555
+ "GetDLLVersion",
556
+ "GetDLLVersionLocal",
557
+ "GetErrorLevel",
558
+ "GetFileTime",
559
+ "GetFileTimeLocal",
560
+ "GetFullPathName",
561
+ "GetFunctionAddress",
562
+ "GetInstDirError",
563
+ "GetKnownFolderPath",
564
+ "GetLabelAddress",
565
+ "GetRegView",
566
+ "GetShellVarContext",
567
+ "GetTempFileName",
568
+ "GetWinVer",
569
+ "Goto",
570
+ "HideWindow",
571
+ "Icon",
572
+ "IfAbort",
573
+ "IfAltRegView",
574
+ "IfErrors",
575
+ "IfFileExists",
576
+ "IfRebootFlag",
577
+ "IfRtlLanguage",
578
+ "IfShellVarContextAll",
579
+ "IfSilent",
580
+ "InitPluginsDir",
581
+ "InstallButtonText",
582
+ "InstallColors",
583
+ "InstallDir",
584
+ "InstallDirRegKey",
585
+ "InstProgressFlags",
586
+ "InstType",
587
+ "InstTypeGetText",
588
+ "InstTypeSetText",
589
+ "Int64Cmp",
590
+ "Int64CmpU",
591
+ "Int64Fmt",
592
+ "IntCmp",
593
+ "IntCmpU",
594
+ "IntFmt",
595
+ "IntOp",
596
+ "IntPtrCmp",
597
+ "IntPtrCmpU",
598
+ "IntPtrOp",
599
+ "IsWindow",
600
+ "LangString",
601
+ "LicenseBkColor",
602
+ "LicenseData",
603
+ "LicenseForceSelection",
604
+ "LicenseLangString",
605
+ "LicenseText",
606
+ "LoadAndSetImage",
607
+ "LoadLanguageFile",
608
+ "LockWindow",
609
+ "LogSet",
610
+ "LogText",
611
+ "ManifestAppendCustomString",
612
+ "ManifestDisableWindowFiltering",
613
+ "ManifestDPIAware",
614
+ "ManifestDPIAwareness",
615
+ "ManifestGdiScaling",
616
+ "ManifestLongPathAware",
617
+ "ManifestMaxVersionTested",
618
+ "ManifestSupportedOS",
619
+ "MessageBox",
620
+ "MiscButtonText",
621
+ "Name",
622
+ "Nop",
623
+ "OutFile",
624
+ "Page",
625
+ "PageCallbacks",
626
+ "PageEx",
627
+ "PageExEnd",
628
+ "PEAddResource",
629
+ "PEDllCharacteristics",
630
+ "PERemoveResource",
631
+ "PESubsysVer",
632
+ "Pop",
633
+ "Push",
634
+ "Quit",
635
+ "ReadEnvStr",
636
+ "ReadINIStr",
637
+ "ReadMemory",
638
+ "ReadRegDWORD",
639
+ "ReadRegStr",
640
+ "Reboot",
641
+ "RegDLL",
642
+ "Rename",
643
+ "RequestExecutionLevel",
644
+ "ReserveFile",
645
+ "Return",
646
+ "RMDir",
647
+ "SearchPath",
648
+ "Section",
649
+ "SectionEnd",
650
+ "SectionGroup",
651
+ "SectionGroupEnd",
652
+ "SectionGetFlags",
653
+ "SectionGetInstTypes",
654
+ "SectionGetSize",
655
+ "SectionGetText",
656
+ "SectionIn",
657
+ "SectionInstType",
658
+ "SectionSetFlags",
659
+ "SectionSetInstTypes",
660
+ "SectionSetSize",
661
+ "SectionSetText",
662
+ "SendMessage",
663
+ "SetAutoClose",
664
+ "SetBrandingImage",
665
+ "SetCompress",
666
+ "SetCompressionLevel",
667
+ "SetCompressor",
668
+ "SetCompressorDictSize",
669
+ "SetCtlColors",
670
+ "SetCurInstType",
671
+ "SetDatablockOptimize",
672
+ "SetDateSave",
673
+ "SetDetailsPrint",
674
+ "SetDetailsView",
675
+ "SetErrorLevel",
676
+ "SetErrors",
677
+ "SetFileAttributes",
678
+ "SetFont",
679
+ "SetOutPath",
680
+ "SetOverwrite",
681
+ "SetRebootFlag",
682
+ "SetRegView",
683
+ "SetShellVarContext",
684
+ "SetSilent",
685
+ "ShowInstDetails",
686
+ "ShowUninstDetails",
687
+ "ShowWindow",
688
+ "SilentInstall",
689
+ "SilentUnInstall",
690
+ "Sleep",
691
+ "SpaceTexts",
692
+ "StrCmp",
693
+ "StrCmpS",
694
+ "StrCpy",
695
+ "StrLen",
696
+ "SubCaption",
697
+ "Target",
698
+ "Unicode",
699
+ "UnsafeStrCpy",
700
+ "UninstallButtonText",
701
+ "UninstallCaption",
702
+ "UninstallIcon",
703
+ "UninstallSubCaption",
704
+ "UninstallText",
705
+ "UninstPage",
706
+ "UnRegDLL",
707
+ "Var",
708
+ "VIAddVersionKey",
709
+ "VIFileVersion",
710
+ "VIProductVersion",
711
+ "WindowIcon",
712
+ "WriteINIStr",
713
+ "WriteRegBin",
714
+ "WriteRegDWORD",
715
+ "WriteRegExpandStr",
716
+ "WriteRegMultiStr",
717
+ "WriteRegNone",
718
+ "WriteRegStr",
719
+ "WriteUninstaller",
720
+ "XPStyle"
721
+ ].map((c) => ({
722
+ label: c,
723
+ type: "keyword"
724
+ })).concat([
725
+ "!addincludedir",
726
+ "!addplugindir",
727
+ "!appendfile",
728
+ "!appendmemfile",
729
+ "!assert",
730
+ "!cd",
731
+ "!define",
732
+ "!delfile",
733
+ "!echo",
734
+ "!else",
735
+ "!endif",
736
+ "!error",
737
+ "!execute",
738
+ "!finalize",
739
+ "!getdllversion",
740
+ "!gettlbversion",
741
+ "!if",
742
+ "!ifdef",
743
+ "!ifndef",
744
+ "!ifmacrodef",
745
+ "!ifmacrondef",
746
+ "!include",
747
+ "!insertmacro",
748
+ "!macro",
749
+ "!macroend",
750
+ "!macroundef",
751
+ "!makensis",
752
+ "!packhdr",
753
+ "!pragma",
754
+ "!searchparse",
755
+ "!searchreplace",
756
+ "!system",
757
+ "!tempfile",
758
+ "!undef",
759
+ "!uninstfinalize",
760
+ "!verbose",
761
+ "!warning"
762
+ ].map((d) => ({
763
+ label: d,
764
+ type: "keyword"
765
+ }))));
766
+ function nsis() {
767
+ return new LanguageSupport(nsisLanguage, [nsisLanguage.data.of({ autocomplete: nsisCompletion })]);
768
+ }
769
+ //#endregion
770
+ export { nsis, nsisLanguage };