]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/nsis.js
1 /*! `nsis` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Description: Nullsoft Scriptable Install System
8 Author: Jan T. Sott <jan.sott@gmail.com>
9 Website: https://nsis.sourceforge.io/Main_Page
15 const regex
= hljs
.regex
;
16 const LANGUAGE_CONSTANTS
= [
50 "RESOURCES_LOCALIZED",
65 "FILE_ATTRIBUTE_ARCHIVE",
66 "FILE_ATTRIBUTE_NORMAL",
67 "FILE_ATTRIBUTE_OFFLINE",
68 "FILE_ATTRIBUTE_READONLY",
69 "FILE_ATTRIBUTE_SYSTEM",
70 "FILE_ATTRIBUTE_TEMPORARY",
75 "HKEY_CURRENT_CONFIG",
79 "HKEY_PERFORMANCE_DATA",
91 "MB_ABORTRETRYIGNORE",
117 const COMPILER_FLAGS
= [
155 className: 'variable.constant',
156 begin: regex
.concat(/\$/, regex
.either(...LANGUAGE_CONSTANTS
))
161 className: 'variable',
162 begin: /\$+\{[\!\w.:-]+\}/
167 className: 'variable',
168 begin: /\$+\w[\w\.]*/,
173 // $(language_strings)
174 className: 'variable',
175 begin: /\$+\([\w^.:!-]+\)/
179 // command parameters
181 begin: regex
.either(...PARAM_NAMES
)
186 className: 'keyword',
189 regex
.either(...COMPILER_FLAGS
)
193 const ESCAPE_CHARS
= {
195 className: 'char.escape',
196 begin: /\$(\\[nrt]|\$)/
201 className: 'title.function',
235 "AllowRootDirInstall",
297 "GetDLLVersionLocal",
302 "GetFunctionAddress",
304 "GetKnownFolderPath",
316 "IfShellVarContextAll",
341 "LicenseForceSelection",
350 "ManifestLongPathAware",
351 "ManifestMaxVersionTested",
352 "ManifestSupportedOS",
361 "PEDllCharacteristics",
374 "RequestExecutionLevel",
380 "SectionGetInstTypes",
385 "SectionSetInstTypes",
393 "SetCompressorDictSize",
396 "SetDatablockOptimize",
408 "SetShellVarContext",
423 "UninstallButtonText",
426 "UninstallSubCaption",
502 const FUNCTION_DEFINITION
= {
506 regex
.concat(/(\.)?/, hljs
.IDENT_RE
)
514 // Var Custom.Variable.Name.Item
515 // Var /GLOBAL Custom.Variable.Name.Item
516 const VARIABLE_NAME_RE
= /[A-Za-z][\w.]*/;
517 const VARIABLE_DEFINITION
= {
533 case_insensitive: true,
539 hljs
.HASH_COMMENT_MODE
,
540 hljs
.C_BLOCK_COMMENT_MODE
,
548 { beginKeywords: 'Function PageEx Section SectionGroup FunctionEnd SectionEnd', },
565 export default hljsGrammar
;